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 6375147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:34:39+00:00 2026-05-25T01:34:39+00:00

I am new with Android programming and especially with PayPal. I got an application

  • 0

I am new with Android programming and especially with PayPal. I got an application that was tasked to troubleshoot – despite being new to Android, is crashing at this line:

initWithAppID(this.getBaseContext(), appID, PayPal.ENV_SANDBOX);

Firstly, PayPal.ENV_SANDBOX always returns a 0 which I am not sure if its suppose to. Secondly, why is it always crashing there? I have searched online for the reason, people says its because it did not fully initialized thats why its failing. Now I would like to know what I need to do if I cant initialize this library?

I am using Eclipse IDE, testing on a Samsung Galaxy Tab Android 2.2

  • 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-25T01:34:40+00:00Added an answer on May 25, 2026 at 1:34 am

    Don’t know if this will help but this is how I fixed it while testing with PayPal.ENV_NONE (from https://github.com/phonegap/phonegap-plugins/blob/master/Android/PayPalPlugin/src/com/phonegap/plugin/mpl.java)

    PayPal pp = PayPal.getInstance();
    if (pp == null) {
        try {
            pp = PayPal.initWithAppID(getApplicationContext(), "", PayPal.ENV_NONE);
        } catch (IllegalStateException e) {
            throw new RuntimeException(e);
        }
        pp.setShippingEnabled(false);
    }
    

    Then when creating the button:

    PayPal pp = PayPal.getInstance();
    CheckoutButton cb = pp.getCheckoutButton(
            getBaseContext(), 
            PayPal.BUTTON_194x37, 
            CheckoutButton.TEXT_PAY);
    cb.setOnClickListener(new OnClickListener() {
        PayPalPayment payment = new PayPalPayment();
        // set subtotal etc ...
        Intent i = PayPal.getInstance().checkout(payment,getApplicationContext());
        startActivityForResult(i, 1);
    });
    

    Hope that helps somehow

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

Sidebar

Related Questions

I know that eclipse can do this, can Intellij via the new Android support
I'm new to Android programming. I've seen different phones with different screen resolutions that
I'm very new to Android programming, so this is probably something pretty basic. I
I am new to android programming. In my application, i want to implement automatic
I'm new to android programming, but one thing that I can't seem to get
Am very new to Android programming, so sorry if this is a simple problem.
I am new in Android Programming and I am trying to include GTalk application
I'm completely new to Eclipse/Java/Android programming, so this might sound like a dumb question,
I'm trying to record audio this.recorder = new android.media.MediaRecorder(); this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); this.recorder.setOutputFile(pruebaAudioRecorder.mp4); **this.recorder.prepare();**
Firstly I am new to android and Java so this is a beginners question.

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.