Use corodova plugin MessageBox.Apply and MessageBox.Confirm.