Mahaveer K
Mahaveer K

Reputation: 11

cordova camera cancelled error after adding background mode plugin

aftre adding the adding background mode plugin in the cordova app camera functionality is not working gives camera cancelled error after capture.

Everything works on android 5+ phone. But android 4+ phone it fails. Please suggest

Upvotes: 0

Views: 512

Answers (1)

Rony Silva
Rony Silva

Reputation: 3

My problem was resolved with next steps:

  • After add platform android, access the directory from this platform, open android.json, edit the value from preference of name AndroidLaunchMode, add this value: singleTop.
  • After in terminal run cordova run android (or ionic run android, if with this framework).

  • I tried add the value singleTop direct in AndroidManifest.xml, but I saw this value be updated with another value (Ex.: singleInstance).

Upvotes: 1

Related Questions