[android-developers] LocationProvider power requirement

2008-11-30 Thread Mohamed Amir
Hi, LocationManager provides 2 LocationProviders, gps and network. I would like the know the value returned by LocationProvider.getPowerRequiremen() when called on each of them. How this value is calculated? Thank you. --~--~-~--~~~---~--~~ You received this

[android-developers] Re: Tab Issue:

2008-12-25 Thread Mohamed Amir
I want to have tabs using XML and Views at the same time i.e. To have an XML describing all the tabs, and I add tabs like that tabs.addTab(tabs.newTabSpec(First Tab) .setIndicator(First Tab) .setContent(R.id.tab1)); tabs.addTab(tabs.newTabSpec(Second Tab)

[android-developers] ReStarting An Activity From A Service

2009-04-18 Thread Mohamed Amir
I have a Service that starts an Activity on certain event passing to it some parameters. The problem is if the Activity is still open, when the service tries to startActivity() again, the activity isn't started because it's already started. Is there a way to force the destruction of the old

[android-developers] Re: ReStarting An Activity From A Service

2009-04-19 Thread Mohamed Amir
Thank you for your answers. Marco: I will check your solution. Mark: The user isn't supposed to be doing anything. Just reading some information, and it's required to see the most updated information sent by the service. On Apr 18, 5:56 pm, Mark Murphy mmur...@commonsware.com wrote: I

[android-developers] Re: ReStarting An Activity From A Service

2009-04-20 Thread Mohamed Amir
; } } }; } Is there something I'm missing? Thank you. On Apr 19, 8:04 pm, Mark Murphy mmur...@commonsware.com wrote: Mohamed Amir wrote: Mark: The user isn't supposed to be doing anything.  Just reading some information, and it's required to see the most updated information sent by the service. What

[android-developers] Re: ReStarting An Activity From A Service

2009-04-20 Thread Mohamed Amir
: Hi Mohamed, Mohamed Amir wrote: I am trying to make an application that show the caller-ID when there is an incoming call. And where there is another call, I wanna update the caller-ID shown. Sounds familiar - I do similar stuff in Zap's Hitta (see Market). I have tried OnNewIntent

[android-developers] Re: ReStarting An Activity From A Service

2009-04-20 Thread Mohamed Amir
:-) Well, it's just a typo here but it is correct in the code I have tried. Thank you after all. On Apr 20, 10:14 pm, Marco Nelissen marc...@android.com wrote: On Mon, Apr 20, 2009 at 12:15 PM, Mohamed Amir mohamed.a...@gmail.comwrote: OK Mark. I am trying to make an application

[android-developers] Re: ReStarting An Activity From A Service

2009-04-21 Thread Mohamed Amir
you try setting android:launchMode=singleTop in your manifest? On Mon, Apr 20, 2009 at 3:11 PM, Mohamed Amir mohamed.a...@gmail.comwrote: :-) Well, it's just a typo here but it is correct in the code I have tried. Thank you after all. On Apr 20, 10:14 pm, Marco Nelissen marc

[android-developers] Re: ReStarting An Activity From A Service

2009-04-21 Thread Mohamed Amir
, the incoming call dialog is shown and hence I think the activity isn't at the top of activity stack, you think this might be the reason? Is there a way that I close the activity and re-launch it from inside the service? On Apr 21, 2:22 pm, Mohamed Amir mohamed.a...@gmail.com wrote: Yes, I have set

[android-developers] Re: ReStarting An Activity From A Service

2009-04-21 Thread Mohamed Amir
OK, sorry, Dianne. It works now. I just did as you said, I am not sure why it wasn't working in the first place. Thank you Dianne. On Apr 21, 2:50 pm, Mohamed Amir mohamed.a...@gmail.com wrote: Hi Dianne, I have found this in the doc.  when the activity is re-launched while at the top

[android-developers] Re: ReStarting An Activity From A Service

2009-04-21 Thread Mohamed Amir
I am sorry, but the same code doesn't run now. I am testing on the emulator. Can it be a timing issue? if the service is invoked before the incoming call dialog captures the focus, it works because the activity is then on top of stack? On Apr 21, 2:57 pm, Mohamed Amir mohamed.a...@gmail.com

[android-developers] When GPS goes off?

2009-04-24 Thread Mohamed Amir
I am working on an application that requires getting location using GPS. I registered a listener to get GPS location updates. The location manager keeps reporting GPS locations for sometime and then stops reporting according to the updates frequency I requested. I couldn't understand when the

[android-developers] The Source Code of Location Platform

2009-02-24 Thread Mohamed Amir
Hi, I need to check the source code of location platform classes, e.g. LocationManager, LocationProvider, ...etc. Is there a way to do that other than following the procedure in http://source.android.com/download to download the 2GB source? Thank you in advance.

[android-developers] Is Orientation Sensor a Phyiscal Sensor Different from the Accelerometer?

2009-10-30 Thread Mohamed Amir
... or it's just some virtual sensor the uses the data provided by the accelerometer and the magnetic field sensor to calculate the orientation? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Is Orientation Sensor a Phyiscal Sensor Different from the Accelerometer?

2009-11-02 Thread Mohamed Amir
and I don't know why no one replies. I thought it's a simple direct question. !!! On Oct 30, 10:28 pm, Tan saurabhtanej...@googlemail.com wrote: i have the same question On Oct 30, 4:16 pm, Mohamed Amir mohamed.a...@gmail.com wrote: ... or it's just some virtual sensor the uses the data

[android-developers] Re: Is Orientation Sensor a Phyiscal Sensor Different from the Accelerometer?

2009-11-03 Thread Mohamed Amir
Good point :-) Thank you. On Nov 3, 3:06 am, Dan Sherman impact...@gmail.com wrote: Probably because we're not sure, and because it could very easily differ per-device... On Mon, Nov 2, 2009 at 7:56 PM, Mohamed Amir mohamed.a...@gmail.com wrote: and I don't know why no one replies.  I

[android-developers] Re: When GPS goes off?

2009-05-06 Thread Mohamed Amir
Is it that hard? On Apr 24, 6:36 pm, Mohamed Amir mohamed.a...@gmail.com wrote: I am working on an application that requires getting location using GPS. I registered a listener to get GPS location updates.  The location manager keeps reporting GPS locations for sometime and then stops

[android-developers] Android Toast Duration

2009-07-23 Thread Mohamed Amir
Is there a way to make the Toast last for longer time? I have tried this code Toast t = new Toast(this); View v = View.inflate(this, R.toast_layout, null); t.setView(v);

[android-developers] Re: Android Toast Duration

2009-07-24 Thread Mohamed Amir
for the same fade effect: http://developer.android.com/reference/android/R.style.html#Animation... On Thu, Jul 23, 2009 at 8:17 AM, Mohamed Amir mohamed.a...@gmail.comwrote: Is there a way to make the Toast last for longer time? I have tried this code                        Toast t = new