My app able to receive push notification when app is not running on Motorola with Lollipop, But Xiomi with Lollipop unable to receive notification if app is not running.
Anyhow if app is opened it is able to receive notifications.
Is there any problem in Xiomi phones ?
Here is my manifest file permissions:
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="com.example.localmarket.permission.C2D_MESSAGE" />
<permission
android:name="com.uignet.localmarket.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
I just found that Xiomi phones has a setting "Auto Start" for the apps to receive notifications in the background. It is disabled by default. That's the reason its not receiving notifications. Just enable it make it work. and also enable notifications for the apps installed.
Related
I have an android application currently on the play store. Although the device runs perfectly well on all devices, I was trying to enable support for some Zebra devices that do not have camera support. Because the application has a camera feature and the device does not, the application shows not supported in the play store.
My question is, is there any way for me to enable the app for use on that device or bypass/not-require the camera permission for that specific device. I did research on this but found minimal information. So to sum it up, I am looking for a way to support my application on a device with no camera feature, and only use the camera permission if the device has a camera. Any help would be appreciated!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.25" android:installLocation="auto" package="com.some.package" android:versionCode="52">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="32" />
<application android:label="CM Mobile NG" android:theme="#style/HideTitleAndActionBar" android:icon="#drawable/icon_app" android:hardwareAccelerated="true"></application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.hardware.camera" android:required="false"/>
<uses-permission android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>
On Android12 devices, when using the bluetooth features, I get the flowing exception:
java.lang.SecurityException: Need BLUETOOTH permission
android.bluetooth.BluetoothHeadset.<init>(BluetoothHeadset.java:379)
android.bluetooth.BluetoothAdapter.getProfileProxy(BluetoothAdapter.java:3017)
My app's targetVersion is 29, and the related permissions have already declared in manifest.xml:
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
This problem will not happen when the app first loading, but happened after turn on/off the Nearby Devices ipermission. It seem that it will clear the BLUETOOTH permission?
I want make mirroring without WiFi-direct.
like chromecast mirroring function.
Chromecast application can access screen without
rooting&wifi-direct.
I found "capture_video_output" permission at API 19, but I can`t found any API.
So, I decompiled chromecast, but it hasn't "capture_video_output" permission.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
Is it right way for mirroring?(wifi-display)
How can I make mirroring application?
Or where can I get this info?
You can use Presentation APIs to mirror a view within your app (can be a virtual view) to a chromecast device if mirroring is happening. Otherwise, there is no API for you to mirror phone's screen to a chromecast device.
I have android app with next permissions
<!-- Permissions -->
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
But in my samsung tablet i've got This app is not comptable with your tablet. Android 4.2.2
What "uses-feature" I should set as
android:required="false" ?
I'm not sure if the Samsung tablets can vibrate or not, but if they can't, you will need to switch
<uses-permission
to
<uses-feature
And use the required flag. If it is not required, it won't be necessary and will not be filtered because of it. You will have to handle this for tablets that can't vibrate in code if part of your app handles vibrate. If it is not vibrate, then another one of these will be causing the issue and will need to change to uses-feature.
See Uses-Feature
On a secondary note, you should also check you're supporting the larger screen sizes with and not accidentally omitting xlargescreens from the manifest.
I am making an application in android which integrates twitter and facebook logins and save the logged user info. It is working fine in device with GPRS. But when I am trying to run the application with wifi it gives exception as below.
For Twitter: "Server error"
For Facebook: "DialogError"
please give me some hint to solve this problem.
use permission
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
I think u off ur WIFI in phone.