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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:30:05+00:00 2026-06-02T04:30:05+00:00

Hey, so I have been making an application which sends weekly notifications at user-specified

  • 0

Hey, so I have been making an application which sends weekly notifications at user-specified times.

I have followed plenty of tutorials and seem to have read the same thing over and over, I just cant seem to get it to work. My application crashes when I call the new intent. Am I doing something wrong? is this the correct method of accomplishing this task?

public class AlarmService extends Activity
{ 

    /// unimportant working code not added

    Intent mintent = new Intent(context, mBroadcastReceiver.class);
    Log.d(TAG, "Got Intent");
    /// I receive a log just before this portion but do not receive this one

    startActivity(PAintent);
    Log.d(TAG, "StartActivity(intent)");

    PendingIntent mPendingIntent = PendingIntent.getActivity(getApplicationContext(), ALARMID,
        mintent, PendingIntent.FLAG_CANCEL_CURRENT);
    Log.d(TAG, "Got Pending intent");

    AlarmManager mAlarm = (AlarmManager) getSystemService(ALARM_SERVICE);
    Log.d(TAG, "Got alarmmanager");

    ///// remember to change time back to: (7 * 24 * 60 * 60 * 1000)
    mAlarm.setRepeating(AlarmManager.RTC_WAKEUP,
    ALARM_TIME.getTimeInMillis(), (30 * 1000),
    mPendingIntent);
    Log.d(TAG, "Made Pending intent");
    ...
}

keep in mind I renamed my intent, pendingintent, and alarm manager in this code for easier reading!

I keep receiving a null pointer exception, my debug looks like this:

03-05 13:20:45.132: E/AndroidRuntime(12734): FATAL EXCEPTION: main
03-05 13:20:45.132: E/AndroidRuntime(12734): java.lang.NullPointerException
03-05 13:20:45.132: E/AndroidRuntime(12734):    at android.content.ComponentName.<init>(ComponentName.java:75)
03-05 13:20:45.132: E/AndroidRuntime(12734):    at android.content.Intent.<init>(Intent.java:2720)
03-05 13:20:45.132: E/AndroidRuntime(12734):    at com.theStudyBuddy.Ignite.AlarmService.PlannerAssistantOn(AlarmService.java:148)
03-05 13:20:45.132: E/AndroidRuntime(12734):    at com.theStudyBuddy.Ignite.EditScheduleActivity.saveClass(EditScheduleActivity.java:635)
03-05 13:20:45.132: E/AndroidRuntime(12734):    at com.theStudyBuddy.Ignite.EditScheduleActivity.onClick(EditScheduleActivity.java:583)
03-05 13:20:45.132: E/AndroidRuntime(12734):    at android.view.View.performClick(View.java:2485)

… and so on

if anyone could point out my error it would be greatly appreciated!

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

    startActivity(PAintent); where is PAintent? Do you create it?

    To start a Scheduled Activity: you can see this link:
    Android : AlarmManager not start

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

Sidebar

Related Questions

Hey guys i have a question which i have been looking for the answer
Hey everyone I am making my first applet for java today. I have been
Hey so I have been working on a project that I want to be
Hey all, I have been doing nothing but web development over the last few
Hey all, i have been trying for a few minutes on this problem and
hey people I'm new at jquery and i have been trying to figure this
Hey I've been making a quiz on php and mysql... I've used the CURRENT_TIMESTAMP
Hey guys, lately I have been asking quite a few questions about memory management
Hey guys i have been trying to download it from the below link http://www.enterprisedb.com/products-services-training/pgdownload
Hey, I have been looking on google and I cannot seem to find anything

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.