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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:02:04+00:00 2026-06-06T04:02:04+00:00

I am creating an app that is a ticket sales system. On the checkout

  • 0

I am creating an app that is a ticket sales system. On the checkout page (the PaymentScreen activity) a check is performed to ensure that the customer is signed into their account, and if they are not, they are redirected to log in before continuing to checkout.

When I check to see if a customer is signed in, the code correctly verifies that the customer is not signed in, and then executes that if function (I can tell from LogCat), but the activity is never launched and the code continues to execute.

Any help would be appreciated – I can’t seem to figure this one out.

PaymentScreen.java:

public class PaymentScreen extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {   
    super.onCreate(savedInstanceState);
    setContentView(R.layout.paymentscreen);

    if(Singleton.getInstance().selected_city == null) {
        PaymentScreen.this.startActivity(new Intent().setClass(PaymentScreen.this, CityList.class));
    }
    if(Singleton.getInstance().selected_venue == null) {
        PaymentScreen.this.startActivity(new Intent().setClass(PaymentScreen.this, VenueList.class));
    }
    if(Singleton.getInstance().selected_event == null) {
        PaymentScreen.this.startActivity(new Intent().setClass(PaymentScreen.this, EventList.class));
    }
    if(Singleton.getInstance().customer == null) {
        PaymentScreen.this.startActivity(new Intent().setClass(PaymentScreen.this, LoginScreen.class).putExtra("sendToActivity", "PaymentScreen"));
        Log.d("LineBouncer", "in if statement and (customer == null) is true");
    }
    if(Singleton.getInstance().customer == null) {
        Log.d("LineBouncer", "customer is null");
    }
    new GetPrepurchaseId().execute();
}
}

LogCat:

06-19 02:10:22.972: D/LineBouncer(3102): in if statement and (customer == null) is true
06-19 02:10:22.972: D/LineBouncer(3102): customer is null

AndroidManifest.xml:

    <activity android:name=".CityList" android:label="@string/app_name"></activity>
    <activity android:name=".LoginScreen" android:label="@string/app_name"></activity> 
    <activity android:name=".CreateAccount" android:label="@string/app_name"></activity> 
    <activity android:name=".VenueList" android:label="@string/app_name"></activity> 
    <activity android:name=".EventList" android:label="@string/app_name"></activity>
    <activity android:name=".EventDetails" android:label="@string/app_name"></activity>
    <activity android:name=".PaymentScreen" android:label="@string/app_name"></activity>
    <activity android:name=".OrderHistory" android:label="@string/app_name"></activity>
    <activity android:name=".PassView" android:label="@string/app_name"></activity>

So clearly from the LogCat the program recognizes that the customer is null and runs over the StartActivity code, but then continues to run and never actually starts that activity.

Thanks!

  • 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-06T04:02:06+00:00Added an answer on June 6, 2026 at 4:02 am

    The right way to start activity is as follows:

    Intent intent = new Intent(PaymentScreen.this, EventList.class);
    startActivity(intent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an app that's supposed to show the Open Balance, if the customer
I'm creating android app that has table layout for the main activity, and that
I am creating an app that it is throwing an error, activity is not
I'm creating a app that uses a Master Page. But when i go to
I am creating an app that will point a simple arrow in the direction
I am creating an app that allows users to create and apply for jobs.
I'm creating an app that should list the date and time when a button
I am creating an app that alerts user if he has been stationary for
I'm creating an app that uses ActionBarSherlock. The app consists of three tabs, and
I am creating an app that requires some settings to be set first before

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.