Android :: Enable GPS / Network Location Programmatically
May 3, 2010
I'd like to write a simple widget that toggles GPS and network location on and off. I've read that it's not possible to do that normally, but presumably on a rooted phone it must be doable. Does anyone know what the code would be? (I only need the code to toggle the location providers, I know how to make the widget.) It doesn't matter that this isn't a 'good' solution, I don't plan to distribute the widget. If it matters, this would be on an HTC Hero, still running v1.5.
View 1 Replies
Mar 4, 2010
I want to override the method enableMyLocation() in MyLocationOverlay class, in order to implement my own positioning algorithm to get latitude/longitude, and then plot them onto a MapView. I figured out how to do that, but now I'm stuck because I dont know what Canvas to pass when I call the method drawMyLocation().
Here is the MyLocationOverlay class
View 4 Replies
View Related
Jul 22, 2009
I was wondering if there is a way of enabling the GPS programmatically through an application without going to the menu Settings > Security & location > Enable GPS satellites. Please let me know if there is a way, I've seen this asked a million times in this group but there are never any replies.
View 2 Replies
View Related
Jan 27, 2010
I have an application which uses the network as the location provider (rather than GPS eg.), however I can't seem to figure out how to send the emulator test coordinates. In DDMS I would usually send coordinates in the Emulator Control tab.Is there a place to simulate coordinates derived from the cell phone network provider?
View 6 Replies
View Related
Aug 12, 2010
I've found bits and pieces of this answer scattered through other posts, but I wanted to record it here for others.How can I simply request the user's GPS and/or Network location and, if they haven't enabled the service, prompt them to do so?
View 1 Replies
View Related
Jun 26, 2009
I'm currently writing an app in Android that works with the GPS, at the moment I'm able to work out whether the GPS is enabled, my problem is that I want to enable the GPS on app startup if it is disabled, how can I do this programmaticaly?
View 4 Replies
View Related
Feb 26, 2009
I would like to enable Security & Location settings programmatically. Can any one please suggest me how to do this?
View 2 Replies
View Related
Aug 11, 2010
Is it possible to enable usb debugging (under settings/applications/development) programatically from within my app? I was looking at Permission.WRITE_SETTINGS and http://developer.android.com/reference/android/provider/Settings.System.html but couldn't find anything appropriate.
View 1 Replies
View Related
Jul 29, 2009
I'm trying to code an app for android that needs to enable and disable 3G (move between 2g and 3g), but can't find anything about it...is that possible? Can I get a snippet code or some documentation?
View 2 Replies
View Related
Sep 27, 2010
I want to enable/disable bluetooth through the program..I has the following code. BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (!mBluetoothAdapter.isEnabled()) {Intent enableBtIntent = new Inten BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT); But this sort of code is not working in SDK 1.5..How can i do the same in SDK 1.5.?
View 1 Replies
View Related
Aug 20, 2010
Is there a way to enable or disable tethering (USB or wifi) on an android phone programmatically? Perhaps an API in android SDK or NDK or any even non-UI command to do that.
View 1 Replies
View Related
Jul 22, 2010
Is it possible to programmatically disable and enable the led indicator light on an Android device? I am not referring to just turning it on and off as in a notification. I did not see anything in the api that would do so. I am guessing this is hardware specific if it is possible at all.
View 1 Replies
View Related
Nov 27, 2009
How do I set the location of buttons/other views programmatically?
View 4 Replies
View Related
Oct 17, 2010
I as i know we can change the installing location With android SDK , using USB cable But i wanna know is it possible to change the installing location Programmatically? is it yes how?
View 2 Replies
View Related
Sep 27, 2009
I am working on an application that requires an approximate position of the user, so basically i am fine with any relatively recent location data i can get. However I can't seem to get things right using mock location data and would therefore appreciate your help. The method i'm having tries to set mock location data for the gps provider and tries to later retrievie it BUT: locationManager.setTestProviderEnabled("gps", true); seems to fail because i do not get any active location provider from the location manager. When I tried using a mock location provider with addTestProvider and give it my mock location, the LocationManager returns me this mock provider with getProviders(true) but then getLastKnownLocation returns null instead of the provided mock location.
View 4 Replies
View Related
May 14, 2010
In my application it is necessary to have internet connection. Therefore i check while starting if a Internet connection is available. If not I ask the user if he would establish an Internet Connection, and what type (wifi oder mobile). The wifi connection i can establish with the following code WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(true); But how do i establish a mobile connection? Couldn't find a single code snippet at Google.
View 1 Replies
View Related
Jun 22, 2009
How to enable/disable Access Point Network (APN)?
View 2 Replies
View Related
Feb 22, 2010
I have a small issue. Is it possible to enable or disable HSDPA connection programatically in Andoird? If so, how to do that? I didnt find any API in Telephony Manager.
View 1 Replies
View Related
Jul 5, 2010
I just thought I would mention unchecking this option causes pandora to stop playing after ever doing when the phone is locked.
View 5 Replies
View Related
Jan 20, 2010
Wouldn't it be cool if I could tell my phone to switch wifi on and switch 3g reception off when it senses that I am at work or home based on my gps coordinates and then reverse that when I'm on the road i.e. not at those coordinates I set. Is there an app that does this?
View 5 Replies
View Related
Mar 2, 2010
i am implementing gps provider getting langitude and longitude from device i am already get the information in device i can implemented network provider that is the problem how can implemented using network provider
View 1 Replies
View Related
Jan 19, 2010
how does "location accuracy" use a wifi network?
View 7 Replies
View Related
Mar 16, 2009
I am unable to get the location updates when i use Network location provider. From the older posts i understood that to use NW location provider we need to do the following. code...
View 2 Replies
View Related
Mar 11, 2010
Is it possible to activate the network location provider on the android emulator? Maybe with a fake cell id?
View 1 Replies
View Related
Nov 29, 2012
having problems with my phone not showing the right location in google maps and other apps, this only happens on the mobile network really and in new areas i goto. It always fixes to one location i have never been to,
What files can i change or check for errors ? i have replaced the network location apk in the system/app directory with one that worked on my old phone, should i run and install this apk ?
View 3 Replies
View Related
Aug 27, 2010
My application needs to perform some activities in background (like interacting with the network and check the location and some other stuff), having or not the main activity visible. Which is the best way to achieve this? Should I write a service for each kind of job? Or just one service that performs everything? I am aware that I will need to launch threads / asynctasks in any case because the service runs on the same thread of the UI, but maybe having several services is a more clear and readable structure.
View 7 Replies
View Related
Jun 9, 2010
I'm working on a Push Notifications library for Android (http://deaconproject.org/) that needs to take action if network connectivity is interrupted or changed - namely, it needs to re-initiate a server connection or pause its operation until network connectivity is available. This seems to work fine using and Android BroadcastReceiver for "android.net.ConnectivityManager.CONNECTIVITY_ACTION".
My problem is in testing the library - I would like to automatically test the library's response to a broken network connection, or a transition from 3G to WiFi, under various configuration conditions. The problem is, I don't want to sit with the emulator and hit F8 all day.
Is there a way to programmatically manipulate network connections on Android from within a jUnit test without resorting to toggling Airplane Mode? I've already tried issuing commands to the emulator via the console, manipulating the GSM mode, etc, but while the phone state changes on the display, the Internet connection remains up.
View 2 Replies
View Related
Oct 3, 2009
I need to my current location using GPS programmatically.
View 4 Replies
View Related
Dec 19, 2009
We see the bigger font for Agree and disagree buttons for the Alert dialog when the network provider is selected in the location settings menu. Any pointers or suggestions which part of the framework code need to take a look. This dialog is controlled by Networklocation.apk which is not open source.
View 3 Replies
View Related
Oct 24, 2010
Based on what I've been reading, leaving GPS on won't drain more battery. It's just merely allowing apps to use the GPS.That said, if you have GPS on and have apps that use GPS, you will drain more battery.I want to leave my GPS on for "Where's my Droid." My question is this: how do I make it so that apps (weather widget, etc.) only use network location and not GPS? Is there a way to block all apps except those I choose from using GPS ?
View 7 Replies
View Related