質問

I believe I am doing something wrong in a Midlet application. Whenever I try to use the LocationProvider to find my mobile's position, two scenarios happen. If I start the application with a form (unique select group) with 3 options and I press "OK" to proceed to the location search, then the phone asks "blabla wants to use location services, is that ok" and then nothing happens from here...whether you press Yes or No it will not change anything.

The other scenario I tried is to directly run the location finding code straight in the startApp() function, which DOES work (returns the qualified coordinates so I can find latitude/lonitude).

My question is: why in the nine hells does the location provider return me coordinates when ran straight from the beginning as opposed to hanging to the "Yes or No" screen if it is ran as the app's 2nd form?? Do I need to map the "Yes/No" buttons if the user agreement for location services is not in the very first screen?

Thanks in advance!

P.S: When the location services are called after the first screen, the code calling the location services is located in the commandAction() function, if that can be of any help.

役に立ちましたか?

解決

Found the answer...I had to start a new thread in order to get the location after the very first form displayed.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top