开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