Reputation: 121
I am developing an application which needs to click a picture of barcode and then decode it. I need to call the barcode scanner app which i have already downloaded and for which i have the barcode scanner apk. I need to call this apk in the source code of my application. Is it possible? How can i do this?
Upvotes: 0
Views: 521
Reputation: 2789
You can call a third party application's activity in the following way.
final Intent intent = new Intent(BarcodeSanner package name);
intent.setComponent(new ComponentName("BarcodeSanner package name","BarcodeSanner activity name"));
startActivity(intent );
you can catch exception if the application is not there in you phone
Upvotes: 1