I use the Zxing barcode scanner in my application through launch Intentso that I can scan the barcode and return the data to my application. Very simple stuff; he did not work for a long time. I recently got an error via Play with the following stack trace:
java.lang.SecurityException: Permission Denial: starting Intent
{ act=com.google.zxing.client.android.SCAN cmp=com.ups.mobile.android/com.google.zxing.client.android.CaptureActivity }
from ProcessRecord{421bafc8 11687:edu.byu.dburner.lendablefree/10141}
(pid=11687, uid=10141) not exported from uid 10137
at android.os.Parcel.readException(Parcel.java:1327)
at android.os.Parcel.readException(Parcel.java:1281)
at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1736)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1383)
at android.app.Activity.startActivityForResult(Activity.java:3281)
at edu.byu.dburner.lendable.xxxxx.xxxx$2.onClick(xxxxxx.java:539)
at android.view.View.performClick(View.java:3644)
at android.view.View$PerformClick.run(View.java:14313)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4514)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
As far as I can tell from the stack trace, there is a problem with com.ups.mobile.android, which is a UPS application that also uses the Zxing application. I tried to install the UPS application and my device on the same phone and fire the event onClickwhere the problem occurred. Nothing significant happens, except that the selector asks me to choose a barcode scanning application or a UPS application to runIntent. , - , - , SecurityException. , , , , Zxing .
- , , ?
EDIT:
Per SeanOwen, -, IntentIntegrator. setTargetApplications. , Intent -: setTargetApplications(IntentIntegrator.TARGET_BARCODE_SCANNER_ONLY); .