Code example for Bundle

Methods: putIntputLongputString

0
    public boolean isSuccess() { 
    	return success;
    } 
     
    protected Bundle makeRequestBundle() {
        final Bundle request = new Bundle();
        request.putString(KEY_BILLING_REQUEST, getRequestType());
        request.putInt(KEY_API_VERSION, getAPIVersion());
        request.putString(KEY_PACKAGE_NAME, packageName);
        if (hasNonce()) { 
    		request.putLong(KEY_NONCE, nonce);
        } 
        return request;
    } 
     
    public void onResponseCode(ResponseCode responde) {
    	// Do nothing by default 
	} 
     
    protected void processOkResponse(Bundle response) {    	
    	// Do nothing by default 
    } 
     
    public long run(IMarketBillingService mService) throws RemoteException {
        final Bundle request = makeRequestBundle();
        addParams(request);
        final Bundle response;
        try { 
            response = mService.sendBillingRequest(request);        	
        } catch (NullPointerException e) {
    		Log.e(this.getClass().getSimpleName(), "Known IAB bug. See: http://code.google.com/p/marketbilling/issues/detail?id=25", e);
        	return IGNORE_REQUEST_ID;        	
        }