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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:56:16+00:00 2026-06-04T21:56:16+00:00

I am trying to make a second page show up via a BroadcastReceiver, but

  • 0

I am trying to make a second page show up via a BroadcastReceiver, but the App keeps crashing and I don’t know why.
This might be a problem of the correct context.

public class ScreenReceiver extends BroadcastReceiver {

@Override
public void onReceive(Context context, Intent intent) {

        if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
            Log.v("$$$$$", "In Method: ACTION_SCREEN_OFF");

        } else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) {
                    Log.v("$$$$$", "In Method: ACTION_SCREEN_ON");
            changeActivity(context);
        } else if (intent.getAction().equals(Intent.ACTION_USER_PRESENT)) {
                    Log.v("$$$$$", "In Method: USER_PRESENT");
        }
    }

public void changeActivity(Context context) {

    Intent intent = new Intent(context, Second_Page.class);

    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

    context.startActivity(intent);
    }
}

My Manifest. In there I declare the class that the log file states is missing:

    <uses-sdk android:minSdkVersion="14" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".CatchUnlockActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="second_page" >
        </activity>
    </application>

</manifest>
  • 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-04T21:56:17+00:00Added an answer on June 4, 2026 at 9:56 pm

    Found the solution:
    The declaration of the classes is case-sensitive!

    Changed every occurrence from “second_page” to “Second_Page” and now it works.

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

Sidebar

Related Questions

I'm currently trying to make a page via php which allows the user to
I'm trying to make a simple in in-page popup called like this: var test
i'm trying to make my second website using php and i'm stuck at some
I'm trying to make an alert show three seconds after the user touches a
I am fairly new to iOS development and trying make a simple app which
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to make a simple number clicker control for BlackBerry 6/7, like this: At
I'm trying to test in app purchases in our app but I'm not having
im trying to make a div fade out and then have a second div
I'm trying to make a LazyList EndlessList but using a sectioned adapter...The sections will

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.