Android :: AlarmManager Not Firing Receiver

Feb 27, 2010

Any experts on AlarmManager out there?I've got something weird going on.The basic code to set my repeating alarm works fine. I can close my app and the alarm will continue to run like clockwork every five minutes. It works fine only if I set it in the app and then close the app.I've got a registered BootReceiver for re-registering the repeating alarm. I know it fires on boot b/c the log message clearly shows it is firing and re-setting the repeating alarm in question for the same frequency. But the AlarmManager is not firing.Basically, the nearly identical code for setRepeating() fires when set from the app and continues to run when the app is closed, so I know my AlarmReceiver is functioning, but the AlarmManager is either not broadcasting this alarm or my receiver doesn't work from an alarm set in the boot receiver.

Android :: AlarmManager Not Firing Receiver


Android :: Broadcast Receiver - Create A Broadcast Receiver Which Responds To System Events

Sep 28, 2009

trying to create a broadcast receiver which responds to system events and change system settings. I don't need any interaction from the user so I don't need an activity and have been trying to do everything through the manifest file. I've put a log event into my onReceive method but it never logs anything so I'm presuming my method is never called. I've tried this with both the 1.5 and 1.6 SDKs. I was hoping somebody could have a look at my code please and let me know if there are any problems.

View 2 Replies View Related

Android :: OnTrackballEvent Not Firing?

Nov 15, 2010

I have a list in my app.

When a user touches a list item with their finger, the onListItemClick handler fires and I have it opening a new Activity.

However, when a user uses the trackball/pad to click, I want to perform some different functionality. I've overrode onTrackballEvent and everything works perfectly fine in the emulator's trackball mode.

Unfortunately, when testing on the Samsung Moment, clicking the trackpad fires the onListItemClick handler, not the onTrackballEvent handler.

View 2 Replies View Related

Android :: OnClick Event Not Firing?

Sep 20, 2010

I have a listview managed by an adapter that is extending BaseAdapter.

In the getview function im using the convertView to set up a OnClickListener. This OnClickListener work well when I am touching the screen but if I use the trackball of the HTC Desire, I see the row flashing on the screen, but the OnClickListener is not called...

I've read the android dev guide : http://developer.android.com/guide/topics/ui/ui-events.html
and its say that I should receive a onClick event from the trackball...

Im putting here my getview code in case someone see anything strange.

CODE:..............................

View 1 Replies View Related

Android :: OnClickListener Not Firing In GridView - 2.2 Only

Aug 8, 2010

I have a grid view of buttons that is generated by a CursorAdapter. When the CursorAdapter is passed to the Gridview the view renders correctly however the first item in the grid does not fire the OnClickListener event.

If I select another button in the grid, the event fires correctly however if I selected the first button then another button, it loads the first button action then the section button action.

When testing this, it only seems to be an issue in Android 2.2 on my emulator, my 1.5 phone works as expected. I've wiped the emulator but that doesn't seem to have made a difference.


CODE:.............

View 1 Replies View Related

Android :: Firing An Event By Code?

Sep 25, 2010

Is any way to build and fire an event (e.g. on click event) in android applications programmatically.

I have an Activity (lets call it A) with multiple views (5 ImageView for example). And a normal Java class (lets call it B) which is used by my Activity. here is an instance of B in my Activity. If user click on a View (Image View) the view OnClickListener calls a method in B In B, if operation is successful, it will call back a method in activity again. in activity method, It will change image or state for clicked ImageView.

I the other hand: click on view (x) in Activity -------> B.doSomething() --------> A.bIsDone() -----> change image for view (x) with normal execution, its working and there is no problem. the problem is that I want to simulate this process to be automatic, my code looks like this:

CODE:.............

The issue is that, it won't render anything, until the end of the loop.

I tried to put the loop in another Thread, but its throwing exception: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

What can i do for this issue? i was think generate an click event on view (by code), to see it can help or not.

