Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8849841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:45:32+00:00 2026-06-14T12:45:32+00:00

Here is my code, I have a few questions as I am completely new

  • 0

Here is my code, I have a few questions as I am completely new to this whole service receiver thing.

It works fine. I get to checkout,I purchase, google says I will receive my item soon.

My question is that after the application gets closed, or after the activity that contains the handler is closed, will my app still receive the notification, and the gems be updated?

Any pointers or clues to better help me understand this would be awesome =D

I checked and my service is still running in the background, so this is good 🙂
But it is taking forever to update, or to receive

does anyone know?

Button bPurchase = (Button) findViewById(R.id.bPurchase);


    bPurchase.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            CheckBox confirm = (CheckBox) findViewById(R.id.bConfirm);
                    if (!confirm.isChecked()) {
                        Toast msg = Toast.makeText(PurchaseActivity.this, "Please Check Confirmation box", Toast.LENGTH_SHORT);
                        msg.setGravity(Gravity.CENTER, msg.getXOffset() / 2, msg.getYOffset() / 2);
                        msg.show();
                        return;
                    }
                    if(BillingHelper.isBillingSupported()){
                            BillingHelper.requestPurchase(mContext, "android.test.purchased");

                            // android.test.purchased or android.test.canceled or android.test.refunded
                    } else {
                            Log.i("","Can't purchase on this device");
                    }

        }
    });  


}


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

            if(BillingHelper.latestPurchase.isPurchased()){ 
                    long g = GemUpgrades.getGems();
                    g = g + 1000; 
                    GemUpgrades.setGems(g);

                    Toast msg1 = Toast.makeText(PurchaseActivity.this, "Received", Toast.LENGTH_SHORT);
                    msg1.setGravity(Gravity.CENTER, msg1.getXOffset() / 2, msg1.getYOffset() / 2);
                    msg1.show();
            } else { 
                   // Failure 
            } 
    };      
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:45:33+00:00Added an answer on June 14, 2026 at 12:45 pm

    SO I discovered that i was not receiving my calls because I forgot to set the Handler as the Handler. Also It seemed it updated outside the activity, and pretty quick too. But would it still update if the app has been closed before it gets its updat

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this code here: <table> <tr> <td width=200px valign=top> <div class=left_menu> <div
I have this code here printf '$request1 = select * from whatever where this
I have few questions regarding safety and correctness of following hypothetical timer service: @Singleton
I know a few questions have been asked like this one before, such as
I have read a few similar questions and answers, but none completely address my
I have a few questions: How do you get a certain char from a
Here is the code I have written for Rectangle class. class Rectangle (l: Double,
enter code here I have a table on SQL server 2005 with bigint primary
Here is the code I have to create an UIAlertView with a textbox. UIAlertView
Here's the code I have: var commandsBuffer = List[String]() commandsBuffer ::= cmd.exe commandsBuffer ::=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.