Guide to use Bazaar Intents

This guide shows how you can use Bazaar Intent for various purposes.

 

1 - Referring to an app

By running this code, Bazaar will open and display app's page. This works only if user has already Bazaar installed on her/his device, otherwise an error will occur.

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

 

2 - Referring to review page of an app

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

 

3 - Referring to 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);

 

You can also view developer's apps using this link:

http://cafebazaar.ir/developer/DEVELOPER_ID

You can setup your developer_ID in "Developer Account" tab of your panel. 

 

4 - Referring to Bazaar's login page

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