View 3 Replies View Related

Android :: ProtoRequestListener Firing WatchDogException ?

Dec 3, 2009

My app has been pretty stable for a while, and today out of the blue something called ProtoRequestListener has started intermittently throwing WatchDogExceptions. there's no path through to my code, so i can't even catch the exception and do something about it. i googled around a bit and it seems to be connected to Maps somehow.

View 2 Replies View Related

Android :: Clicks To MapView To Firing OnClick

Dec 10, 2009

I am working on my first android app and so my first with the Maps API and am experiencing an odd problem. How ever when I click the screen it seems the onClick event is not being run?Have I missed something or am I better off sub classing the MyLocationOverlay I am using and override DispatchTap?How ever i would rather be able to just click anywhere on the map to dispatch the event.

View 6 Replies View Related

Android :: Add Proximity Alert Firing Repeatedly

Jun 10, 2010

I am adding a proximity Alert with an expiration of -1 (does not expire). I am testing using an Evo. The proximity Alert fires several times after entering the location and staying inside the location. I was thinking that the proximity alert should fire once when you enter the location and fire once when you exit the location. Should the proximity alert fire multiple times after you enter the location and stay inside of the location?

View 2 Replies View Related

Android :: TOUCH_MOVE Event Not Firing In Avd Or Device

Sep 30, 2010

In fact, only the touch_down event will fire. Basically, I'm trying to implement a drag feature in my app so I need the touch_move event. I have a method that writes out the touch events to the LogCat in Eclipse but the touch_down is the only event that shows up. not even touch_up shows up. I have this problem when I debug on the device or in the avd.

This isn't really a code question. But has anyone had an issue getting different touch events to fire? If so, how did you resolve them? I'm using the latest Android SDK and Eclipse version. I'm using a simple ImageView.

View 1 Replies View Related

Android :: Browser Orientationchange Event Keeps Firing

Oct 28, 2010

Following is simple html, when viewed on android browser(nexus one) results into continuos orientationchange event chain when you change phone's orientation just once.

CODE:........................

View 1 Replies View Related

Android :: OnClickListener Not Firing From Parent Class

Aug 17, 2010

A Follow up to this question: http://stackoverflow.com/questions/3488880/group-of-views-controls-on-multiple-screens

I have created a parent class and a child class that inherits from it. When I set the OnClickListener in the child class, the event fires when the button is clicked. When I move the set OnClickListener to the parent class, the event doesn't fire. I've got to be missing something obvious but I just don't see it.

CODE:............

Child Class:

CODE:.........................

View 2 Replies View Related

Android :: Ignore OnItemSelectedListener Firing On Create

Mar 3, 2010

I'm creating a spinner and I've added an OnItemSelectedListener to it. However I've noticed that it fires on create. Now I was wondering if there was a way to ignore/discard it. I know I could use a boolean value, but that's a bit "dirty".

View 1 Replies View Related

Android :: OnTouch Event Sometimes Not Firing ACTION_POINTER_DOWN

Jul 9, 2010

I'm trying to implement pinch-zoom in an app I'm making and am having issues with the onTouch event. It appears that the pointer up & down actions do not fire immediately, like you won't get a pointer up or down until an action move occurs. So what happens if both fingers hit the screen nearly simultaneously is that the 2nd finger (should be pointer(1)) gets a move action before pointer down is called, making the code think it's a DRAG not a pinch zoom.

View 2 Replies View Related

Android :: Choosing Between Requery Or Firing The Query Again In SQLite

Jun 19, 2010

Have been using a SQLite database, Theres a situation where i have a list which displays all the "name" field data of a table "table1". Now i have a button to insert data in "table1". The list is populated using a simple cursor adapter which is passed a cursor "cursor1" populated with the data. "cursor1" is prepared using the SQLite query - "SELECT * FROM table1". Now the moment i insert data, i need to update the list too.

