[Q] Widget change settings doesn't update after manually changing settings - Java for Android App Development

I am kinda new to android programming. I am trying to make a widget that turns off and on the airplane mode. I am having trouble updating the widget after I manually change the Airplane Mode in the settings. I assumed that the onUpdate function would be invoked once I go back to the Homescreen, but I am wrong. I need some guidance...

Maybe there is a system broadcast for changing to airplane mode. Google that.
If there is one, look at BroadcastReceivers.

http://stackoverflow.com/questions/4319212/how-can-one-detect-airplane-mode-on-android
Second answer shows how to detect state change using a broadcast receiver.

Related

[Q] How to create Power Saving button?

Hi there,
I am looking for a way to create a button that enables power saving mode: turning off wifi, nfc, 3g, sync, set lowest brightness… And with same button I can set the normal mode again. I would like it to be in the quick settings but if it is not possible it is okay.
Any suggestion?
I am running rooted stock.
Apps
alturigo said:
Hi there,
I am looking for a way to create a button that enables power saving mode: turning off wifi, nfc, 3g, sync, set lowest brightness… And with same button I can set the normal mode again. I would like it to be in the quick settings but if it is not possible it is okay.
Any suggestion?
I am running rooted stock.
Click to expand...
Click to collapse
Hi Alturigo,
There are apps in the store who can save battery by turning off wifi, 3g etc. with widgets. https://play.google.com/store/apps/details?id=com.ijinshan.kbatterydoctor_en&hl=nl
You can use airplane mode too but it disable phone calls.
Going one by one I can already do it (quick settings, widgets), but I want a single button that will switch off everything I want with one click.
I expected to find this in GravityBox (it has everything!) but if there is an option I don't see it.
Any easy way or I need something like Tasker?
i will tell you about my set up. i have automatic brightness, that works for me
i have gravity box for toggle 3g/2g on data on/off
i have auto sync free to enable all sync when wifi is on.
everything else can be toggle on off by gravity box toggle on notification area (i have the option to open setting on drop down menu if there are on notifications). you can also find some toggle programs on the play store

[Q] Force GPS/location access settings to stay on regardless of toggle?

I'm trying to see if I can override GPS/location access settings to stay on. Is there a lock app that will break down settings by category? I don't want to lock the whole settings down, just that part. I want to ensure I can track phone regardless.

Use Tasker to switch on and off Airplane Mode on Lollipop

Hello,
I would like to show you how to automate Airplane Mode switching on a Z1 Compact (or another mobile...) with Tasker.
1.
The first version is simple. Use Airplane Mode settings of tasker. It works, but if the android "settings" menu run in the background it fails.... You can try this.
2. The 2nd version is better.
note:
The "Repülőgépes üzemmód" means Airplane Mode in Hungary. It is the label of the button/switch. You can change it. :good:

App dedicated to enabling silent mode [Quest for a simple APK]

Dear XDA Community,
As you know thanks to touchwiz it is still possible to turn on silent mode on Android 6.0.
I have been searching the web for hours but could not find "a simple app that when launched turns on silent mode without the need to tap anything (like a widget)".
Can you tell me where to find such an app ? or create it for me ?
I would really appreciate it and I think it help other people facing the same issue.
You must be thinking why isn't he using a widget or an app with a button to tap or something like tasker for silent mode. Well that's because I don't like Tasker and use "Smart connect" instead but Smart connect has limited sound options (ring/vibrate/Do not disturb). However Smart connect allows you to launch an app automatically, so a workaround could be to launch this simple app automatically.
Why the following solutions won't work for me :
- Do not disturb mode
On samsung phones correct me if I'm but you can't set up more that one DND profile. The problem is I need silent mode when I'm at work where I can't accept any sound. On the other hand I use DND at night where I only allow calls (in case of emergency).
- Sound mode toggle widget
I want silent mode to turn on in a certain time period on weekdays. I don't want to have to press a widget every time. I don't even need a widget for that because I could tap on the quick setting in the notification menu.
- A tasker like app for sound modes
Would work but I don't like the idea to have several tasker like apps on my phone. I believe having multiple tasker-like apps triggers wakelock that would impact battery life and/or create wakelocks.

Question How can I automatically mite phone when I'm at work?

I'm been using iPhone for a while and there was a setting to automatically change to work mode when I was at work using the GPS. Is there any option to do that? I saw that you can set it depending on the time and an event in your calendar but not depending on the GPS.
There is an app called Llama - location profile on the play store which can automatically change your sound profile based on your GPS location, I think that is what you're looking for.
On the other side, there's Flip to Glyph

Categories

Resources