Pratap

here is the logcat trace. What we understand from this is that it
requires ACCESS_FINE_LOCATION permission
which you suggested in first place. Now that we have specified it in
our manifest.xml, what might be the issue?

We define permissions as:-

        <uses-permission android:name="android.permission.ACCESS_GPS"/>
        <uses-permission
android:name="android.permission.ACCESS_LOCATION"/>
        <uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"/>
        <uses-permission android:name="android.permission.INTERNET"/>

Thanks again for the help.

----------------------------------------------------------------------------
LOGCAT START
----------------------------------------------------------------------------------

I/ActivityManager(   54): Starting activity: Intent
{ action=android.intent.acti
on.MAIN categories={android.intent.category.LAUNCHER} flags=0x10200000
comp={tcs
.cns/tcs.cns.LBSAppActivity} }
I/ActivityManager(   54): Start proc tcs.cns for activity
tcs.cns/.LBSAppActivit
y: pid=173 uid=10020 gids={}
I/jdwp    (  173): received file descriptor 20 from ADB
D/LocationManager(  173): Constructor: service =
android.location.ILocationManag
er$stub$pr...@4336ec38
D/AndroidRuntime(  173): Shutting down VM
W/dalvikvm(  173): threadid=3: thread exiting with uncaught exception
(group=0x4
0010e28)
E/AndroidRuntime(  173): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime(  173): java.lang.RuntimeException: Unable to start
activity Co
mponentInfo{tcs.cns/tcs.cns.LBSAppActivity}:
java.lang.SecurityException: Requir
es ACCESS_FINE_LOCATION permission
E/AndroidRuntime(  173):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2140)
E/AndroidRuntime(  173):        at
android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2156)
E/AndroidRuntime(  173):        at android.app.ActivityThread.access
$1800(Activi
tyThread.java:112)
E/AndroidRuntime(  173):        at android.app.ActivityThread
$H.handleMessage(Ac
tivityThread.java:1580)
E/AndroidRuntime(  173):        at android.os.Handler.dispatchMessage
(Handler.ja
va:88)
E/AndroidRuntime(  173):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  173):        at android.app.ActivityThread.main
(ActivityThrea
d.java:3742)
E/AndroidRuntime(  173):        at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  173):        at java.lang.reflect.Method.invoke
(Method.java:5
15)
E/AndroidRuntime(  173):        at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:739)
E/AndroidRuntime(  173):        at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:497)
E/AndroidRuntime(  173):        at dalvik.system.NativeStart.main
(Native Method)

E/AndroidRuntime(  173): Caused by: java.lang.SecurityException:
Requires ACCESS
_FINE_LOCATION permission
E/AndroidRuntime(  173):        at android.os.Parcel.readException
(Parcel.java:1
234)
E/AndroidRuntime(  173):        at android.os.Parcel.readException
(Parcel.java:1
222)
E/AndroidRuntime(  173):        at android.location.ILocationManager
$Stub$Proxy.
getLastKnownLocation(ILocationManager.java:658)
E/AndroidRuntime(  173):        at
android.location.LocationManager.getLastKnown
Location(LocationManager.java:844)
E/AndroidRuntime(  173):        at tcs.cns.LBSAppActivity.onCreate
(LBSAppActivit
y.java:26)
E/AndroidRuntime(  173):        at
android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1122)
E/AndroidRuntime(  173):        at
android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2103)
E/AndroidRuntime(  173):        ... 11 more
I/Process (   54): Sending signal. PID: 173 SIG: 3
I/dalvikvm(  173): threadid=7: reacting to signal 3
I/jdwp    (  173): Ignoring second debugger -- accepting and dropping
I/dalvikvm(  173): Wrote stack trace to '/data/anr/traces.txt'
I/ARMAssembler(   54): generated
scanline__00000077:03515104_00000000_00000000 [
 27 ipp] (41 ins) at [0x26f590:0x26f634] in 3554767 ns
I/Process (  173): Sending signal. PID: 173 SIG: 9
I/ActivityManager(   54): Process tcs.cns (pid 173) has died.


----------------------------------------------------------------------------
LOGCAT END
----------------------------------------------------------------------------------

On Feb 3, 10:40 am, PRATAP SOLAPUR <pratap.sola...@gmail.com> wrote:
> post the stack trace of ur logcat........so that i can kno wat kind of error
> ur getting.
>
> On 2/3/09, pulkit <pulkit.bhard...@gmail.com> wrote:
>
>
>
> > Thanks for replying Pratap,  but unfortunately it didn't fix the
> > problem.
> > Any other suggestion please?
>
> > On Feb 3, 10:23 am, PRATAP SOLAPUR <pratap.sola...@gmail.com> wrote:
> > > Add ACCESS_FINE_LOCATION permission and INTERNET permission............
>
> > > On 2/3/09, pulkit <pulkit.bhard...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > We're working on Location based services with android emulator. But
> > > > the issue is that the application crashes when any of the following
> > > > statements executes:-
>
> > > > Location location = locationManager.getLastKnownLocation(locationManag
> > > > er.getBestProvider(CRITERIA, true));
>
> > > > OR
>
> > > > Location location = locationManager.getLastKnownLocation("gps");
>
> > > > We have also defined permissions in manifest.xml as follows:-
>
> > > > <uses-permission android:name="android.permission.ACCESS_GPS"/>
> > > > <uses-permission android:name="android.permission.ACCESS_LOCATION"/>
>
> > > > PS: we are also spoofing coordinates using ddms. Google map works
> > > > fine, but our application keeps crashing.
>
> > > > Any inputs please. Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to