BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   Need to Know Mobile is in Motion State (http://www.blackberryforums.com/developer-forum/259330-need-know-mobile-motion-state.html)

narasinga 05-04-2012 03:55 AM

Need to Know Mobile is in Motion State
 
Hi Friends,

I Need to know is my blackberry mobile in Motion state or in Stay state.

How could i know this..

Dougsg38p 05-04-2012 09:06 AM

Re: Need to Know Mobile is in Motion State
 
Define "in motion state" and "in stay state"

What exactly are you trying to detect?

There are two possibilities, depending on what you are trying to accomplish: GPS or Accellerometer.

narasinga 05-05-2012 12:29 AM

Re: Need to Know Mobile is in Motion State
 
Hi currently i m implementing GPS Application and i need to stop gps for some time which is mobile is not in motion state. If mobile is in motion state then i have to start gps. To accomplish this object i need to know mobile is in motion or not..

My mobile doesn't support Accellerometer concept.. (9300) so i can't implement with this program..

hrbuckley 05-05-2012 10:21 AM

Re: Need to Know Mobile is in Motion State
 
The GPS will tell you when motion has stopped, within reason. One thing I have used to start the GPS up again is the change in current active cell which can be gotten from GPRSInfo or CDMAInfo on a periodic basis.

narasinga 05-07-2012 12:31 AM

Re: Need to Know Mobile is in Motion State
 
what is mean my current active cell? I need to implement same (have to start gps when user in motion).

hrbuckley 05-07-2012 08:03 AM

Re: Need to Know Mobile is in Motion State
 
A cell phone communicates with the network through one cell (a radio tower that interfaces the carriers network to the cellphone frequencies) at a time. A change from one cell to another, or a significant change in signal strength can indicate a change in location. You will need to develop a set of appropriate heuristics to determine when it is appropriate to start the GPS. Starting and stopping the GPS on a cycle shorter than 10 minutes actually takes more power than just letting it run.

If you are not familiar with these concepts I would suggest that you do some research into how mobile devices operate before taking on such a complex project.

narasinga 05-07-2012 09:38 AM

Re: Need to Know Mobile is in Motion State
 
can i use GPRSInfo.getCellInfo().getCellId() and GPRSInfo.getCellInfo().getLAC() methods to get the vary of different places?

hrbuckley 05-07-2012 12:20 PM

Re: Need to Know Mobile is in Motion State
 
GPRSInfo.getCellInfo().getCellId() will tell you what the current cell is. When it changes the phone will be talking to the network through a different cell. This may or may not indicate a change in location.

You may also want to look at your LocationProvider Criteria. If your provider supports Cellsite location based service then you could use that. Not all providers support this, and some that do charge extra for it. So like I said you need to do the research into what is available from your carrier(s) and on the phones you are developing for.


All times are GMT -5. The time now is 01:03 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.