My question is- will the Adapter sense the database change automatically (i guess not)?
using cursor1.requery() is correct or should i use cursor1 = db.query("table1", null, null, null, null, null, null);

View 1 Replies View Related

Android :: How To Keep OnItemSelected From Firing Off On A Newly Instantiated Spinner

Apr 1, 2010

I've thought of some less than elegant ways to solve this, but I know I must be missing something.

My onItemSelected fires off immediately without any interaction with the user, and this is undesired behavior. I wish for the UI to wait until the user selects something before it does anything.

I even tried setting up the listener in the onResume, hoping that would help, but it doesn't. How can I stop this from firing off before the user can touch the control?

CODE:...........................

View 2 Replies View Related

Android :: Make Sure Activity Is Alive Before Firing Intent?

Feb 24, 2010

I am currently firing an Intent to a Broadcast Receiver which in turns starts an Activity.

Then from the same Service another Intent is fired to a Broadcast Receiver thats in the Activity.

The problem is that the Activity isn't getting the Intent meant for it because it is fired before it is alive and the Broadcast Reciever is registered.

I was wondering is there anyway to make sure an Activity is alive before sending an Intent?

View 1 Replies View Related

Android :: OnPageFinished Not Firing Correctly When Rendering Web Page

Sep 13, 2010

For some reason the onPageFinished is firing before the WebView has finished loading -

I can't figure out why...

CODE:.............................

View 3 Replies View Related

Android :: Way To Setup AlarmManager?

Jul 20, 2010

I am currently setting an alarm to fire off a background service every 2 minutes in order to check my server for certain updates. Now if I start the app and my screen is on and not locked the phone plays the sound I need it to play and opens the activity. Thats great. But the way I need it to happen is if the screen is off and the phone locked I still need it to check every two minutes and I need it to play that sound and open the activity that is needed. This does not happen for some reason. Could someone explain to me why the alarm doesn't function when my app is not "running" (by this i mean the app is marked as a running process but not actually visible to the user) and the screen is off? The code for the timer is below: CODE:.............

View 4 Replies View Related

Android :: AlarmManager On Droids

Mar 10, 2010

I am using alarmmanager in my app. It works perfectly for Nexus One and wakes the phone up everytime the alarm fires. But for droid it seems that the phone doesn't wakeup, is there an extra setting on the phone which can prevent the phone from waking up?

View 22 Replies View Related

Android :: Cancle AlarmManager

Jun 14, 2009

alarms.set(AlarmManager.RTC_WAKEUP, getTime(), alarmIntent);

I have set a alarm,but now i want to delete it? how can i make it.

View 3 Replies View Related

Android :: AlarmManager And BootReceiver

Feb 24, 2010

I think I'm reading some conflicting statements about the AlarmManager on the Android docs website. The following statements both exist on this page:

http://developer.android.com/reference/android/app/AlarmManager.html

[at the top]

"Registered alarms are retained while the device is asleep (and can optionally wake the device up if they go off during that time), but will be cleared if it is turned off and rebooted."

- and -

[under setRepeating()]

"This alarm continues repeating until explicitly removed with cancel(PendingIntent)"

So, the question is, do I need to register a BootReceiver that re-sets my Alarms when the phone turns on. The first statement makes me think I do, but the second statement is worded in a way that would lead one to believe that it would live forever, unless a cancel() call on that Intent is called.

So, which statement do I believe or am I misinterpreting one of the statements? I suppose when the power is turned off or back on, Android itself could call the cancel() function on all alarms. I guess it would help if it said that after the second sentence.

View 2 Replies View Related

Android :: Code To Use AlarmManager

Jul 4, 2009

Show me some sample code on how to use an AlarmManager in android.

I have been playing around with some code for a few days and it just won't work...

I need to trigger a block of code after 20 minutes from the AlarmManager being set.

View 1 Replies View Related

Android :: AlarmManager.RTC Not Working

Mar 3, 2010

