Print

Intents are used to connect different components of your application. For example, You can use intents to encourage users to install your app or submit a comment. This guide shows you how to use Bazaar intents for various purposes.

Referring to an app

Use the following intent to redirect users to your application. If users have already installed the Bazaar application on their devices, Bazaar will open and display your app's page automatically.

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("bazaar://details?id=" + PACKAGE_NAME)); 
intent.setPackage("com.farsitel.bazaar"); 
startActivity(intent);
Note: Put your app’s package name in place of “PACKAGE NAME.” 

Referring to review page of an app

Use the following intent to redirect users to the review page of your app.

Intent intent = new Intent(Intent.ACTION_EDIT); 
intent.setData(Uri.parse("bazaar://details?id=" + PACKAGE_NAME)); 
intent.setPackage("com.farsitel.bazaar"); 
startActivity(intent);

Referring to developer's apps page

Use the following intent to redirect users to the developer’s apps page.

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("bazaar://collection?slug=by_author&aid=" + DEVELOPER_ID)); 
intent.setPackage("com.farsitel.bazaar"); 
startActivity(intent);
Note: You can set up your developer_ID in the "Developer Account" tab of your panel. 

Referring to Bazaar's login page

Use the following intent to redirect users to their page on Bazaar. 

Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setData(Uri.parse("bazaar://login")); 
intent.setPackage("com.farsitel.bazaar"); 
startActivity(intent); 

Was this content helpful?
Write your comment here...

If you have any comment on this content or any idea to make it better, use this form to send us your comment.

Publish Date: 1400-03-29 07:51

Latest Update: 1400-07-18 17:34