What's Intent I can make my app open Settings for enabled and disabled Data Package?
I try ACTION_DATA_ROAMING_SETTINGS but I'm wrong, because don't make the that I want.
I need just enabled and disabled data package...
The mobile that I use is motorola defy, and the Intent that I find that make the that I want is: com.motorola.blur.datamanager.app.DataManagerAppPreferenceActivity. But I need of native Intent of Android, because my app will run in device others.
Related
I am working on an application that has a requirement to lock the RAT on devices. I just want to lock only two modes i.e. "LTE Only" or "WCDMA Only".
We can do this without using an app from phone dial app by running ##4636## and choosing Phone Information and the "LTE Only" or "WCDMA Only".
I have also tried QXDM to set these values on NV Item 10 but it doesn't persist on reboot. So if some one have good knowledge of QXDM and share that knowledge then it would be really helpful.
My final goal is to do this from Android application that has root access.
I developed an app and copied it to /system/priv-app in a rooted Android device to make my app a system app and It works But still when I try to run below code I get an exception that only system can broadcast this.
val newIntent = Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
newIntent.putExtra("state", false)
sendBroadcast(newIntent)
My Android version is 7.1.1 is there any workaround for this? I want to broadcast this after changing the airplane mode with this code
Settings.System.putInt(contentResolver, Settings.System.AIRPLANE_MODE_ON, 0)
Your app has to be signed by the platform key and also assigned the system user (specified in the manifest.) Placing the app in /system/priv-app does not grant it any special functionality.
We are developing a locked down "kiosk-style" Android app on a stock Samsung tablet, which is mounted in customer vehicles. We would like to be able to allow customers to edit their wifi settings, without giving them access to the rest of the Settings app (e.g. Launcher, accounts, etc)
We have been able to launch the Wifi Settings activity, but it allows the user to go into other areas.
I'm not sure whether it's possible to create a custom interface for connecting to wifi, but even if it were possible, this seems fragile and a lot of work for something quite simple.
Is there any way to solve this well?
I would create a device policy controller app that is provisioned on the device as a device owner using Android Enterprise (Android for Work) APIs.
https://developers.google.com/android/work/dpc/build-dpc
As a device owner, you can set your app in lock task mode which is generally used for kiosks.
https://developer.android.com/work/cosu.html
Then, you can set user restrictions:
addUserRestriction api
user restrictions list
The user restrictions don't cover everything in the settings app, but the coverage is pretty good.
Then I would provision it using NFC or QR code reader from the Google Setup Wizard welcome screen.
https://github.com/googlesamples/android-NfcProvisioning
You might want to also look at existing open source EMM/MDM implementations that already exist such as WSO2.
Other references:
How to enable task locking in Android 5.0 production devices
How to make sure there is only one app
I was also working on Kiosk Type applications and we have to give options for Change wifi and Display Settings So we have used these commands on Button click for Wifi And Display
Settings
btnWifiSetting.setOnClickListener {
startActivityForResult( Intent(android.provider.Settings.ACTION_WIFI_SETTINGS), 0);
}
And For Display Setting
btnDisplay.setOnClickListener {
startActivityForResult(Intent(android.provider.Settings.ACTION_DISPLAY_SETTINGS),0)
}
And you can also check the full list of Available Commands here
https://ourcodeworld.com/articles/read/318/how-to-open-android-settings-programmatically-with-java
try LineAgeOS
https://lineageos.org/
Your requirement needs to access OS System level, this way you have access and customize the WIFI settings before releasing the phone itself
can you try this way.
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager.isWifiEnabled()) {
wifiManager.setWifiEnabled(false);
Tools_WiFi.setImageResource(R.drawable.tool_wifi_off);
} else {
wifiManager.setWifiEnabled(true);
Tools_WiFi.setImageResource(R.drawable.tool_wifi_on);
}
You can try this:
startActivityForResult(new Intent(Settings.ACTION_WIFI_SETTINGS), 0);
Hope it helps you.
I developed a custom watch face (Android Wear 5), works perfectly during testing. Uploaded to Google Play and download to test, but it does not show up in the Android Wear app, nor the paired watch itself (running Android Wear 5.0.1)!
I uploaded the mobile apk (similar to my other Android Wear apps), and also have the same permissions for both mobile and wear.
Anybody encountered similar problem? Here's the Watch Face if anybody wanted to test it out: https://play.google.com/store/apps/details?id=com.virtualgs.retrowatch
Are you sure you received an update to your watch face already? You will only see the new watch faces after an update.
If you do have an updated watch, try going to the Android Wear app on your phone, Settings -> Resync apps.
EDIT:
I looked into the logcat of the watch and I saw an attempt to install your watch package:
I/WearablePkgInstaller( 582): Sending install intent to PackageInstaller Intent { act=com.google.android.clockwork.packagemanager.INSTALL_PACKAGE dat=content://com.google.android.clockwork.home.provider/host/com.virtualgs.retrowatch/wearable/com.virtualgs.retrowatch/apk typ=vnd.android.cursor.item/wearable_apk pkg=com.google.android.clockwork.packageinstaller (has extras) }
W/WearablePkgInstaller( 1859): Wearable com.virtualgs.retrowatch has a permission "android.permission.PROVIDE_BACKGROUND" that is not granted in the host application.
You forgot to add PROVIDE_BACKGROUND permission to you phone app (wearable permission set has to be subset of the phone permission set). Remember, that you also need wake lock permission, in case you didn't add it.
EDIT2:
You are declaring wrong permission for providing background. This is the correct one:
com.google.android.permission.PROVIDE_BACKGROUND
Android app which i am developing has some modes like:
Kiosk Mode
Normal Mode
Semi-Kiosk Mode
Now my question is while my app is running in a Kiosk mode it will blocks all the other apps to open/make himself on the top. So user is unable to go to the settings screen.
I want a way to provide a Wi-Fi settings within my app so that user can do:
Search for the Wi-Fi nearby
Select and provide the password
Can see which Wi-Fi node is connected
Any help will be appreciated.
I know this is a bit old, but just in case it saves someone a little bit of research in the future this is a solution that I came up with for a similar use case.
Just use the activity that Android provides for managing wifi (without the user seeing the rest of the settings) by manually assembling an intent like so:
Intent intent = new Intent("com.android.net.wifi.SETUP_WIFI_NETWORK");
intent.setComponent(ComponentName.unflattenFromString("com.android.settings/com.android.settings.wifi.WifiSetupActivity"));
intent.addCategory("android.intent.category.DEFAULT");
startActivity(intent);