mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-03-16 22:11:02 +08:00
CB-11625 (Android) : Make this work with previous versions of Cordova via cordova-plugin-compat
This commit is contained in:
parent
b63a0d83e0
commit
61064ae3ed
@ -29,10 +29,10 @@ import java.io.OutputStream;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.apache.cordova.BuildHelper;
|
||||||
import org.apache.cordova.CallbackContext;
|
import org.apache.cordova.CallbackContext;
|
||||||
import org.apache.cordova.CordovaPlugin;
|
import org.apache.cordova.CordovaPlugin;
|
||||||
import org.apache.cordova.CordovaResourceApi;
|
import org.apache.cordova.CordovaResourceApi;
|
||||||
import org.apache.cordova.CoreAndroid;
|
|
||||||
import org.apache.cordova.LOG;
|
import org.apache.cordova.LOG;
|
||||||
import org.apache.cordova.PermissionHelper;
|
import org.apache.cordova.PermissionHelper;
|
||||||
import org.apache.cordova.PluginResult;
|
import org.apache.cordova.PluginResult;
|
||||||
@ -137,7 +137,8 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
this.callbackContext = callbackContext;
|
this.callbackContext = callbackContext;
|
||||||
//Adding an API to CoreAndroid to get the BuildConfigValue
|
//Adding an API to CoreAndroid to get the BuildConfigValue
|
||||||
//This allows us to not make this a breaking change to embedding
|
//This allows us to not make this a breaking change to embedding
|
||||||
this.applicationId = (String) CoreAndroid.getBuildConfigValue(cordova.getActivity(), "APPLICATION_ID");
|
this.applicationId = (String) BuildHelper.getBuildConfigValue(cordova.getActivity(), "APPLICATION_ID");
|
||||||
|
this.applicationId = preferences.getString("applicationId", this.applicationId);
|
||||||
|
|
||||||
|
|
||||||
if (action.equals("takePicture")) {
|
if (action.equals("takePicture")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user