Created
January 27, 2011 01:11
-
-
Save brettnak/797869 to your computer and use it in GitHub Desktop.
AppStoreHQ Deals - Developer Guide Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.READ_CONTACTS" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.appstorehq.android.deals.api.AppStoreHQDealsController; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean onOptionsItemSelected( MenuItem item ) { | |
switch ( item.getItemId() ) { | |
case R.id.main_menu_deal_item: | |
Log.d( LOG_TAG, "Starting the AppStoreHQDealsController" ); | |
/** | |
* To kick off the Deals dialog flow call: | |
* | |
* AppStoreHQDealsController.processRebate( Context context, long appStoreHQAppId ); | |
* | |
* Arguments: | |
* | |
* Context context: | |
* The running context of this activity. Just pass the | |
* running instance of the current activity, ie: | |
* 'ReferenceImplementation.this' | |
* Of course, if you're still in scope ( like we are here ) | |
* you can just use 'this'. | |
* | |
* long appStoreHQAppId: | |
* The application id of your application on AppStoreHQ. | |
* You can find this from the URL of your application on AppStoreHQ. | |
* For example, AppESP's url is: | |
* http://www.appstorehq.com/appespbyappstorehq-android-334556/app | |
* and it's app id is 334556 | |
*/ | |
AppStoreHQDealsController.processRebate( | |
ReferenceImplementation.this, | |
ReferenceImplementation.sAppStoreHQAppId ); | |
break; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment