[TUT] Simple InApp Billing / Payment

Tutorials with advanced 'difficulty' and more Lines of Code.

Re: [TUT] Simple InApp Billing / Payment

Postby sarojini » Thu Feb 09, 2012 7:18 pm

Hi.,

It is very good work... keep it up............

I downloaded the in app purchase and ran in my device i got below error..........

Am new to in app purchse so please help me out from this one. its very urgent....

ERROR/BillingService(3741): Signature verification failed.
WARN/BillingService(3741): signature does not match data.
DEBUG/AndroidRuntime(3741): Shutting down VM

I put it my public key. even i got this error. but i dint enter my product id. where i have to put my product id?
if anyone face this issue please tell me. i have to finish this work tomorrow.



Please respond asap...
I
sarojini
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Feb 09, 2012 6:55 pm

Top

Re: [TUT] Simple InApp Billing / Payment

Postby Murali5115 » Mon Feb 27, 2012 3:24 pm

Hi can some one tell me how can i get the purchased item to be downloaded to my device after payment process is done with android market..
Murali5115
Freshman
Freshman
 
Posts: 4
Joined: Thu Jan 12, 2012 8:36 am

in android 2.3.3 and above market doesnot return to the main

Postby pixy » Thu Mar 22, 2012 11:10 am

Hi!
I've used blundell package in my project for in app billing, but the major issue I see is, it works fine with OS version 2.2 and lower but in Os 2.3.3 and above the market opens up in browser and the after purchase is successfully done it never returns control to my activity from which I invoked the following method if (BillingHelper.isBillingSupported()) {
BillingHelper.requestPurchase(mContext, "1");
}
pixy
Freshman
Freshman
 
Posts: 2
Joined: Thu Mar 22, 2012 10:58 am

Re: [TUT] Simple InApp Billing / Payment

Postby pixy » Thu Mar 22, 2012 11:18 am

Murali5115 wrote:Hi can some one tell me how can i get the purchased item to be downloaded to my device after payment process is done with android market..




if (BillingHelper.latestPurchase.isPurchased()) {
Toast.makeText(mContext, "Item purchased", Toast.LENGTH_LONG)
.show();

}

inside this if block only write your code to download your data, this check confirms that purchase was successful
pixy
Freshman
Freshman
 
Posts: 2
Joined: Thu Mar 22, 2012 10:58 am

Re: [TUT] Simple InApp Billing / Payment

Postby NightJumper » Wed Apr 04, 2012 12:55 pm

How do i make a callback so that when the service is initiated it enables my button
NightJumper
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Sep 05, 2010 7:54 pm

Re: [TUT] Simple InApp Billing / Payment

Postby blundell » Wed Apr 04, 2012 3:50 pm

Look at the onServiceConnected method, maybe have a handler that uses that.
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Re: [TUT] Simple InApp Billing / Payment

Postby NightJumper » Wed Apr 04, 2012 8:12 pm

Sorry Im not too great with services, so found the onserviceconnected method, what would I do to be able to call something from my main activity in there
NightJumper
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Sep 05, 2010 7:54 pm

Re: [TUT] Simple InApp Billing / Payment

Postby NightJumper » Thu Apr 05, 2012 12:42 pm

Im also getting a leaked serviceConnection everytime I close my app
NightJumper
Junior Developer
Junior Developer
 
Posts: 13
Joined: Sun Sep 05, 2010 7:54 pm

Re: [TUT] Simple InApp Billing / Payment

Postby Troog » Tue May 08, 2012 10:00 am

Hello,
I'm having quite the difficulty with trying to get this, as well as the dungeons example, to work on my phone. I've followed all the directions, as soon as I select the in-app billing example (it happens with the Simple InApp billing tutorial example and the Google Dungeons example), I get the "stopped unexpectedly" error right away. No window, no nothing, just the error and the force close button.

I have the HTC Droid Incredible 2 version 2.3.4, Google Play Store 3.5.16, and the email attached to the phone is not my dev email, and is set for testing.

Just to let you know, all I want is to make a very simple app that lets people donate $1-$2 for the free app I created, if they so wish. Trying to figure this billing stuff is a nightmare.

Any assitance is greatly appreciated.
Thanks,

troog
Troog
Once Poster
Once Poster
 
Posts: 1
Joined: Tue May 08, 2012 9:47 am

Re: [TUT] Simple InApp Billing / Payment

Postby ducy » Fri Jul 06, 2012 4:55 pm

it possible to test the Android in-app billing from an unsupported
county?

I'm currently using my Samsung Galaxy S and I have updated the market
to the latest version (3.7.13) but I still receive the following
message "The Market billing service is not available at this time. You
can continue to use the app but you won't be able to make purchases."

I'm trying this on 2 different applications, one of them is the Sample
application provided by Android Dev Guide, I'm currently living in
Serbia.

Thank you for your help :)
ducy
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jul 06, 2012 4:50 pm

Re: [TUT] Simple InApp Billing / Payment

Postby blundell » Sat Jul 07, 2012 1:33 pm

The market version will be specific to your country so, no billing is not supported
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: [TUT] Simple InApp Billing / Payment

Postby Melanogaster » Sun Sep 02, 2012 12:54 am

Hi, now I learn how to purchase an in-app item...
But how do I check if xyz item has been purchased?
Could someone help me please?

I have
Code: Select all
   public Handler mTransactionHandler = new Handler() {                     {
           public void handleMessage(android.os.Message msg)
           {
                   Log.i(TAG, "Transaction complete");
                   Log.i(TAG, "Transaction status: "+BillingHelper.latestPurchase.purchaseState);
                   Log.i(TAG, "Item attempted purchase is: "+BillingHelper.latestPurchase.productId);

                   if( BillingHelper.latestPurchase.productId.equals( cl_config.ID_PRODUCT_VIDEO ) )
                   {
                            // SET SHARED PREFERENCE TO "TRUE" = item purchased
                        }
         else
         {
                            // SET SHARED PREFERENCE TO "FALSE" = item NOT purchased
         }
};     
};

and I call that Handler with
Code: Select all
Thread thread = new Thread(this);
thread.start();

because my Activity class implements Runnable:
Code: Select all
   @Override
   public void run()
   {
      mTransactionHandler.sendEmptyMessage(0);
   }


It this correct? If not, how to check if an item has been purchased?
I hope in someone that will help me
Melanogaster
Freshman
Freshman
 
Posts: 3
Joined: Sat Oct 01, 2011 1:30 pm

Re: [TUT] Simple InApp Billing / Payment

Postby maxgreen » Thu Sep 13, 2012 10:38 am

This is a really good tutorial.

There is a also another resource called The SOOMLA Project - http://project.soom.la. It's an open source for in app billing for Android that can be used either as a reference or as a library/sdk.
maxgreen
Freshman
Freshman
 
Posts: 2
Joined: Thu Sep 13, 2012 10:36 am

Re: [TUT] Simple InApp Billing / Payment

Postby nscherer » Mon Mar 11, 2013 4:11 pm

I hope you're still monitoring this. I tried out the apk but got an error (forget what it was). So I dropped your code into my app where I have remote logging. It's not recognizing billing as being supported, and logging the message "BillingHelper not fully instantiated". It appears that neither BillingService.onServiceConnected nor BillingService.onCreate is being called. I'm doing this in my onCreate:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. startService(new Intent(this, BillingService.class));
  2. BillingHelper.setCompletedHandler(mTransactionHandler);
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Is there something else I'm missing to get the service started? One note is that in BillingService.onCreate I changed this line:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. boolean bindResult = bindService(new Intent("com.android.vending.billing.MarketBillingService.BIND"), this, Context.BIND_AUTO_CREATE);
  2.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4

to this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. boolean bindResult = getApplicationContext().bindService(new Intent("com.android.vending.billing.MarketBillingService.BIND"), this, Context.BIND_AUTO_CREATE);
Parsed in 0.034 seconds, using GeSHi 1.0.8.4


In previous efforts I found that inside a TabHost type activity group you have to bind that way. Other than that and the remote logging calls I haven't changed your code.
nscherer
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Mar 11, 2013 4:04 pm

Re: [TUT] Simple InApp Billing / Payment

Postby kenglang » Fri Apr 12, 2013 5:27 am

ratso wrote:Awesome
5 stars
A+++

...problem though, i can't seem to get past a
Code: Select all
04-06 22:44:17.007: ERROR/BillingService(17146): Market Billing Service could not be bound.

for some reason

any likely causes?

i have the aidl file in the same place as your sample app, and i'm using essentially the same code as the sample app you posted, the only thing i changed was my public key.


Me too seen this error when run example on emulator. Not support on emulator. Need run it on device.
kenglang
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Apr 12, 2013 2:56 am

Top
Previous

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests