How to change the Animation settings of a device in Android - Java? - java

I have recently seen about a feature Remove Animations in my Android 10 device. So, how can we toggle that setting programmatically in java. This is what i am talking about

Actually, we cant. We can only modify the settings related to the app and not the device. Specially we cant make changes in the Accessibility section.

Related

Remove android setting screen from recent list [duplicate]

I was wondering if anyone had a relatively simple solution for us.
We created an app to be used by our clients on android devices that we give them.
We would like the client to only be able to use our app and have limited access to everything else (i.e. settings, email etc.) What is the best way to achieve this without using 3rd party apps.
Thank you in advance!
This may not help but the L preview has a task locking feature included that may be of some insight, I'm not aware of how it functions as yet
Task locking
The L Developer Preview introduces a new task locking API that lets you temporarily restrict users from leaving your app or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android. Once your app activates this mode, users will not be able to see notifications, access other apps, or return to the Home screen, until your app exits the mode.
http://developer.android.com/preview/api-overview.html
Hope this helped
Suppress the Title Bar & Make Your App a Launcher
Root Your Tablet
Modify System Files and Settings to hide the soft keys
On the next link you can find the complete solution for the Nexus 7 (2012)
http://thebitplague.wordpress.com/2013/04/05/kiosk-mode-on-the-nexus-7/
simple Answer is:
Lock Install button with modify system settings.
Create your own customized-ROM and apply your requirement to that ROM.
more info, visit XDADavelopers

Get State of Toggle Button in Another Running Android App

I am writing an App (MyApp) in Tasker that would need to read the State of a Toggle Button in another App (AppB) that I haven't written. It's for reporting purposes. I am a seasoned programmer, but are new to Android. Please bear that in mind:-)
Tasker have support for Java code, and have access to the full SDK of my Android 4.3 Phone.
The app will run on Android 4.3+.
I am already using AutoInput that is perfectly capable of getting the ID of widgets (Buttons etc) in other Apps, and AutoInput is also capable of Pressing these Buttons (AutoInput Accessibility must be turned ON). AutoInput will have support for what I am asking later, but I badly need it now!
So the question is:
How can MyApp get the State of a Toggle Button (with ID "toggle") in AppB using Java?
I am afraid this will not be possible by easy means. The applications in Android are isolated and cannot ask for others' applications controls due to the security policy. Without the access to the AppB code and possibility to change it this will not be possible.
The AppB would have to share the state of the toggle to your app: either via content provider or simple intent each time the toggle is changed. This requires changes in AppB code which I assume is not possible in your case. I see no other way to get around this.
I am writing an App (MyApp) in Tasker that would need to read the
State of a Toggle Button in another App (AppB) that I haven't
written
In Android, by default each of the application runs in its own process and each app is Sand-Boxed.
Therefore, you cannot read the data from other application until it is shared explicitly by the particular application.

Programmatically mute an Android wearable

I programmatically want to mute the entire watch. So I wanted to do these things:
1. Mute to on , so go into non vibration mode. Will manufacturers be able to add sound capabilities to watches? Otherwise I would also have to add muting of sound...
2. Screen always on , to off. It's a system setting. Can I change it programmatically?
I already tried for point one to use the MediaManager:
AudioManager audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
audioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
I tried all other ringer modes also just to be sure and nothing seems to work and change anything in the emulator and on my real watch but nothing is doing the job...
A pebble watch has night or silent mode support... So I won't be that hard to do it on a wearable I thought.. Any ideas on this one?
Wear 5.0.1 has some ability! the SDK sample Watchface has a way to detect it. Look for WatchFaceService.INTERRUPTION_FILTER_NONE - RoundSparrow hilltx
from this question here: Android Wear detect "Mute"
Maybe with requestInterruptionFilter where fitler mode are:
INTERRUPTION_FILTER_ALL
NTERRUPTION_FILTER_NONE
INTERRUPTION_FILTER_PRIORITY

Does Android have an Internet status turning circle in the top bar like the iPhone has?

The iPhone has this swirling icon, which you can make appear when the Internet is working behind in the background. It's a VERY simple call to turn it on/off.
Does Android have anything like this? How do I call it and how does it work?
You should display this in the ActionBar.
The simplest way
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(true);
Or using ActionBarSherlock for backwards compatibility
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setSupportProgressBarIndeterminateVisibility(true);
No, i haven't seen it on android yet. However with ICS and above, we see 2 arrows accompanying the WiFi or 3G to indicate if there is activity on the network. However it may not be possible to programmatically control it.
You could otherwise use a indeterminate progress bar within your activity to show background work.
You could try using Android Notifications and use an AnimationDrawable. Check this answer. (Note that I haven't tried it).

SlidingTab on Lock Screen vibrates when unlocking - regardless of the global settings about haptic feedback

When unlocking my android 2.3.3 phone at the simple lock screen it vibrates once the slider is touched and a second time a little longer when the slider has been pulled completely to the other side.
I found it a little annoying and so I thought I could somehow switch it off in the settings as I can switch off any other vibration.
There are actually two categories which might make sense in this case:
1) Sound Settings/General/Vibrate with the individual settings: (always, never, only in silent mode, only when not in silent mode)
2) Sound Settings/Feedback/Haptic Feedback (on/off)
I had to find out, that none of these settings have an impact on the unlocking action mentioned above.
So I googled and found some comments about the fact, that the vibration cannot be switched off easily in the settings.
e.g.
http://code.google.com/p/android/issues/detail?id=34040
Now I got curious and I tried to dive in a little deeper into the android sources and found the source for the slider here: https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/widget/SlidingTab.java
see:
vibrate(VIBRATE_SHORT);
and:
vibrate(VIBRATE_LONG);
It seems to me that the vibrate action is called regardless of any settings.
Now I have some questions:
Shouldn't the vibration for unlocking consider the settings from either 1) or 2) above?
How would this be added to the source code and how would this change be applied to the android source repository so that some time later this could be migrated into the next android (if the sliding tab is used there at all)
Would it be possible to update the file SlidingTab.java seperately and test it on my rooted device or would it be necessary to do the complete make for the whole android system and flash my mobile phone with the new system in order to see if it works?
I have found other mobile phones with the same slider and no vibration when unlocking. I am clueless how this can be after I found the prove that it is not able to switch off the vibration in the source code.
thank you for sharing your knowledge with me
Nils
It may be consider or may not.
Not sure here.
If you need to change lock screen at all you can find various implementation. If you need to change default lock screen you need to build entire system.
Every companies customise Android for the phones. Therefore some sliders may have no vibration. Or the phone may have no hardware for it.

Categories

Resources