Why is my Android application crashing on Samsung Galaxy Note 9? - android

So , I was developing an Android application for Arduino and I was right about to post it on Google Play but first I though I should test it on different devices. So I sent my apk to a few of my friends.
Here are the devices i tested it :
One plus 6T : works perfectly
Asus zenfone 5z : again works perfectly
Samsung galaxy note 9 : when the app is opened it instantly crashes
Has anybody ever encountered such thing ?
My first guess was about the resolution of the device: the first two devices are running at a resolution of about 2280x1080 while the Note 9 runs at 2960x1440.
I added into the Android Manifest file the lines for supporting screens but seems that they don't help.
I also created "Landscape variations" and "tablet variation" for my first three activities but that also didn't helped.
Here is my Manifest code :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.edi.bluetoothgoogleplay">
<uses-feature android:name="android.hardware.bluetooth" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<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.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:xlargeScreens="true"
android:smallScreens="true">
</supports-screens>
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/newicon"
android:label="Arduino Controller"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".FirstActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ChooseActivity"
android:screenOrientation="portrait" />
<activity
android:name=".CarActivity"
android:label="#string/title_activity_car"
android:screenOrientation="landscape"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".LedActivity"
android:screenOrientation="portrait" />
<activity
android:name=".TerminalBluetooth"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
</application>
</manifest>

Related

Developing an app only for Tablets - how to?

I want to run my android app only on tablet , but it's running in phone also.
My Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.sample">
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.screen.landscape"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme1"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Can we run the app in generic phones when we apply android:normalScreens="false" & android:smallScreens="false" in supports-screens tag in android manifest file
You can do this:
In your first activity use this and get the size of the screen
If the size is not a tablet size, make a alert that say this app is only to tablet, then show a white screen/ another thing

Application is not compatible with Galaxy Tab 3 (GT-p5210)

I uploaded an application to Play Store which I can't install on Samsung Galaxy Tab 3. It just tells me that device is uncompatible and no reason. I've checked in Developer's Console and it is also unsupported by Galaxy Tab 3 7.0, Galaxy Tab 4 and other tablets. Here's my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="***"
android:versionCode="2"
android:versionName="1.0.1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:name="***.App"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="***.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="***.DocumentInfoActivity" />
<activity android:name="***.ReaderActivity" />
<activity
android:name="***.ImageOverviewActivity"
android:theme="#style/Theme.Transparent" />
<activity
android:name="***.AccountsActivity"
android:windowSoftInputMode="stateHidden" />
<activity android:name="***.SearchHelpActivity" />
<activity
android:name="***.DeveloperSettingsActivity"
android:label="#string/preferences_title" />
</application>
</manifest>
As you can see there's nothing special which can influence on compatibility. Can there be some hidden reasons in code for example? How can I fix and test this?
I can install and run the app on SG Tab 3 avoiding Play Store.
I'm not 100% sure but it could be, that your front facing camera has no autofocus, thats why you'd have to add following in your AndroidManifest.xml:
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
please let me know, if this worked - cause, I'm pretty sure, that some persmissions are to restrictive
Edit:
you can test the modification, if you upload the new apk in alpha or beta mode. After some hours your test accounts will receve the update, but it's not published yet.

Cordova PushPlugin not working on Galaxy S2, does work on S3 (same API level)

