Integrating an apk with another source code for Android Development
I am developing an application which needs to click a picture of barcode and then decode it. I need to ca开发者_运维技巧ll 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?
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
精彩评论