Android :: GPS Toggle / Intent For Setting Menu
Oct 23, 2010I want to active and deactive the GPS when I touch a button, without I must run the intent that bring me into setting menu for active or deactive GPS.
View 2 RepliesI want to active and deactive the GPS when I touch a button, without I must run the intent that bring me into setting menu for active or deactive GPS.
View 2 RepliesWhat is the permission required to toggle the phone GPS setting?
View 2 Replies View RelatedHow do I set the intent of menu items defined in an Android menu xml file? For example I currently have...
<menu xmlns:android="http://schemas.android.com/apk/res/android" android:name="Main Menu">
<item android:title="@string/resume_game" android:icon="@drawable/resume"></item>
<item android:title="@string/play_golf" android:icon="@drawable/play_golf"></item>
<item android:title="@string/my_rounds" android:icon="@drawable/my_rounds"></item>
</menu>...........
Is is possible to port into stock/CM rom? ( like the way it is arrange ) hate the sliding one.
View 1 Replies View RelatedYou know that you can get settings toggle widgets i.e mobile, WiFi, airplane? Well when I set up the widgets I see that it will have a certain image next to it for example with 'mobile widget' there is a blue planet type image, which I have seen other people have on screenshots via thread on here. However when I actually have the widget on screen its just boring black with 2 arrow pointing opposite ways. Anybody know why or how to change it?
View 4 Replies View RelatedAlright guys, please bear with me as I'm new to the Droid, Android, and GPS capability in my phone. I downloaded Beautiful Widgets (totally awesome, by the way) and I just want to confirm how the GPS toggle widget works since it seems to just be a shortcut to a setting in the OS as opposed to the wifi and Bluetooth toggle widgets which do their own thing. When you tap the GPS toggle widget it, it takes you the "location & security settings" part of the OS settings. I'm assuming that at this point you either check/uncheck the "Use GPS satellites" to turn on/off the GPS chip in this phone? Can I leave it unchecked and just before I need to get some directions or navigation, turn it back on? What I'm getting at is: Can I turn it on and off according my need for it at any given moment?
View 4 Replies View RelatedI am trying to a menu item to launch the Send intent. This is what I did, I see the menu item
but i don't see send intent launch when i select the menu item. code...
I have one WidgetProvider but expect the user to have multiple instances of the widget on the home screen. When the user clicks on the widget, an intent is fired to start an activity A passing a String extra (which is specific to that instance of the app widget). Everything works fine unless the activity is already running, in which case the activity is shown in its previous state (and so the intent extra data is ignored). I've tried using various Intent flags (like FLAG_ACTIVITY_NEW_TASK) but they don't seem to help.
View 4 Replies View RelatedI'm trying to catch an action like ACTION_HEADSET_PLUG. But I think it might be too much to set this action on the manifest file.
How could I register a listener for this action? I only need to care about it when my application is running not all the time as I think it would happen when registering it under the manifest file...
I'm trying from main Activity (MainFile.java) to open a Map as a new intent through a menu. Something like this...
CODE:..............
And I already have set up thing on my manifest.xml with access to...
CODE:........
It worked fine with other File.class, but with the Map.class doesn't seem to be working.
I have a program that sends a broadcast Intent that needs an "extra" value.The value is declared as being of type Object[], though I know that the elements are always of type Integer or String.That's part of an API not under my control. What's the most concise and/or efficient way to do the equivalent of the putExtra call below?
View 6 Replies View RelatedI am attempting to get my app to open a settings menu screen and return. The problem I am having is when in the settings page, upon pressing the back button, the app closes. I am VERY new to programming in general after fighting this for about 8 hours. code...
View 1 Replies View RelatedCan you please tell me how can I create an android menu item using android setting icon?
View 1 Replies View RelatedI am having trouble setting one menu item/button to run different actions based on other actions currently running(ie having the button toggle actions). what I am trying to do is have a menu item to toggle wifi on and off but when I try to run if/else statements on the menuitem click it force closes the app.
View 2 Replies View Relatedhow to add app to setting menu
View 3 Replies View RelatedHow do you put the desire into car mode? I cant see any menu for this but when I plugged in the usb cable it came up in notify area on its own?
View 4 Replies View RelatedI have a repeating alarm setting, I have the activity being launched, the piece I'm missing is having this triggered after x minutes of inactivity.
I'm considering keying off of SCREEN_OFF in a service and then setting an alarm and canceling it on SCREEN_ON, does anyone have an intent or other suggestion for this. I've considering polling for tasks, all kinds of pieces but I'm stuck.
Requirement:
- App launches, alarm is set to relaunch app after 5 minutes, user exits/app exits after one minute
- alarm triggers, detects phone is in use, resets alarm to trigger in fives minutes
- if phone is idle relaunches app for one minute
Is there a way to add common system setting into the notification pull down menu?
On my old Samsung Galaxy S3, when you swipe down from the top of the screen and pull down notifications, at the top above notifications are buttons for common system settings to access (in order they are: Wi-Fi, GPS, Sound, Rotation, Bluetooth, Smart Stay, Airplane Mode, Power Saving, Hands-free mode, Screen Mirroring)
This was very useful because was easy to quickly access key functions. For example "1) swipe down and 2) press WiFi to turn on/off" or "1) swipe down and 2) press GPS to turn location on/off".
On my new Nexus 5 this functionality does not exist. When you swipe down to see notifications, key system buttons are not present. Instead there is a single system button in the upper right corner which you need to press to for common system settings (Brightness, Settings, WiFi, Mobile [ATT/Verizon], Battery, Airplane Mode, Bluetooth, Location)
This means to access common system settings requires an extra step. For example "1) swipe down, 2) press system button and 3) press WiFi to access WiFi page"
Is there a way to put these common system setting into the notification pull down menu?
standard four option menus displays 2 by 2. but i want to know that How to arrange 4 by 1. I just want to custom option menu like that. 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+unsubscribe@googlegroups.com For more options
View 2 Replies View RelatedI want a user to be able to long press a contact and be offered a menu item of my own that can run an activity of my own. 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+unsubscribe@googlegroups.com For more options
View 3 Replies View RelatedI want custom option menu to arrange three menu items where 2 menu items are displayed at the top and the third below it. Just as the following layout...........
View 12 Replies View RelatedI'm trying to add custom menu items in a WebView Context Menu. Unfortunately, my items are shown in the menu of the first web page I load , but then if I load a second page, a long press only shows the standard context menu items. Mine are gone. I've put a Toast inside the code and it is displayed as well on the first loaded page, but not on the second. I'm using the code below:..............
View 6 Replies View RelatedIs it possible to add a custom menu item to the long-press menu that opens in any text box?
View 3 Replies View RelatedI have an Options menu up and running in my Android application and I've overridden the onCreateOptionsMenu, onOptionsItemSelected and onPrepareOptionsMenu methods to customize the menu a little. My question is related to keeping the Options menu open after the user clicks on a menu item. Basically, I'd like to be able to hide the menu until the user clicks on the device menu key. Once the user clicks on this key, I'd like to be able to hold the menu in place regardless of how many times the user clicks on menu items. If the user wants to hide the Options menu, they'd just need to click on the device menu key again. Is this type of interaction supported (or even advisable).
View 1 Replies View RelatedAndroid question. If i create an Options menu with menu.xml, can I change the menu buttons' standard text size, color etc using xml? I would like to change text size, bold, and color. I would like to avoid using themes and styles for this application.
View 1 Replies View RelatedCan anyone kindly guide as to how can I invoke a context menu on the press of a menu item. I googled a lot for the same, but nothing turned up. Look forward for your valuable help.
View 1 Replies View RelatedOn pressing menu button , I have 2 options : Add & more.On click of more i have 3 options : Organize ,Export & Exit On click of Organize i want other 5 options.On click of more i get my submenu. But i want other 5 options on click of organize.How do i proceed? My code in parts is as follows :XML file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/more"
android:title="@string/moreMenu"
android:icon="@drawable/icon">
<menu>
<item android:id="@+id/Organize"
android:title="@string/Organize" />
<item android:id="@+id/Export"
android:title="@string/Export" />
</menu>
</item>
<item
android:id="@+id/add"
android:title="@string/addMenu"
android:icon="@drawable/add"/>
</menu>
Java-------------------------
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
public class ToDoList extends Activity {
Menu menu;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.todolist);
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.layout.categorymenu, menu);
return true;
} public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.more:
Toast.makeText(this, "You pressed more!", Toast.LENGTH_LONG).show();
//(What needs to be done from here)
return true;
case R.id.add:
Toast.makeText(this, "You pressed add!", Toast.LENGTH_LONG).show();
return true;
} return false;
} public boolean onPrepareOptionsMenu(Menu menu) {
return true;
the difference between context menu and option menu in android? When I click the menu button on the emulator, is that option menu? or context menu? And how to invoke the other menu (not trigger by the menu button)?
View 2 Replies View RelatedIs there a way to toggle or even an app to use edge only? I have the HTC Aria, and can't seem to be able to select network. It's greyed out, and not sure why. It's my first android.
View 8 Replies View RelatedI know there are ones that are a shortcut, but I'm referring to one that acts like the "Mobile" widget on Sense. The market is cluttered with widgets that control, WiFi, GPS, Bluetooth, Brightness etc...
View 2 Replies View Related