Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3664098
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:36:25+00:00 2026-05-19T01:36:25+00:00

these are my codes to open GPS LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); locationManager.setTestProviderEnabled(gps, true); and

  • 0

these are my codes to open GPS


LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
locationManager.setTestProviderEnabled("gps", true);

and the permission in my xml


<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>

but the apps crashed.


01-07 10:41:35.104: ERROR/AndroidRuntime(1823): java.lang.SecurityException: Requires ACCESS_MOCK_LOCATION secure setting
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.os.Parcel.readException(Parcel.java:1218)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.os.Parcel.readException(Parcel.java:1206)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.location.ILocationManager$Stub$Proxy.setTestProviderEnabled(ILocationManager.java:952)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.location.LocationManager.setTestProviderEnabled(LocationManager.java:1054)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.hisoft.battery.MainActivity.connGPS(MainActivity.java:118)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.hisoft.battery.MainActivity.access$2(MainActivity.java:114)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.hisoft.battery.MainActivity$2.onClick(MainActivity.java:62)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.View.performClick(View.java:2364)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.View.onTouchEvent(View.java:4179)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.widget.TextView.onTouchEvent(TextView.java:6607)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.View.dispatchTouchEvent(View.java:3709)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:883)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.os.Handler.dispatchMessage(Handler.java:99)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.os.Looper.loop(Looper.java:123)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at android.app.ActivityThread.main(ActivityThread.java:4363)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at java.lang.reflect.Method.invokeNative(Native Method)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at java.lang.reflect.Method.invoke(Method.java:521)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
01-07 10:41:35.104: ERROR/AndroidRuntime(1823): at dalvik.system.NativeStart.main(Native Method)

who knows why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:36:25+00:00Added an answer on May 19, 2026 at 1:36 am

    Just guessing here: Go to Settings > Applications > Development > Allow mock locations, and make sure that it is checked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some permissions in my app such as <uses-permission android:name=android.permission.CONTROL_LOCATION_UPDATES /> <uses-permission android:name=android.permission.ACCESS_FINE_LOCATION
I have these code below : <form name=submissions action=/ onsubmit=window.open('', 'foo', 'width=900,height=900,status=yes,resizable=yes,scrollbars=yes') target=foo method=post>
Im using an open source code from EvilDicom . Unfortunately, these codes are in
Are there any open source projects or part of codes using which its possible
I have these codes for my two tabs. I would like to change the
I created two dropdpwn calendar in my form with these codes: <script type=text/javascript src=http://code.jquery.com/jquery-latest.js></script>
I tried to get avatar at single (post) page by these codes <?php echo
My mainTable has column primaryCode. These codes are incorrect and need to be updated
these below codes give whole data of my Rehber datas. But if i want
So to start, I have an array of XML files. These files need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.