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

  • Home
  • SEARCH
  • 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 6098041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:06:42+00:00 2026-05-23T13:06:42+00:00

https://github.com/robotmedia/AndroidBillingLibrary I’ve created separate Billing class: public class Billing extends AbstractBillingActivity { private static

  • 0

https://github.com/robotmedia/AndroidBillingLibrary

I’ve created separate Billing class:

public class Billing extends AbstractBillingActivity {
    private static final String TAG = "Billing";

    public Billing() {
    }

    @Override
    public void onBillingChecked(boolean supported) {
        Log.i(TAG, "Billing supported: " + supported);
    }

once user presses button in Preferences I do:

    Preference buyPref = (Preference) findPreference("pref_billing_buy");
    buyPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
        public boolean onPreferenceClick(Preference preference) {   
            if (Debug.Yes) Log.d(TAG, "Buying ad-free version");
            Billing billing = new Billing();
            billing.checkBillingSupported();

            return true;
        }
    });

and getting the following error:

07-04 20:21:22.797: ERROR/AndroidRuntime(7172): FATAL EXCEPTION: main
07-04 20:21:22.797: ERROR/AndroidRuntime(7172): java.lang.NullPointerException
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.content.ContextWrapper.getPackageName(ContextWrapper.java:120)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at net.robotmedia.billing.BillingService.getActionForIntent(BillingService.java:76)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at net.robotmedia.billing.BillingService.createIntent(BillingService.java:69)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at net.robotmedia.billing.BillingService.checkBillingSupported(BillingService.java:58)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at net.robotmedia.billing.BillingController.checkBillingSupported(BillingController.java:114)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at net.robotmedia.billing.AbstractBillingActivity.checkBillingSupported(AbstractBillingActivity.java:42)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at spb.bridges.Preferences$1.onPreferenceClick(Preferences.java:212)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.preference.Preference.performClick(Preference.java:812)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:198)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.widget.AdapterView.performItemClick(AdapterView.java:284)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.widget.ListView.performItemClick(ListView.java:3382)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.widget.AbsListView$PerformClick.run(AbsListView.java:1696)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.os.Handler.handleCallback(Handler.java:587)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.os.Handler.dispatchMessage(Handler.java:92)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.os.Looper.loop(Looper.java:144)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at android.app.ActivityThread.main(ActivityThread.java:4937)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at java.lang.reflect.Method.invokeNative(Native Method)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at java.lang.reflect.Method.invoke(Method.java:521)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-04 20:21:22.797: ERROR/AndroidRuntime(7172):     at dalvik.system.NativeStart.main(Native Method)

What is wrong in my code?

Also, documentation says

When started your
AbstractBillingActivity subclass will
check if in-app billing is supported,
followed by a call to
onBillingChecked(boolean), which has
to be implemented by the subclass.

But actually onBillingChecked() is not called.

  • 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-05-23T13:06:43+00:00Added an answer on May 23, 2026 at 1:06 pm

    I should be reading documentation more carefully:

    AbstractBillingActivity is an abstract
    activity that provides default
    integration with in-app billing.

    So, it is started to work when I’ve replaced in my code extends Activity with extends AbstractBillingActivity (actually since I’ve used PreferenceActivity, not just Activity, I had to edit AbstractBillingActivity also).

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

Sidebar

Related Questions

I created this repo: https://github.com/meltzerj/Dreamstill that appears on my profile but not on the
So I downloaded a wrapper class from this github link: https://github.com/ignaciovazquez/Highrise-PHP-Api and I'm just
I'm using https://github.com/abraham/twitteroauth library. I already created my app on Twitter, the callbacks are
MvcSiteMap - https://github.com/maartenba/MvcSiteMapProvider [originally at: http://mvcsitemap.codeplex.com/] Is it possible to create such links in
Seems like both EnyimMemcached ( https://github.com/enyim/EnyimMemcached ) and BeITMemcached ( http://code.google.com/p/beitmemcached/ ) are popular
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I'm using Cufon ( https://github.com/sorccu/cufon/wiki/about ) to use special fonts in my website. But
I'm using facebox ( https://github.com/defunkt/facebox ) for calling web pages in modal window. Is
I'm using clearance ( https://github.com/thoughtbot/clearance/wiki ) for authentication in my rails app. But I'm
Here's are examples of git workflows: https://github.com/bard/sameplace/wiki/typical-git-workflow http://www.nabble.com/Git-workflow-overview-td16340337.html http://osteele.com/archives/2008/05/my-git-workflow Let's say you wanted to

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.