We've build a PhoneGap / Cordova app and use the PushPlugin for handling push notifications.
On the Galaxy S3 (Android 4.1.2) everything works fine, we do receive push notifications. However, on the Galaxy S2 (also Android 4.1.2) we don't receive push notifications (although we DO receive the devicetoken).
As both deviced are running the same Android version, they have the same API level. Also because it works on newer (S3) devices, I assume the code is OK.
Here's our AndroidManifest.xml:
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="8" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="com.APPHQ.APPNAME" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-sdk android:minSdkVersion="11" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.APPHQ.APPNAME.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.APPHQ.APPNAME.permission.C2D_MESSAGE" />
<application android:allowBackup="true" android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="APPNAME" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.plugin.gcm.PushHandlerActivity" />
<receiver android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.APPHQ.APPNAME" />
</intent-filter>
</receiver>
<service android:name="com.plugin.gcm.GCMIntentService" />
</application>
</manifest>
Any idea what we need to do to get push notifications working on the S2?
Many thanks!
Robin
You must have checked this but still want to remind you to check below things for GCM to work on the device
The device should be configured with one valid gmail account
The Android Market (Play store) must be logged in (You should accept the terms and license)
The Data connection is properly working
I guess your main package is "com.APPHQ.APPNAME".
Place your GCMIntentService class inside this package and declare it in manifest file as follows :
<service android:name=".GCMIntentService" />
Hope this helps.

Android app compatible with 0 devices

My app https://play.google.com/store/apps/details?id=com.picturesexperience.camera is not visible on any mobile device. Installs with no problem from the APK file (that is actually how I distribute my app right now), works perfectly, but for some reason Google Play doesn't list it. Any suggestions.
The app uses QR code scanning library from Zxing, everything else is custom coded.
The app's manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.picturesexperience.camera"
android:versionCode="2"
android:versionName="1.4" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" />
<uses-feature android:name="android.hardware.CAMERA" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.picturesexperience.camera.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".CameraActivity" android:label="#string/app_name" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" />
<activity android:name=".UploadActivity" android:label="#string/app_name" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" />
<activity android:name=".LoginActivity" android:label="#string/app_name" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" />
<activity android:name=".PictureViewActivity" android:label="#string/app_name" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden" />
<activity android:name="com.google.zxing.client.android.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
<uses-feature android:name="android.hardware.CAMERA" />
...should be...
<uses-feature android:name="android.hardware.camera" />
The uses-feature is case sensitive and lower case, so in effect you're stating that you're using a feature that does not exist on any device.
Case sensitive
Permissions and features are case sensitive. Try with the following instead:
<uses-feature android:name="android.hardware.camera" />
Required=false
Also make sure to add android:required="false"for max device compatibility. Otherwise devices without back camera (like nexus 7 tablet) will still be ruled out.
<uses-feature android:name="android.hardware.camera" android:required="false" />
More information here: http://developer.android.com/guide/topics/manifest/uses-feature-element.html
I have face this problem, but after searing a few hours i got a solution in my app.
I am using
<uses-feature android:name="android.permission.READ_PHONE_STATE" />
while its should be
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
So that i want to say that please check carefully your permissions and feathers. Also remove those permission which is not required in your application this thing will increase support device.
I hope it will work for you.
I know it is late to answer, I face the same problem. With setting all users-features as false, play store still shows zero devices supported.
Here is solution, hope will help someone
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
Also
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
Hope it help.
You can check why your app is incompatible by checking the device catalog:
Select device catalog from menu
Show all devices
Then select any device, click on the blue arrow to see details and check the entry 'track status'

Android App not supported on many devices

I cant find out why my app is not supported on many devices like Xperia Z or Samsung Galaxy S4 and many more. Especially the newest devices and tablets are not supported.
Here is my manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.baoss_CDB"
android:versionCode="3"
android:versionName="1.2.1" >
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:resizeable="true"/>
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:name="com.baoss.Misc.MyApplicationContext"
android:icon="#drawable/cdb"
android:label="#string/app_name"
android:logo="#drawable/cdb"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name="com.baoss.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.baoss.MenuActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
...
<activity
android:name="com.baoss.SettingTermsOfUseActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
</application>
I hope you can help me=).
One thing I can notice is about
<uses-permission android:name="android.permission.CALL_PHONE" />
Infact that permission implies android.hardware.telephony features, which is generally available just on phones and not in tablets. Try marking that feature as not required:
<uses-feature android:name="android.hardware.telephony" android:required="false" />
Don't forget to check at runtime if the current device has phone capability:
PackageManager pm = getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)){
//Add the code for making call
}else{
//Add the code for devices where telephony is not present, if needed
}

Categories

Resources