I did many things to try and make my app compatible with tablets but nothing works. Here is what i tried:
I have 5 folders drawable(ldpi,mdpi,hdpi,xhdpi,xxhdpi) and every folder contains the same images with different size.
I have 3 layouts folders (small, medium, large) and everyone contain the same xmls
I added this code and made anable the telephony which my app uses:
<uses-feature
android:name="android.hardware.telephony"
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
Also added this code for supported screens:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
I also have min sdk to 8.
What am really confused about is that i have an app already in store that doesnt use any of these and its min sdk is 8 and it says its compatible with tablets. It only has tha drawable folders, the layout folders and in this app i also have outside the /res folder, image folders like Images-ldpi, images-hdpi etc with the same images that i have in drawable folders.
By google what ive done to the first app should have worked by now but it doesnt.
My Manifest of the app that doesnt work on tablets:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
android:versionCode="6"
android:versionName="1.0.6" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-feature
android:name="android.hardware.telephony"
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="#drawable/olympialogo"
android:launchMode="singleTop"
android:logo="#drawable/olympialogo"
android:theme="#style/AppTheme" >
<receiver
android:name="com.myapp.BootCompleted"
android:enabled="true"
android:exported="false" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name="com.myapp.BackgroundActivity" />
<receiver android:name="com.myapp.SMSreceiver" >
<intent-filter>
<action android:name="android.provider.telephony.SMS_RECEIVED" >
</action>
</intent-filter>
</receiver>
<activity
android:name="com.myapp.Splash"
android:label="#string/title_activity_splash"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.myapp.MainActivity"
android:label="#string/app_name"
android:screenOrientation="sensorPortrait" >
<intent-filter>
<action android:name="splashscreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.myapp.NumbersActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.CodesActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.SendCode"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.SettingsActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.AllMessages"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.ButtonsActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.OutputActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.AboutActivity"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.Help"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
<activity
android:name="com.myapp.TechInfo"
android:launchMode="singleTop"
android:screenOrientation="sensorPortrait" >
</activity>
</application>
</manifest>
And this is the manifest of the app that is tablet compatible but has no settings at all in manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lol.loltimers"
android:versionCode="3"
android:versionName="1.3" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:icon="#drawable/lolicon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/activity_main"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TimersActivity"
android:label="#string/activity_timers"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.loltimers.MainActivity" />
</activity>
<activity
android:name=".ThreeTimersActivity"
android:label="#string/activity_three_timers"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.loltimers.MainActivity" />
</activity>
</application>
</manifest>
u need to make different folder in drawable
for tab you have to make as pet tabs conflagration
drawable-large-mdpi //for 600x1024 mdpi tab
drawable-large-hdpi // for hdpi tab
drawable-large-ldpi //for xhdpi tab
and then make change in dimension files
values-sw600dp // for 7inch tab
values-sw800dp // for 8 inch tab
if u have special layout requirement then u need to make a different layout
layout-large
layout-xlarge
check this link
http://android-developers.blogspot.in/2011/07/new-tools-for-managing-screen-sizes.html
You need to set
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
and check at runtime whether the device has messaging facility or not.
Related
I don't understand why, I just try to push a beta version on google play and I have no compatible devices on this version (look at the screenshot). So when I download the apps, it's install me the current production version but not the beta like expected.
I have no problem to install it on my devices on dev mod with android studio so I know that this app working on my phone.
Someone can help me ? Thanks
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lgondor.simpledice"
>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera2.full" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true">
</supports-screens>
<application
android:allowBackup="true"
android:icon="#drawable/icon_small_shadow"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name="com.lgondor.simpledice.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.lgondor.simpledice.AddCustomDiceActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.lgondor.simpledice.ManageSwitchActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<service android:name="com.lgondor.simpledice.services.WearService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" />
</intent-filter>
</service>
</application>
</manifest>
i just want to add banner to mygame but when i build my game,i face to this bug in unity console.
AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'banner' with value '#drawable/app_banner').
You can find my AndroidManifest.xml file,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity.package" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:theme="#android:style/Theme.NoTitleBar" android:icon="#drawable/app_icon" android:label="#string/app_name" android:debuggable="false" android:isGame="true" android:banner="#drawable/app_banner">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="#string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<!--
The unityplayer.ForwardNativeEventsToDalvik flag is the only difference
from Unity's auto-generated default AndroidManifest.xml. We require this
flag to be true for ads to be clickable.
If you are using another plugin that also ships with an
Assets/Plugins/AndroidManifest.xml, you can use their copy after setting
this flag to true.
-->
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>
#ugur error tells you what is missing as its not in your supplied file list, so you have to put that file in the drawable folder to remove the error..once you add he banner drawable the error will go away
There is a similar question in this link but this didn't work for me:
http://answers.unity3d.com/questions/935508/failed-to-re-package-resources-unity-5.html?sort=oldest
For me changing the AndroidManifest.xml with the following did the trick:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.example.admobtest" android:versionName="1.0" android:versionCode="1">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<!-- Google Mobile Ads Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="#drawable/app_icon" android:label="#string/app_name">
<!-- meta-data tag for Google Play services -->
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version"/>
<activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
</activity>
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >
</activity>
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="android.app.lib_name" android:value="unity" />
</activity>
<activity android:name="com.unity3d.player.VideoPlayer" android:label="#string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" >
</activity>
</application>
<uses-feature android:glEsVersion="0x00020000" />
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
</manifest>
I had banner.png at correct place and rest of the things were also ok.
It worked when I updated sdk to latest with help of "SDK Manager"
I have Samsung galaxy s4 mini and screen size is 540 x 960 pixels, 4.3 inches (~256 ppi pixel density).
My app work perfectly in all devices accept galaxy s4 mini, galaxy s4, galaxy s5.
I have visited this link an try it but it doesn't affect in device. Link is below
Android App is not compatible with Samsung galaxy S4
Any solution exist then please suggest me.
My AndroidManifest.xml file Code:
`
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="true" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.utils.Constant"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:killAfterRestore="false"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="Video"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.LoginActivity"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="Result"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="Login"
android:configChanges="orientation"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name="com.beaconrangingservice.BeaconRangingService"
android:enabled="true" />
<activity
android:name="Home"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="Infopage"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="BeaconFoundPage"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<!--
<service android:name=".EstimoteService" />
<service
android:name="com.estimote.sdk.service.BeaconService"
android:exported="false" />
<service
android:name="org.altbeacon.beacon.service.BeaconService"
android:exported="false" />
-->
<service android:name=".BeaconService" >
</service>
<service
android:name="org.altbeacon.beacon.BeaconIntentProcessor"
android:enabled="true" >
</service>
</application>`
540 x 960 devices access drawable-hdpi values-hdpi folders.
please update your hdpi folder and check.
or u shud create layout res/layout-w540dp-h960dp/layout.xml for specific size device,
And what about sdk version? try to add this into your manifest:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
I've receive that message :
My AndroidManifest :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="..."
android:versionCode="1"
android:versionName="1.0" >
<uses-feature
android:glEsVersion="0x00020000"
android:required="true">
</uses-feature>
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21" />
<uses-feature android:name="android.hardware.camera"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:name="..."
android:allowBackup="true"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:icon="#drawable/launcher"
android:largeHeap="true"
android:theme="#style/AppTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name="..."
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="..."
android:label="#string/label_add_new_object"
android:screenOrientation="portrait"
android:icon="#drawable/ic_arrow"
android:theme="#style/MyFancyTheme"
android:configChanges="orientation|screenSize">
</activity>
<activity
android:name="..."
android:label="#string/label_settings_activity"
android:screenOrientation="portrait"
android:icon="#drawable/ic_arrow"
android:theme="#style/Theme.AppCompat.Light"
>
</activity>
<activity
android:name="..."
android:screenOrientation="portrait"
android:label="#string/app_name"
android:icon="#android:color/transparent"
android:theme="#style/CustomActionBarStyle">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable" />
</activity>
</application>
As I've read here, here and here, I've done :
1) copied all the drawables from #android/drawable to my corresponding folders hdpi, mdpi, e.t.c -
so I havn't any icon from #android/drawable folder in the project
2) put the icon drawable to the drawable folder of the res
3) cleaned the project
What can be solution for this ?
I think it is linked to having the icon attribute setting to a color #android:color/transparent. Maybe try a transparent drawable rather than a color.
I've found the solution - it was in
<activity
....
android:icon="#android:color/transparent" - the problem string
...
</activity>
when I removed that string, everythins worked fine
I'm developing a simple Android app on PhoneGap where the users can calculate their GPA's and CGPA's.
I sense something strange happening. Whenever the user tilts the screen and shifts from portrait to landscape mode, the app goes back to the previous page as if the back button was pressed.
This is how my manifest file looks,
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.firstVersion"
android:versionCode="3"
android:versionName="1.2" >
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="17" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:configChanges="orientation|keyboardHidden"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.firstVersion.MainActivity"
android:label="#string/app_name" >
android:launchMode="singleTop"
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="org.apache.cordova.DroidGap"
android:label="#string/app_name"
android:configChanges="orientation|keyboardHidden">
<intent-filter></intent-filter>
</activity>
<receiver android:name="com.phonegap.plugin.localnotification.AlarmReceiver" >
</receiver>
<receiver android:name="com.phonegap.plugin.localnotification.AlarmRestoreOnBoot" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name="com.bicrement.plugins.localNotification.AlarmReceiver" >
</receiver>
<receiver android:name="com.bicrement.plugins.localNotification.AlarmRestoreOnBoot" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
</application>
</manifest>
Add android:configChanges under each activity tag not in application tag as you written in application tag and skip it to MainActivity tag
Try This:-
<activity
android:name="com.example.firstVersion.MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden|keyboard|locale"
android:label="#string/app_name">