/ note • DEMO @ OSDC.tw (4/15) • Launch @ Google Play Store (9/1) • In-app purchase: $1.99USD • LINE Camera (4/12) http://pkg.to/com.corner23.android.fourshots 13
/ note • DEMO @ OSDC.tw (4/15) • Launch @ Google Play Store (9/1) • In-app purchase: $1.99USD • LINE Camera (4/12) http://pkg.to/com.corner23.android.fourshots 14
@Override public void onOk(AmbilWarnaDialog dialog, int color) { // color is the color selected by the user. } @Override public void onCancel(AmbilWarnaDialog dialog) { // cancel was selected by the user } }); dialog.show(); 42
= (ViewPager)findViewById(R.id.pager); pager.setAdapter(new TestAdapter(getSupportFragmentManager())); //Bind the title indicator to the adapter TitlePageIndicator titleIndicator = (TitlePageIndicator)findViewById(R.id.titles); titleIndicator.setViewPager(pager); titleIndicator.setOnPageChangeListener(mPageChangeListener); 48
is for a standard in-app product request.putString(ITEM_TYPE, "inapp"); // Note that the developer payload is optional. if (mDeveloperPayload != null) { request.putString(DEVELOPER_PAYLOAD, mDeveloperPayload); } Bundle response = mService.sendBillingRequest(request); 128
{ String action = intent.getAction(); if (ACTION_PURCHASE_STATE_CHANGED.equals(action)) { String signedData = intent.getStringExtra(INAPP_SIGNED_DATA); String signature = intent.getStringExtra(INAPP_SIGNATURE); // Do something with the signedData and the signature. } else if (ACTION_NOTIFY.equals(action)) { String notifyId = intent.getStringExtra(NOTIFICATION_ID); // Do something with the notifyId. } else if (ACTION_RESPONSE_CODE.equals(action)) { long requestId = intent.getLongExtra(INAPP_REQUEST_ID, -1); int responseCodeIndex = intent.getIntExtra(INAPP_RESPONSE_CODE, ResponseCode.RESULT_ERROR.ordinal()); // Do something with the requestId and the responseCodeIndex. } else { Log.w(TAG, "unexpected action: " + action); } } 132
is for a standard in-app product request.putString(ITEM_TYPE, "inapp"); // Note that the developer payload is optional. if (mDeveloperPayload != null) { request.putString(DEVELOPER_PAYLOAD, mDeveloperPayload); } Bundle response = mService.sendBillingRequest(request); 136