Android 5 Lollipop disable vibration globally - android

I am currently using the "deprecated" code in the example below to disable vibrations globally on the phones using my app, but so far I have discovered that it is no longer working in Android 5, but it had worked fine in Android 4 and below. There are many complains about Google taking the silent mode out but there must be a way how to disable vibration, I guess. But I couldn't find any other example in the documentation nor via google.
Any ideas pls help...
The example:
Enabling and disabling vibration in android programmatically

The only way to fully disable vibrations at the moment in Lollipop is Silent Mode (which is completely different than what our old silent mode is). I hope this gets fixed, but there is no other way currently to disable it all.

Related

Android 7.0 Toggle Airplane Mode Programatically

I have tried all solutions already provided on StackOverflow but they are all quite old and no one seem to have tried it for nougat. I am making a utility tool which allows a user to toggle airplane mode on nougat, Someone please share a way to do that programatically. Also I have not been able to find any help regarding notification pull down programatically.
You can't toggle airplane mode programatically. Check the Official Android 4.2 API Documentation
Also tried all the older suggestions, the only thing i have in mind is to open the airplane mode screen with :
Intent airPlaneModeIntent = new Intent(android.provider.Settings.ACTION_AIRPLANE_MODE_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(airPlaneModeIntent);
and then use adb commands to tap on the radio button with the on/off setting.

Create custom LockScreen for Android

I'm trying to create a custom lockscreen for Android version 7.1.1. (Nougat). I know that there are a lot answers on how to create a custom lockscreen, but whatever code I try to use, it's not really working.
The problem appears because of using deprecated methods. The app crushes, and there are no methods to replace the deprecated ones.
Does anyone know a way that this still works?
These are some of the links I've tried to use (there were a few older ones also but I didn't save them):
how to make our own lock screen in android instead of default lock screen
https://github.com/thomasvidas/Simple-Lockscreen/tree/master
developing an android lock screen application
Create custom lockscreen for android 4.0 or above?
At the end I managed to make this app working. My biggest problem was to put my device in kiosk mode (disabling hardware buttons when the lockscreen is displayed). The solution that worked for me was enabling device owner mode using Android Debug Bridge. It wasn't the best solution, but it was the most acceptable one for this project.
Here are some of the links that I used to achieve this:
https://documentation.meraki.com/SM/Device_Enrollment/Enabling_Device_Owner_Mode_using_Android_Debug_Bridge_(ADB)
http://www.sureshjoshi.com/mobile/android-kiosk-mode-without-root/

Multiwindow playground sample in Android Automotive N

Iam trying to run Android multiwindow sample https://github.com/googlesamples/android-MultiWindowPlayground on Android Automotive N. Inorder to switch app into split screen mode, it is suggested to long-press the recents button. Though the resizableactivity attribute is set true in Android manifest, it doesnot works in split screen mode in Headunit.
Please let me know how can I enable split screen mode in Android N Automotive Headunit?
Hope I understand your question, but fairly sure the point of Android Auto is to provide 'safe' access to some phone features, multi-window kinda defeats that purpose so I'm guessing the force it off in the Android Auto app.

How to support new ambient mode in android wear?

Since last update Android Wear has a new feature - the always-on mode. This means that the Android Wear device doesn’t turn off the screen; it changes to the ambient mode to save battery and keeps certain apps running in the background.
How exactly should I implement this?
p.s. I'm developing sport application, not watchface.
We have also created a code lab to run through the steps. Please find it here:
https://io2015codelabs.appspot.com/codelabs/always-on#1
What you're looking for is how to support "Ambient Mode" in your Wear app's activity.
There is an entire doc dedicated to this:
http://developer.android.com/training/wearables/apps/always-on.html
As well as a code sample:
https://github.com/googlesamples/android-AlwaysOn/

Immersive mode locking app on Nexus Tablet

I just ran in to to an issue with immersive mode locking my app when testing on a android tablet (nexus7).
The only way to exit the lock was to swipe up to get back the software navigation bar and exit immersive mode.
How do I prevent this? What is happening?
The issue only appears when trying to enter immersive mode on a non-owner account. Android tablets support multiple users but apperently only one of them is considered "owner" According to issue https://code.google.com/p/android/issues/detail?id=62366 the problem is known by google but no fix as of yet.
The problem is that the helpscreen that pops up is hidden/invisble but is still receiving the touchevents. It can be removed by clicking in the correct location but it can be somewhat tricky to find it when you have no visual clues as to where to click.
Hope this helps save someones time!

Categories

Resources