I changed AlarmController.java in ApiDemo a little bit, so I want the alarm not to go off when the phone is sleeping by using AlarmManager.RTC.

CODE:.................

The receiver code is like below:

CODE:..............

I ran the modified app, but I still see many log messages as below after the phone wento sleep (the screen was black):

CODE:...............

This means the flag AlarmManager.RTC didn't work.

View 1 Replies View Related

Android :: Stopping AlarmManager.

Apr 5, 2010

I have a AppWidget, after I delete it from HomeScreen it seems not stopping the AlarmManager attached with it. I have supported it with the AlarmManger, that call the ProviderImplementation class every 1 minute and in onReceive I put the code to call onUpdate. and in onDelete I explicitly stop the alarm, but it seems it is running continously and not stopping. any cure of it ?

I have stopped it with cancel(pendingintent) function.

View 2 Replies View Related

Android :: AlarmManager Or Timer

Jul 22, 2010

I have a service that I need to execute every two minutes. Would it be more efficient to use an alarm or a timer?

View 3 Replies View Related

Android :: Intents Alarmmanager

Aug 7, 2010

I am trying to create intents that will be set using alarmmanager. Currently, I can do this with one intent, add extra data to it (strings, but i send them as one string with a seperator), and everything works fine and goes off at the correct time. However, when I try to send multiple intents like this, they are overwritten and only one goes off at the correct time. How can i structure my intents so that they appear different to the alarmmanager (i think they are getting deleted when filterIntent() is run).

long story short- putExtra() makes all the intents look the same still... how can i make them look different so they wont get deleted (and keep track of them in case i want to delete a specific one)

View 2 Replies View Related

Android :: App Widget With AlarmManager

Sep 6, 2010

I've created a simple app widget for personal use that queries a site from the internet, parses the XML received and displays some info from it. I'm using a Droid X, if that makes a difference; both in the emulator and as physical hardware, developing in the Android version of the MotoDev IDE.

No matter what I put in updatePeriodMillis, the shortest refresh time I can get is 30 minutes (I thought this was a 1.6 only bug but apparently not since I'm running 2.1) and I want it to refresh every 5 minutes, with some caveats. I don't want the widget to refresh when the screen is off and I want it to refresh immediately upon waking up the screen. My search for information says to set updatePeriodMillis to 0 and use the AlarmManager instead, but I can't find any complete code examples on just how to do this.

Obviously, I'm new to Android development, and Java in general actually, but I've been a developer for a very long time with experience in just about every other language. Currently working in C#, so I thought I'd be able to jump in fairly easily. Can anyone point me to sample code or an open source project that does what I'm looking for? I have other questions, but until I get this piece working they don't really matter. :)

View 5 Replies View Related

Android :: Reloading Our Activities State After Firing Intent To Camera

Aug 31, 2009

We have an Activity which has a form on it and we launch an Intent to take a picture.We've overridden onSaveInstanceState and onRestoreInstanceState to push the data from the view fields But, on the return from the CameraActivity, the onRestoreInstanceState method is never called. Should this behavior work when calling another Intent?

View 7 Replies View Related

Android :: Using AlarmManager As Timing Service

Jan 19, 2010

I wanted to ask a question regarding the Alarm Manager. I have a requirements of setting long running timers in my application. The minimum duration for my timer is 1 hour...and the maximum may be for 4-5 days. This timer is supposed to run in the background, and when it fires/expires, i have to show something on the GUI. The timer can be re-scheduled once it fires based on user action.

What is the best approach for scheduling such long running timers ?

Should i make use of the Alarm Manager ? Or will it be an overkill ? As far as i know, alarms are retained even if the device goes to sleep and they wake up the device when the alarm goes off.

I am thinking of using a simple Java TimerTask as an alternative to setting an alarm: http://java.sun.com/j2se/1.5.0/docs/api/java/util/TimerTask.html.

But i am not sure what will happen to the timer task if the device went to sleep while the task was running.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved