The problem is when i close my app (Not destroy, but its in recents apps) and when i reopen my app from the recents it's like there are 2 activities, 1 that's open the app and 1 is slide to the left behind the other 1. But if i open recent apps again there is only 1. It happens only when click on the app inside recent apps.
I can't find the problem.
Someone knows what cause this problem. If you need more info, let me know, hope someone has seen this before.
See image.
Im tying to get adb shell dumpsys SurfaceFlinger soon, im new to that.
See manifest below.
<?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="nl.bouwman.syntess">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
tools:remove="android:maxSdkVersion"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.android.vending.BILLING" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:name=".App"
android:allowBackup="true"
android:fullBackupContent="#xml/dkc_backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/DKCTheme"
android:networkSecurityConfig="#xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:largeHeap="true"
tools:replace="android:supportsRtl"
android:usesCleartextTraffic="true"
tools:ignore="UnusedAttribute">
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode" />
<activity
android:name=".StartActivity"
android:label="#string/app_name"
android:noHistory="true"
android:configChanges="orientation|screenSize|locale"
android:hardwareAccelerated="true"
android:screenOrientation="sensor">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.MainActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".activity.SettingsActivity"
android:theme="#style/FlashTheme.Settings">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<activity
android:name=".chat.MainChatActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:label="#string/app_name"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".chat.ChattyActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".chat.SettingsChatActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".activity.ProfileActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".chat.FindFriendsActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".chat.GroupChatActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".activity.NextActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".activity.MeldingActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize"/>
<activity
android:name=".activity.HtmlSourceActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".activity.BookMarkActivity"
android:configChanges="orientation|screenSize|locale"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme" />
<activity
android:name=".rssstatus.SyntessStatus"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="sensor"
android:theme="#style/ThemeWithCorners"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".activity.ImageDetailActivity"
android:configChanges="locale|orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".koudemapfirebase.KoudeActivity"
android:configChanges="orientation|screenSize|locale"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme" />
<activity android:name=".koudemapfirebase.KoudeActivityFull"
android:configChanges="orientation|screenSize|locale"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme" />
<activity android:name=".koudemapfirebase.BarcodeActivity"
android:configChanges="orientation|screenSize|locale"
android:hardwareAccelerated="true"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="sensor"
android:theme="#style/DKCTheme" />
<service
android:name=".servicejob.WerkBonJobService"
android:enabled="true"
android:label="#string/notifications"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".servicejob.VersieJobService"
android:enabled="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".downloadservice.DownloadService"
android:enabled="true"
android:permission="android.permission.BIND_JOB_SERVICE" />
<service
android:name=".servicejob.DkcFirebaseIdService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<receiver
android:name=".service.NotificationReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
<receiver
android:name=".downloadservice.MyBroadcastReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.nl.bouwman.syntess.DOWNLOAD_STARTED" />
<action android:name="android.intent.action.nl.bouwman.syntess.DOWNLOAD_FINISHED" />
<action android:name="android.intent.action.nl.bouwman.syntess.DOWNLOAD_CANCELLED" />
</intent-filter>
</receiver>
<activity
android:name=".activity.AboutActivity"
android:theme="#style/Kau.About" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
</application>
Related
Am facing this issue and am at beginner lever. Please look the code and help me.
Check the image for reference https://ibb.co/HnZtNPz
I had removed one file from the Onesignal notifications, https://ibb.co/PDwC1BZ . I can give you my pc remote access if you want to check the code.
I even tried adding android:exported:true/false in evey activity but it didn't helped me out
Here is my AndroidMainfest.xml https://pastebin.com/UiCbLnuj
<?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.divinetechs.quiz">
<uses-feature
android:name="android.hardware.camera2.full"
android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
android:name="android.hardware.camera.flash"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-feature
android:name="android.hardware.wifi"
android:required="true" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:name=".Util.MyApp"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:allowBackup,android:label">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_main_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" /> <!-- TODO: Replace with your real AdMob app ID -->
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.FacebookContentProvider${applicationId}"
android:exported="true" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity
android:name=".Activity.SplashScreen"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:theme="#style/WelcomeTheme"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.WelcomeActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:label="#string/welcome_slides"
android:screenOrientation="portrait"
android:theme="#style/WelcomeTheme" />
<activity
android:name=".Activity.MainActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Login"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".Activity.Registration"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".OTPLogin.SendOTP"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".OTPLogin.OTPVerification"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".Activity.PermissionActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Instruction"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Notifications"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.AboutUs"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.DailyLoginChallenge"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.SpinAndWin"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.QuestionAnswer"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.AddQuestion"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Category"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.LevelResult"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.LevelSelection"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.PractiseQuiz.PractiseByLevel"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.PractiseQuiz.PractiseQueAns"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.PractiseQuiz.PractiseLeaderBoard"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.LeaderBoardActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Profile"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.ProfileUpdate"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:theme="#style/Base.Theme.AppCompat"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".Activity.WalletActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.WithdrawHistory"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.WithdrawRequest"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.ReferAndEarn"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Settings"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Statistics"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Contest.Contests"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Contest.ContestUpcoming"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Contest.ContestQueAns"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Contest.ContestQueReview"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.Contest.ContestLeaderBoard"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.UserLeaderBoard"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<activity
android:name=".Activity.ForgotActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden|adjustPan" />
<activity
android:name=".Activity.Subscriptions"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:screenOrientation="portrait" />
<!--
<service
android:name=".PushNotification.NotificationExtenderExample"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false">
<intent-filter>
<action android:name="com.onesignal.NotificationExtender" />
</intent-filter>
</service>
<service android:name=".PushNotification.MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".PushNotification.MyFirebaseInstanceIDService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service> Firebase Notifications -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="Description" />
<!-- ./Firebase Notifications -->
<!--Change package name in file_paths.xml file in res ==> xml ==> file_paths.xml-->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
</application>
<!--Add below queries for Android 11-->
<queries>
<package android:name="com.facebook.katana" />
</queries>
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
</manifest>
Thank You
My native Android app has multiple instances on some phones (Samsung galaxy note 2 – android 5.0 Samsung galaxy note 4 – android xx Xiaomi Redmi 4x – android 7.1.2.). On most other phones it is ok. The app consumes quite a lot of memory and CPU so I can not have the multiple instances running, otherwise it is very slow.
I tried to use android:launchMode="singleInstance" in my Manifest in every Activity. But this is not helping. I attache the Manifest file and screenshot.
I would be very happy if you could help me. Cheers.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pekostudio.dogtrace">
<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="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.bluetooth_le" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:launchMode="singleInstance"
android:resizeableActivity="false"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<receiver
android:name=".Bluetooth.GetAllCollarsService$GetRawBluetoothDataReceiver"
android:enabled="true">
<intent-filter>
<action android:name="pekostudio.dogtrace.BLUETOOTH_RAW_DATA" />
</intent-filter>
</receiver>
<service
android:name=".Utils.LocationFinder"
android:exported="false" />
<service
android:name=".Bluetooth.GetAllCollarsService"
android:exported="false" />
<service
android:name=".Bluetooth.BluetoothLeService"
android:enabled="true"
android:stopWithTask="true" />
<service
android:name=".MapDownload.DownloadService"
android:enabled="true"
android:exported="true" />
<activity
android:name=".Activities.GoogleMapActivity"
android:configChanges="orientation"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities.SplashActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:theme="#style/SplashTheme"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activities.OfflineMap"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities.CompassActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities.AnimalDetailActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:parentActivityName=".Activities.GoogleMapActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar"/>
<activity
android:name=".Activities.SettingsActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:parentActivityName=".Activities.GoogleMapActivity"
android:screenOrientation="portrait">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="pekostudio.dogtrace.Activities.GoogleMapActivity" />
</activity>
<activity
android:name=".Activities.EditAnimalsActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait" />
<activity
android:name=".Activities.EditAnimalActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait" />
<activity
android:name=".Activities.DeviceScanActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:launchMode="singleInstance"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".Activities.AvailableMapsListActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity android:name=".Activities.AboutActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity android:name=".Activities.CalibrateActivity"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"/>
<activity
android:name=".Activities.MapMarkerPreview"
android:configChanges="orientation"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
</application>
I published an application but google play shows me that 0 devices are compatible.
I checked the Manifest but i don't know why.
I tried to change minsdk and targetsdk but the result is the same.
I need help please!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.h2_web.www.agos"
android:versionCode="3"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#drawable/icona"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver android:name=".services.BootCompletedIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="YouWillNeverKillMe" />
</intent-filter>
</receiver>
<service android:enabled="true" android:name=".services.MyService"></service>
<activity
android:name=".Dashboard"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
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=".ImmobiliView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ClientiView"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
</activity>
<activity
android:name=".ImmobiliList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ClientiList"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".LoginView"
android:label="#string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".WebActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".AgendaView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
<activity
android:name=".ContactsView"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen">
</activity>
</application>
</manifest>
Refer the below link for solution
Optimizing Android manifest file for largest number of supported devices
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
I made a copy of one of my working projects for another project. Ever since I can't get the AndroidManifest.xml to work properly. I get the error The element must be a direct child of the <application> element or The element type "manifest" must be terminated by the matching end-tag "</manifest>"error. I have refactored everything else and don't see any errors in my classes. Just the xml file is being a pain. What is wrong with this file? It looks fine and looks like my working one. Eclipse seems to think there are errors.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package= "com.mydomain.qsd"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.mydomain.qsd.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<permission
android:name="com.mydomain.qsd.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" />
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
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.mydomain.qsd" />
</intent-filter>
</receiver>
<service android:name="com.mydomain.qsd.gcm.GCMService"/>
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
</activity>
</application>
</manifest>
You have directly close your application tag
Replace this :
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" />
by this :
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
EDIT :
You have to replace this :
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"/>
by this :
<activity
android:name="com.mydomain.qsd.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait" >
This :
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" />
by this :
<activity
android:name="com.mydomain.qsd.SplashScreen"
android:screenOrientation="portrait" >
This :
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" />
by this:
<receiver
android:name="com.mydomain.qsd.gcm.GCMReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
And finally this :
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
</activity>
by this :
<activity
android:name="com.mydomain.qsd.NotifyActivity"
android:screenOrientation="portrait"
android:label="#string/title_activity_notify" />
Your application Tag and also Activity tags have self close so remove that
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" /> <----- remove /
I am trying to use C2DM in my Android app in Eclipse following the example on their developer site. But I keep getting "Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED" when trying to launch my app:
[2011-06-01 09:19:09 - xVoice] Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
[2011-06-01 09:19:09 - xVoice] Please check logcat output for more details.
[2011-06-01 09:19:09 - xVoice] Launch canceled!
And Logcat gives me the following warning:
06-01 09:18:47.882: WARN/PackageParser(2488): /data/app/vmdl46038.tmp (at Binary XML file line #8): Bad class name Telenet.xVoice.permission.C2D_MESSAGE in package Telenet.xVoice
Can anybody see what the problem is?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Telenet.xVoice"
android:versionCode="1"
android:versionName="1.0">
<!-- Only this application can receive the messages and registration result -->
<permission android:name="Telenet.xVoice.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="Telenet.xVoice.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-sdk android:minSdkVersion="8"></uses-sdk>
<application android:label="#string/app_name" android:icon="#drawable/logo" android:name="xVoiceApp">
<activity android:name=".xVoice" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".xVoiceAppWidgetProvider" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.net.wifi.STATE_CHANGE" />
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME"/>
</intent-filter>
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="Telenet.xVoice" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="Telenet.xVoice" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/xvoice_appwidgetprovider_info" />
</receiver>
<activity android:name=".xVoicemail"></activity>
<activity android:name=".xCallLog"></activity>
<activity android:name=".xConfiguration"></activity>
<activity android:name=".xVoiceIncomming" android:theme="#android:style/Theme.Dialog" android:noHistory="true" ></activity>
<service android:name=".xVoiceService" />
</application>
</manifest>
In the generated code I found following class:
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package Telenet.xVoice;
public final class Manifest {
public static final class permission {
/** Only this application can receive the messages and registration result
*/
public static final String C2D_MESSAGE="Telenet.xVoice.permission.C2D_MESSAGE";
}
}
The given blow is my code i have used this code for C2DM it is running fine.
compare your code with my given code and also check the fallowing think i given blow.
1) Email address you have registered for C2DM.
2) Check your local server.
3) http://code.google.com/android/c2dm/index.html take this url for more information and compare all your code with this given tutorial for google i have done it with this tutorial . I hope this is very helpful to you.
<?xml version="1.0" encoding="utf-8"?>
<permission android:name="com.cipl.TennisApp.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.cipl.TennisApp.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:debuggable="true" android:theme="#android:style/Theme.NoTitleBar">
<uses-library android:name="com.google.android.maps" />
<activity android:name="com.cipl.TennisApp.TennisAppActivity" android:label="#string/app_name">
</activity>
<activity android:name=".HomeActivity" android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- C2DM service Receive -->
<service android:name="com.commonsware.android.c2dm.C2DMReceiver" />
<receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.cipl.TennisApp" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.cipl.TennisApp" />
</intent-filter>
</receiver>
<!-- C2DM service Receive End -->
<activity android:name="com.google.android.c2dm.NotificationIntent"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.ChangePasswordActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.AccountsActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.DiscussionActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.MoreListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.MessageActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.AboutUsActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.ContactUSActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.BlockUserActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.CreateNewTopic"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.AddCommentActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.PrivacyPolicyActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.More.MoreTabActivityGroupNew"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.DefaultDisplay"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.MatchesListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.PlayersListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.CourtsListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.MatchListDetailsActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:noHistory="true" android:stateNotNeeded="true" android:name="com.cipl.TennisApp.Login"
android:label="#string/app_name" android:screenOrientation="portrait" android:launchMode="singleInstance"/>
<activity android:name="com.cipl.Courts.AddCourtActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.ForgotPasswordActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.InviteForMatchActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.SendMessageActivity"
android:label="#string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize|adjustPan"/>
<activity android:name="com.cipl.TennisApp.RegistrationActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.TabGroupActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.TabGroupActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.PlayersListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.CourtsListActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.HomeTabActivityGroup"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.TermsActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Courts.AddCourtActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.TennisApp.PlayerProfileActiviy"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Courts.CourtDetailActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Matches.AddMatchActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Matches.AddMatchActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Matches.MatchDetailActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Profile.MyProfile"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Profile.EditMyProfileActivity"
android:label="#string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="adjustResize|adjustPan"/>
<activity android:name="com.cipl.Profile.SkillInfoActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Profile.ProfileTabActivityGroup"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Favorites.FavoritesTabActivityGroup"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Favorites.FavoritesActivity"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<!-- <activity android:name="com.cipl.Courts.CourtDetailGetDirectionActivity"
android:label="#string/app_name" /> -->
<activity android:name="com.cipl.TennisApp.SetCurrentLocation"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Courts.DrivingDirection"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Notifications.NotificationTabActivityGroup"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<activity android:name="com.cipl.Notifications.ShowAllNotificationActiviry"
android:label="#string/app_name" android:screenOrientation="portrait"/>
<!-- AdMobActivity definition -->
<activity android:name="com.admob.android.ads.AdMobActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboard|keyboardHidden" />
<!-- Track Market installs -->
<receiver android:name="com.admob.android.ads.analytics.InstallReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<meta-data android:value="true" android:name="ADMOB_ALLOW_LOCATION_FOR_ADS"/>
<!-- The application's publisher ID assigned by AdMob -->
<meta-data android:value="a14d6f97d8ea9fc" android:name="ADMOB_PUBLISHER_ID" />
</application>
<uses-permission android:name="android.permission.ACCESS_GPS" />
<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.READ_OWNER_DATA" />
<uses-permission android:name="android.permission.WRITE_OWNER_DATA" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<supports-screens android:normalScreens="true"
android:largeScreens="true" android:anyDensity="true">