Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal Argument Exception with Ionic 6 | applicationId is null issue #828

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
//This allows us to not make this a breaking change to embedding
this.applicationId = (String) BuildHelper.getBuildConfigValue(cordova.getActivity(), "APPLICATION_ID");
this.applicationId = preferences.getString("applicationId", this.applicationId);



//ISSUE: https://github.com/apache/cordova-plugin-camera/issues/689
//FIX: Some time Building config class don't have APPLICATION ID and this is showing
//blank on adding this if the application Id is blank then use get activity class to initialize application id
if(this.applicationId=="" || this.applicationId==null){
this.applicationId=cordova.getActivity().getPackageName();
}

if (action.equals(TAKE_PICTURE_ACTION)) {
this.srcType = CAMERA;
this.destType = FILE_URI;
Expand Down