1

I use 2 others applications called zxing for barcode and a pdf viewer from my application.

I know how to check if application are used :

And if the package isn't installed, I propose the installation for the user :

private static void showDownloadDialog(final Activity activity,
                                         String stringTitle,
                                         String stringMessage,
                                         String stringButtonYes,
                                         String stringButtonNo) {
    AlertDialog.Builder downloadDialog = new AlertDialog.Builder(activity);
    downloadDialog.setTitle(stringTitle);
    downloadDialog.setMessage(stringMessage);
    downloadDialog.setPositiveButton(stringButtonYes, new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialogInterface, int i) {
        Uri uri = Uri.parse("market://search?q=pname:com.google.zxing.client.android");
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        activity.startActivity(intent);
      }
    });
    downloadDialog.setNegativeButton(stringButtonNo, new DialogInterface.OnClickListener() {
      public void onClick(DialogInterface dialogInterface, int i) {}
    });
    downloadDialog.show();
  }

I use google play but I deployed my application on google play, amazon app shop and bb world.

How can I modify that code to handle every market according from the source ?

I found that type of code for amazon How to conditionally use vendor-specific APIs for Android apps? (but I didn't find it for bbworld)

For Amazon, I can make a link and I think it is the same : How can I do an Amazon App Store search using an Intent and filter it by developer name?

For Bb10, it seems to be more difficult 1) I didn't find how to know if the app was downloaded from blackberry world 2) it seems that I don't have the same permission

https://supportforums.blackberry.com/t5/Android-Runtime-Development/How-to-detect-BB10-app-already-installed-using-a-ported-android/td-p/2765551

Community
  • 1
  • 1
P. Sohm
  • 2,842
  • 2
  • 44
  • 77

0 Answers0