Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Posts: 15
Registered: ‎04-18-2012
My Device: 9800
My Carrier: Airtel

How to detect BB10 app already installed using a ported android app?

I have an Android Application which will detect whether a third party application(com.mypackage.myactivity) is installed or not, after that it launches that application. So the Android Code is


PackageManager pm = ctx.getPackageManager();
boolean app_installed =false;
try{ pm.getPackageInfo("com.mypackage.myactivity",PackageManager.GET_ACTIVITIES); app_installed =true;
} catch(PackageManager.NameNotFoundException e){ app_installed =false;


IntentLaunchIntent= getPackageManager().getLaunchIntentForPackage("com.mypackage.myactivity"); startActivity(LaunchIntent);}

This works fine for Android. But when I convert my apk to bar file and then install it on a BB10 device then it doesn't recognises whether the application is installed or not.

Do i need to change the package name?

Please advice on this.