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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:19:02+00:00 2026-06-16T07:19:02+00:00

Using this code, I try to set alarmmanager to stars Notify.class at 25/12/2012 –

  • 0

Using this code, I try to set alarmmanager to stars Notify.class at 25/12/2012 – 15.15 but when I use this code no Notify.class starts. Where’s the problem?

Calendar cal = Calendar.getInstance(TimeZone.getDefault(), Locale.getDefault());

    cal.set(Calendar.DATE,25); 
    cal.set(Calendar.MONTH,Calendar.DECEMBER);
    cal.set(Calendar.YEAR,2012);
    cal.set(Calendar.HOUR_OF_DAY, 15);
    cal.set(Calendar.MINUTE, 15);     
    cal.set(Calendar.SECOND, 00);     

Intent intent3 = new Intent(context, Notify.class);
    PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0,intent3, 0);
alarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), pendingIntent);

Manifest:

<activity android:name="Notify"></activity>
<receiver android:name="AlarmReceiver" >
            <intent-filter>
                <action android:name="com.example.AlarmReceiver" />
            </intent-filter>
  • 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-16T07:19:03+00:00Added an answer on June 16, 2026 at 7:19 am

    you should write this

    <receiver android:name="com.example.AlarmReceiver" android:enabled="true">
            <intent-filter>
                <action android:name="AlarmReceiver"/>
            </intent-filter>
    </receiver>
    

    You have switched android:name for receiver and it’s intent filter. You may replace com.example.AlarmReceiver with .AlarmReceiver

    after you have made this change in your manifest, whatever code you have written inside onReceive() method of your broadcast receiver com.example.AlarmReceiver will get executed.

    What your code will do is it will set alarm manager for the specified date-time. At that moment it will fire an intent with action name AlarmReceiver. Your Broadcast receiver is in Manifest so it will catch the broadcast and execute it’s onReceive() Method.

    If you want to start an activity write context.startActivity(…) inside onReceive().

    Edit: also change your intent to this:

    Intent intent3 = new Intent("AlarmReceiver");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this bit of code to try and set a policy file: ClassLoader cl=
I'm using this code and I'm beyond frustration: try { $dbh = new PDO('mysql:dbname='
I'm using this piece of code to try and save an image to the
I am currently using code similar to this: try { // IE ONLY var
Using this code var html='<div class=somediv></div>'; var target=document.getElementById('contentArea'); target.appendChild(html); I'm getting Uncaught Error: NOT_FOUND_ERR:
Using this php code: try{ $dbh = new PDO(mysql:host=$host;dbname=$dbname,$user,$pass); $dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); //
I am trying to cache these images using this code... But i keep getting
I've been using this code to try and get data from the google weather
I try to use VLCj to get access to web-cameras. I am using this
I have this code: try { using (FileStream fs = File.Create(path)) { } File.Delete(pathToStore);

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.