What's the trick to making ProximityAlerts work?

by Faber Fedor » Sun, 08 Mar 2009 08:46:51 GMT


Sponsored Links
 ProximityRadius *is* big.  I think I was using 1500 meters in the field test
today.  The "10 feet" I mentioned below was the minimum distance to travel
before doing an location update. And I mean "10 meters".

I beginning to think my mental model is all wrong.  I thought I could
blindly throw intents out to the Android and it would fire off PAs back at
me.  Which intent belonged to which latlong was my problem to figure out.
I'm now thinking I need to keep each PA intent in a global data
structure^W^W^Winstance variable and carry them around with me and run an
RequestUpdate on each one. :-?

Is there someway for me to monitor myLocationManager to see when he fires
off a PA?







-- 

Faber Fedor
Linux New Jersey
 http://linuxnj.com 
faberfedor.blogspot.com

--~--~---------~--~----~------------~-------~--~----~



What's the trick to making ProximityAlerts work?

by Mark Murphy » Sun, 08 Mar 2009 09:17:41 GMT


 


Ah, sorry. FWIW, requestLocationUpdates() and addProximityAlert() should
be orthogonal -- the settings you supply requestLocationUpdates() should
not impact the behavior of addProximityAlert().


PAs? I'm guessing you mean proximity alerts, not Pennsylvanias or
precious armadillos or something.


I don't think so, by design. LocationManager is a system service; your
app does not even need to be running to get a proximity alert.

The first edition of my Android book had a sample app that used
proximity alerts. I dumped that sample app (after having to re-re-write
it due to the constantly-changing location API) and now my book does not
have a proximity alert sample. I'll see if I can work that into _Android
Programming Tutorials_, though.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android Training in Sweden --  http://www.sotrium.com/training.php 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


What's the trick to making ProximityAlerts work?

by Faber Fedor » Sun, 08 Mar 2009 09:27:07 GMT


 




I think there's still some connection between the two that I'm missing.




I noticed. :-)

The only example I've come across is WhereAmI.java which is based on a
previous SDK. I'm trying to glean the solution from that.

 For a "killer feature" of Android, there isn't much discussion or many
examples out there.




Another book?

-- 

Faber Fedor
Linux New Jersey
 http://linuxnj.com 
faberfedor.blogspot.com

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Testing Microphone with Android App on OMAP

Hi,

      I m using OMAP3EVM with Android Donut, I need to check the Mic
functionality in Android. I have verified my Mic working in Linux and
booting the OMAP using Ramdisk and verified using the utility namely
arecord and aplay.

     I got an apk namely DroidRecord a record and play application,
whenever I click the Record button of the app, the application closes
with the message "com.twofuse.droidrecord" has stopped and the app
closes.

  Is there any other utility or app is there to check the Mic
functionality. The android FS by default has got the SoundRecorder.apk
in system/app but its not coming as an icon in menu.
Is there any tweak to be done for this . Looking for your suggestions
and help.

Thanks
Fasil

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. animation is starting with a large black screen....

i am trying to get a slide down animation to work, and it seems to
work except that it starts with a big black screen instead of the
screen that was there.

so I have layout1 and layout2.

when I start the animation using ViewFlipper.showNext it puts a big
black background over layout1, and then slides in layout2.  if I use
ViewFlipper.startFlipping() it slides in layout2 out as it is sliding
in layout1 -- which is what I would expect.

My slide_down.xml looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <set xmlns:android="http://schemas.android.com/apk/res/android">
        <translate android:fromYDelta="0"
                   android:toYDelta="100%"
                   android:duration="4000"
                   android:detachWallpaper="true"/>
    </set>

My java code looks like this:
    ViewFlipper vf = (ViewFlipper) findViewById(R.id.DropDownList);
    vf.setAnimation(AnimationUtils.loadAnimation(this,
R.anim.slide_down));
    vf.showNext();                or
vf.startFlipping();

tia.

-- 

3. Video streaming from Android

4. Email client with Exchange &/or Lotus Domino mail server

5. Php Development Web Developement In India at infocus web solutions (ahmedabad)

6. Oops, I crashed the phone

7. vold issues