android-gps

Cannot resolve method 'setWebChromeClient(anonymous android

给你一囗甜甜゛ 提交于 2019-12-25 19:06:03
问题 I am trying to learn building applications for Android and the first project is to view a website I've made that uses GPS localization. But when I'm trying to use webView.setWebChromeClient(... I'm getting the following error message: Cannot resolve method 'setWebChromeClient(anonymous android.webkit.WebChromeClient) . If it will help anything, I have added the needed permissions in my AndroidManifest.xml: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android

Cannot resolve method 'setWebChromeClient(anonymous android

陌路散爱 提交于 2019-12-25 19:05:03
问题 I am trying to learn building applications for Android and the first project is to view a website I've made that uses GPS localization. But when I'm trying to use webView.setWebChromeClient(... I'm getting the following error message: Cannot resolve method 'setWebChromeClient(anonymous android.webkit.WebChromeClient) . If it will help anything, I have added the needed permissions in my AndroidManifest.xml: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android

Android get User Location once

你。 提交于 2019-12-24 09:56:11
问题 I know that there are a lot of things around this but even after I read them all (almost) I still can't figure it out the issue. Basically I want to get the user FINE LOCATION when I open the app or press a button and save on Shared Preferences. My old code worked but since was slow to get the coordinates, it fails to save on sharedpreferences (GPS icon don't show on bar). OLD: public void askLocation() { if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE

After enable gps from an app prompt how to refresh and get the current location?

别说谁变了你拦得住时间么 提交于 2019-12-22 10:46:21
问题 I am currently developing an Android app which prompts the user to enable GPS if it's not on and I have used Alert Dialog for this purpose. After I enable the GPS from settings and come back to my app by pressing back button, the toast message display 0.00,0.00. Although If I have my GPS on before running the app, the app properly displays my location. I want to know to which method to use for this refresh user location after enabling GPS purpose. Any relevant article would really help. This

How does some apps(wechat) ignore fake location and then detect the real one?

久未见 提交于 2019-12-20 10:43:15
问题 I have installed a fake location app and set my location different. Then opened Google Maps and Wechat app, Google Maps shows my location as what i set(fake) Wechat app ignores fake location and detects real location (how?) Then i wanted to prevent wechat analyze my previously received real locations and new fake location. Uninstalled Wechat Restarted my device Set my location as fake Installed Wechat again But same result, it detects my real location. I really want to understand how they do

How to ask user to enable GPS at the launch of application?

徘徊边缘 提交于 2019-12-18 16:51:33
问题 private void turnGPSOn(){ String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")){ //if gps is disabled final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent.CATEGORY_ALTERNATIVE); poke.setData(Uri.parse("3")); sendBroadcast(poke); } } see the Logcat 04/20 17:35:26: Launching app $ adb push F:

Android broadcast gps turned on update location

ε祈祈猫儿з 提交于 2019-12-13 02:48:49
问题 Well even having a lot of reading here, i can't figure out the issue. It looks like i never get gps turned on event. After some checking in debug, the flag isGps is correct. But as a result, user alert works nice but not update location. I just want to add a marker when gps is turned on and it looks like something is not correctly synchronised here. And that even with high accuraty location. I use this code from my fragment. public class MapDialogFragment extends DialogFragment implements

Getting W/Activity: Can request only one set of permissions at a time

这一生的挚爱 提交于 2019-12-12 08:35:26
问题 I made an app that have a request for camera and GPS, but when I execute I am getting this warning several times with less than 1 second of each other. W/Activity: Can reqeust only one set of permissions at a time) Can some one tell me why? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); mStatusCamera = intent.getStringExtra("camera"); mScannerView = new ZXingScannerView(this) { @Override protected IViewFinder

LocationManager requestLocationUpdates minTime OR minDistance

家住魔仙堡 提交于 2019-12-11 17:20:59
问题 I'm using Android's LocationManager and its method requestLocationUpdates like this: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 10, this); As I found out both the conditions of minTime and minDistance have to be met for location update, but I need to get update every 3 seconds or 10 meters. I tried to put 2 requests like this: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 0, this); locationManager.requestLocationUpdates

The Geo-Cordinates getting is Very Far from previous one

旧时模样 提交于 2019-12-11 06:41:05
问题 In my application there is provision to track how much distance a person is travelled.There is a Service class for getting the current lat and long perodically.Some times the points getting is fine.Othertimes it is not.I started from a point and walked around 500m and came back to the samepoint ,but the distance calculated was 3.5 k.m. For finding the distance travelled ,I take the difference in between Current and previous location.The values are added with new value and goes on until last