After reading lots of sample code into this matter, I'm trying to
figure out the simplest way to achieve the following:
I want to be able to schedule an Intent that calls back to my Alarm
BroadcastReceiver, which in turn fires off my Service. However, I want
to set up so that it calls said Intent
of AlarmManager?
http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
http://developer.android.com/reference/android/app/AlarmManager.html
Kris
On Fri, Jan 6, 2012 at 1:38 PM, Diego Tori
diegotoridoesandr...@gmail.com wrote:
After reading lots of sample code into this matter
Also, the pending intents that I check with FLAG_NO_CREATE should be
checking if said intents returned null in order to set them.
On Jan 6, 3:37 pm, Diego Tori diegotoridoesandr...@gmail.com wrote:
You have to assume that the functions already have an instance of
AlarmManager.
AlarmManager
I'm trying to set up a quick and dirty GPS lookup via LocationManager
which fetches a network location (within 500 meters) every half second
for ten seconds. In other words, I'm just trying to find the correct
coarse Criteria settings and the correct logic to stop checking after
10 seconds of no
enough the returned location.
On Dec 22, 6:43 pm, TreKing treking...@gmail.com wrote:
On Thu, Dec 22, 2011 at 5:04 PM, Diego Tori
diegotoridoesandr...@gmail.comwrote:
What I want to know is after I fetch the last known location as my
initial best location and kick off my thread, how do I set up
So I've been struggling with this for a better part of a day. Suppose
I have a custom ImageView that I want to overlay over a background
View (both within a RelativeLayout), which when touched, it erases
portions of the View's source bitmap like the erase tool in MS Paint,
exposing the View below
Right now, suppose I have a GridView with ViewSwitchers, and what I
want to do is when the user clicks on an item, it switches my
ViewSwitcher to the second child. However, when a user scrolls away
from that item or clicks another one, I want it to reset the switcher
for that previous item back to
Right now, I'm trying to modify ImageDownloader (http://
code.google.com/p/android-imagedownloader/source/browse/trunk/src/com/
example/android/imagedownloader/ImageDownloader.java) so I can
implement a couple of enhancements particular to my app:
First, I am going to adapt the code to utilize
at 4:16 PM, Diego Tori
diegotoridoesandr...@gmail.com wrote:
That's the thing, if I set a shared preference flag or cached flag via
cache object, and they did try to check for that value in onResume,
wouldn't the first activity from the back stack to get the foreground
check its state
, Diego Tori
diegotoridoesandr...@gmail.comwrote:
So you're saying in this case it's better to just populate the UI in
onResume for data that is dependent on the outcome of that event? That
would be the case for a couple of activities that depend on it.
However, I'm more concerned
So I want to achieve the following: suppose I have one Activity in my
app that generates an event that I want other Activities in my app's
back stack to know about so they can react to it accordingly (i.e.
update UI, refresh data via separate Thread, etc...). What strategies
would I have to pursue
the foreground again?
On Jun 8, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
On Wed, Jun 8, 2011 at 3:00 PM, Diego Tori
diegotoridoesandr...@gmail.com wrote:
So I want to achieve the following: suppose I have one Activity in my
app that generates an event that I want other Activities
Keep in mind that this is not a one-time event. Rather it is an event
that the user generates, all I want those other activities to know is
whether or not the event was generated by the user while in the
background.
On Jun 8, 4:16 pm, Diego Tori diegotoridoesandr...@gmail.com wrote:
That's
If I recall correctly, ViewStub acts as a lazy XML include, in that the
referenced view only gets added to the view hierarchy in the time that it's
inflated, not ahead of time. The gain on this method is that it makes it
quick and cheap to inflate a view, however, once it's inflated, it cannot
Apparently, it was leaking memory due to the fact that I wasn't properly
unbinding from the service when exiting the activities. That and there were
certain cases where I wasn't carrying over the Service bindings when
rotating, thus it was creating a new connection every time. All is good now.
Targeting and building from API Level 4 and above.
Right now, I'm dealing with an issue in which I'm trying to maintain
bindings to my local service across multiple activities, and stop the
service when the last connection is unbound.
In a nutshell, my service just calls a system service in a
Sorry to bump the thread, but after creating a HandlerThread, all of the
locking stopped and the service stopped on a dime after unbinding even when
it waited for the allotted time before the next scan. Anyways, I was
wondering if I managed to implement it correctly:
class MyHandlerThread
So yeah, I managed to try calling the wifi scanner in this fashion within my
thread:
private Object _lock = new Object();
private final long SLEEP_TIME = 15000; //Scan every 15 secs
private final long WIFI_SCAN_TIMEOUT = 6; //One minute timeout
for getting called
I don't think it's doing any blocking operations at all since startScan
calls back onReceive rather quickly (even on a G1), and then I just use the
returned SSID data to call back to the activities bound to the service based
on the existence of a pre-determined SSID that I'm trying to find in
As the question implies, I am wondering how I could write a thread
that would call a system service and then wait a certain amount of
time before calling said system service's function that calls back to
onReceive from a registered BroadcastReceiver.
In other words, I am trying to call the Wifi
it sleep before the onReceive gets called
again?
On Apr 15, 6:27 pm, Kostya Vasilyev kmans...@gmail.com wrote:
Use AlarmManager for this, it's more reliable and easier to use than coding
a thread with sleep/wait.
16.04.2011 2:24 пользователь Diego Tori diegotoridoesandr...@gmail.com
написал
:43 PM, Diego Tori
diegotoridoesandr...@gmail.com wrote:
That's the thing, it has to be short intervals in between scans since
this has almost real-time implications, no greater than 15 secs at
most, so I dunno how AlarmManager would fit into the equation. Is
there any chance you can show me
I already know that I can pass Bundled data through setResult from one
Activity back to another. However, suppose I have an global Activity
that can be launched from anywhere in my app since it is mapped to a
button that appears in my title bar in almost all of my activities.
Long story short,
.
On Mar 22, 10:22 pm, TreKing treking...@gmail.com wrote:
On Tue, Mar 22, 2011 at 7:17 PM, Diego Tori
diegotoridoesandr...@gmail.comwrote:
From either Home (ActivityA), or any other activity (Activity B, C, etc...)
that can open out my global activity (ActivityX), it should find a way
24 matches
Mail list logo