This is my error:
12-03 20:25:30.767 19809-19809/com.app.test E/AndroidRuntime? FATAL EXCEPTION: main
Process: com.app.test, PID: 19809
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1878)
at com.app.test.CameraManager.TakePicture(CameraManager.java:107)
at com.app.test.DesignerFragment.CameraAction(DesignerFragment.java:808)
at com.app.test.MainActivity.CameraAction(MainActivity.java:1031)
at com.app.test.MainActivity$3.onClick(MainActivity.java:297)
at android.view.View.performClick(View.java:5198)
at android.view.View$PerformClick.run(View.java:21147)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.test"
android:versionCode="43"
android:versionName="3.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="21" />
<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-feature android:name="android.hardware.camera" android:required="false" />
-->
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<!--<uses-feature android:name="android.hardware.camera.front" android:required="false" />-->
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.camera.setParameters" />
<!--
IMPORTANT: Change "com.parse.starter.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal"/>
<uses-feature android:name="android.hardware.camera.flash"/>
<!--
IMPORTANT: Change "com.parse.tutorials.pushnotifications.permission.C2D_MESSAGE" in the lines below
to match your app's package name + ".permission.C2D_MESSAGE".
-->
<permission
android:name="com.app.test.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.app.test.permission.C2D_MESSAGE" />
<application
android:name="com.app.application.GlobalApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_ENABLED"
android:value="true" />
<!-- Google Analytics Version v4 needs this value for easy tracking -->
<!--
<meta-data android:name="com.google.android.gms.analytics.globalConfigResource"
android:resource="#xml/global_tracker" />
-->
<!--
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
-->
<activity
android:name="com.parse.ui.ParseLoginActivity"
android:label="#string/app_name"
android:launchMode="singleTop" >
<meta-data
android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_ENABLED"
android:value="true" />
<!-- <meta-data -->
<!-- android:name="com.parse.ui.ParseLoginActivity.PARSE_LOGIN_EMAIL_AS_USERNAME" -->
<!-- android:value="true"/> -->
<meta-data
android:name="com.parse.ui.ParseLoginActivity.FACEBOOK_LOGIN_ENABLED"
android:value="true" />
<meta-data
android:name="com.parse.ui.ParseLoginActivity.TWITTER_LOGIN_ENABLED"
android:value="true" />
</activity>
<!-- <activity -->
<!-- android:name="com.app.test.MainActivity" -->
<!-- android:configChanges="keyboardHidden|orientation|screenSize" -->
<!-- android:label="#string/app_name" -->
<!-- android:screenOrientation="portrait" > -->
<!-- </activity> -->
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.parse.APPLICATION_ID"
android:value="#string/parse_app_id" />
<meta-data
android:name="com.parse.CLIENT_KEY"
android:value="#string/parse_client_key" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<meta-data
android:name="com.app.test.notification_icon"
android:resource="#drawable/ic_launcher" />
<activity
android:name=".DispatchActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".IntroActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".UserSettingsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/PreferenceScreen" >
</activity>
<activity
android:name=".EditProfileActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName=".EditProfileActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ChangePasswordActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName=".ChangePasswordActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".PaymentDetailsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName=".PaymentDetailsActivity"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
</activity>
<activity
android:name=".PurchaseActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.app.gallery.GalleryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.app.feed.FeedActivityV2"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask"
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.app.feed.SearchActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName="com.app.feed.FeedActivityV2"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.app.feed.SuggestedUserActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName="com.app.feed.FeedActivityV2"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.app.comments.CommentsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName="com.app.feed.FeedActivityV2"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.app.notifications.NotificationsActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:parentActivityName="com.app.feed.FeedActivityV2"
android:screenOrientation="portrait" >
</activity>
<service
android:name="com.paypal.android.sdk.payments.PayPalService"
android:exported="false" />
<activity android:name="com.paypal.android.sdk.payments.PaymentActivity" />
<activity android:name="com.paypal.android.sdk.payments.LoginActivity" />
<activity android:name="com.paypal.android.sdk.payments.PaymentMethodActivity" />
<activity android:name="com.paypal.android.sdk.payments.PaymentConfirmActivity" />
<activity android:name="com.paypal.android.sdk.payments.PayPalFuturePaymentActivity" />
<activity android:name="com.paypal.android.sdk.payments.FuturePaymentConsentActivity" />
<activity android:name="com.paypal.android.sdk.payments.FuturePaymentInfoActivity" />
<activity android:name="com.paypal.android.sdk.payments.PayPalProfileSharingActivity" />
<activity android:name="com.paypal.android.sdk.payments.ProfileSharingConsentActivity" />
<activity
android:name="io.card.payment.CardIOActivity"
android:configChanges="keyboardHidden|orientation" />
<activity android:name="io.card.payment.DataEntryActivity" />
<provider
android:name="com.app.utility.ContentProvider"
android:authorities="com.app"
android:enabled="true"
android:exported="true" >
</provider>
<activity
android:name=".PaymentProcessingActivity"
android:label="#string/title_activity_payment_processing" >
</activity>
<activity
android:name="com.app.utility.WrapperWeb"
android:label="#string/title_activity_wrapper_web" >
</activity>
<service android:name="com.parse.PushService" />
<!-- Custom Receiver -->
<receiver
android:name=".Receiver"
android:exported="false" >
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<!-- End Custom Receiver -->
<receiver android:name="com.parse.ParseBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver
android:name="com.parse.GcmBroadcastReceiver"
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" />
<!-- IMPORTANT: Change "com.parse.tutorials.pushnotifications" to match your app's package name. -->
<category android:name="com.app.test" />
</intent-filter>
</receiver>
<!-- replace #drawable/push_icon with your push icon identifier -->
<meta-data
android:name="com.parse.push.notification_icon"
android:resource="#drawable/ic_stat_ic_notification" />
<activity
android:name="com.app.feed.FeedActivitySingle"
android:label="#string/title_activity_feed_activity_single"
android:parentActivityName="com.app.gallery.GalleryActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.app.gallery.GalleryActivity" />
</activity>
</application>
</manifest>
I've been wracking my head as to why this doesn't work. The front camera shuts down the app every time I launch it. What could be going wrong? What is wrong with my manifest?
Can you post the code that launches the Camera?
What I can see right now is that you declare a permission that does not exist:
<uses-permission android:name="android.hardware.camera.autofocus" />
There are some features declaration that have typos:
<used-feature android:name="android.hardware.location" />
<used-feature android:name="android.hardware.camera.setParameters" />
You can try fixing these for a start, see if it helps. You can see the list of all features available for declaration here
I made sure all my permissions were set to false under required:
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.front" android:required="false" />
<uses-feature android:name="android.hardware.camera.setParameters" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-permission android:name="android.permission.FLASHLIGHT"
android:permissionGroup="android.permission-group.HARDWARE_CONTROLS"
android:protectionLevel="normal"/>
<uses-feature android:name="android.hardware.camera.flash" android:required="false" />
I also fixed some typos as suggested above by k3v1n3ud3.
Related
<?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.video.maker1">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<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="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />
<application
android:name="com.video.maker1.MyApplication"
android:allowBackup="true"
android:extractNativeLibs="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:networkSecurityConfig="#xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/theme"
android:usesCleartextTraffic="true"
>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-9731420309932281~3771749504" />
<!-- <activity-->
<!-- android:name="com.facebook.ads.AudienceNetworkActivity"-->
<!-- android:hardwareAccelerated="true" />-->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="true"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/provider_paths" />
</provider>
<activity
android:name="com.video.maker1.activity.SplashActivity"
android:exported="true"
android:screenOrientation="nosensor">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.video.maker1.activity.MainActivity"
android:exported="true"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.video.maker1.activity.ImagePickerActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.SwapImageActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.SelectFrameActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.VideoPlayerActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.SongGalleryActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.VideoThemeActivity"
android:exported="true"
android:screenOrientation="portrait" />
<service android:name="com.video.maker1.theme.service.ServiceAnim" />
<activity
android:name="com.video.maker1.activity.MyVideo"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.VideoMakerActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.PrivacyActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:exported="true"
android:theme="#style/Base.Theme.AppCompat" />
<activity android:name="com.video.maker1.activity.VideoTrimActivity" />
<activity
android:name="com.video.maker1.activity.VideoEditorActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.LibraryActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity
android:name="com.video.maker1.activity.SaveVideoFileActivity"
android:exported="true"
android:screenOrientation="portrait" />
<activity android:name="com.video.maker1.activity.VideoListActivity" />
<activity
android:name="com.infiapp.imagelibrary.editimage.EditImageActivity"
android:exported="true"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"></activity>
</application>
</manifest>
this is my manifest code when i try to install my app on the emulator it shows me this error
^^The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED^^
i'hv tryed evrything that i know but it still showing me the same error
as you see i have tried the ^^android exported true commnd on all my activity but it doesn't work.
Please help me fix this on my project,
Project minimum sdk when i create is 4.4 kitkat
Upon running on my device which is OREO OS.
And when i run on my other device which is in Lollipop OS
the error message will appear
Error Message
Error Message in my console
pkg: /data/local/tmp/com.teamcipher.mrfinman.mrfinmanfinal
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
$ adb shell pm uninstall com.teamcipher.mrfinman.mrfinmanfinal
Unknown failure (Failure - not installed for 0)
Error while Installing APK
My Manifest file
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="15" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SET_ALARM" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#drawable/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<receiver android:name="Receiver.Notification_receiver" />
<receiver android:name="Receiver.Notification_receiver_debt" />
<receiver android:name="Receiver.Notification_receiver_goal" />
<receiver android:name="Receiver.Notification_receiver_bills" />
<service android:name="Services.RealtimeBudgetRemCheck"/>
<service android:name="Services.BillCheck"/>
<service android:name="Services.GoalCheck"/>
<service android:name="Background.background"/>
<activity
android:name=".MainActivity"
android:theme="#style/Theme.MyOwn">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity_dashboard"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_expense"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_login"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".Activity_income"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_editbudgetplan"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".Activity_add_category"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".ActivityRegistration"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".ActivityRegistration2"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".Activity_myincome"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_transactions"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_my_budget_plan"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_my_goals_add"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_my_debt_add"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_my_bills"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Activity_my_bills_add"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".DialogTransactionDetails"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.Dialog.Alert" />
<activity
android:name=".Testing"
android:screenOrientation="portrait" />
<activity
android:name=".Activity_set_budget"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Template"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyOwn" />
<activity
android:name=".Biller.Activity_dashboard_biller"
android:theme="#style/Theme.Biller" />
<activity
android:name=".Admin.Activity_dashboard_admin"
android:theme="#style/Theme.Admin" />
<activity
android:name=".Activity_forgot_password"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".Activity_Confirmation"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".Activity_Registration_biller"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity
android:name=".Activity_reset_pword"
android:screenOrientation="portrait"
android:theme="#style/Theme.MyCustomTheme" />
<activity android:name=".PopUp.BillPopUp"
android:theme="#style/Theme.AppCompat.Light.Dialog.Alert"/>
<!-- <service android:name="Services.FirebaseMessagingServices">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name="Services.FirebaseInstanceIDServices">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>-->
</application>
I have searched and tried many solutions from stackoverflow,
but i guess am having a different kind of problem.
I have used branch io and sugar orm in my app.
I needed the RECEIVE_SMS & READ_SMS to implement two step authentication and got some map related activity.
Having just uploaded my app to the Play store I get: Supported devices 0 . The app is activated and here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.demo.dlm">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.INTERNET" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_GPS" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="true" />
<uses-permission android:name="android.permisssion.ACCESS_COARSE_LOCATION" android:required="true" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" android:required="true" />
<uses-permission android:name="android.permission.RECEIVE_SMS" android:required="false" />
<uses-permission android:name="android.permission.READ_SMS" android:required="false" />
<meta-data android:name="DATABASE" android:value="clm.db" />
<meta-data android:name="VERSION" android:value="1" />
<meta-data android:name="QUERY_LOG" android:value="true" />
<meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="com.selise.clm.common.database.entity" />
<application
android:name=".common.App"
android:allowBackup="false"
android:fullBackupContent="#xml/my_backup_rules"
android:fullBackupOnly="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:hardwareAccelerated="true"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".common.ui.activity.SplashScreenActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<data android:scheme="clmdebug" android:host="open" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<activity
android:name=".login.ui.activity.LoginActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<!-- Branch URI scheme -->
<intent-filter>
<data
android:host="open"
android:scheme="clm" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_jjuGmW0h4nBkf309aOCBbpikstjXj60T" />
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_live_eetMk3Wl9w5Jo7kd3s3rPifnrzlZ8fp0" />
<activity
android:name=".login.ui.activity.RegistrationActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".shipment.ui.activity.ShipmentListActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".notification.ui.activity.NotificationListActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".notification.ui.activity.NotificationDetailsActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".shipment.ui.activity.AddShipmentActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".shipment.ui.activity.ShipmentDetailsActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<service
android:name=".shipmentMap.service.GeofenceTransitionsIntentService"
android:enabled="true" />
<service android:name=".common.service.AccessTokenWithRefreshTokenService" />
<service android:name=".common.service.LoadLastNotificationService" />
<service
android:name=".notification.service.NotificationSignalRService"
android:enabled="true" />
<service android:name=".shipmentMap.currentLocation.service.SendCurrentLocationService" />
<activity
android:name=".shipmentMap.ui.activity.MapsActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<receiver android:name=".common.receiver.NotificationReceiver">
<intent-filter>
<action android:name="com.selise.clm.SHIPMENT_CHANGED_ROUTE" />
<action android:name="com.selise.clm.SHIPMENT_FORWARD" />
<action android:name="com.selise.clm.SHIPMENT_COMPLETE" />
<action android:name="com.selise.clm.SHIPMENT_CANCELLED" />
<action android:name="com.selise.clm.NOTIFICATION_SERVER_CONNECTED" />
<action android:name="com.selise.clm.NOTIFICATION_SERVER_DISCONNECTED" />
</intent-filter>
</receiver>
<receiver android:name=".common.receiver.AccessTokenAlarmReceiver" android:exported="true"/>
<meta-data android:name="io.fabric.ApiKey" android:value="e7fe0e53b07c82fb5f682d0dddfc8aea6171cda8" />
<!-- Branch init -->
<meta-data
android:name="io.branch.sdk.BranchKey"
android:value="key_live_jjuGmW0h4nBkf309aOCBbpikstjXj60T" />
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_live_eetMk3Wl9w5Jo7kd3s3rPifnrzlZ8fp0" />
<!-- Branch testing (TestMode "true" to simulate fresh installs on dev environment) -->
<meta-data android:name="io.branch.sdk.TestMode" android:value="false" />
<receiver
android:name="io.branch.referral.InstallListener"
android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<receiver android:name=".login.receiver.SmsReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<activity android:name=".login.ui.activity.EnterSecurityCodeActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
Try to fix a typo here:
<uses-permission android:name="android.permisssion.ACCESS_COARSE_LOCATION" android:required="true" />
You have a permisssion (with 3 s, should be permission instead of permisssion).
As i was using SignalIR in my project. I also added the required jar files. The problem was solved. But double check that after adding packagingOptions your notifications works fine.
I added the following lines in the app gradle file like this...
android {
packagingOptions {
exclude 'lib/getLibs.ps1'
exclude 'lib/getLibs.sh'
exclude 'lib/gson-2.2.2.jar'
}
}
Please Help! I am new to android development.I am working on an app where its restarting when i relaunch my app icon,basically it should resume as my app is running in background.
And when i am using home button and then selecting my app from recent launch its resuming perfectly.
I went through this link also but am not getting the perfect answer or perfect solution how to solve this issue.
https://code.google.com/p/android/issues/detail?id=26658
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.singh"
android:versionCode="20160114"
android:versionName="20160114" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true"
android:smallScreens="true" android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="false" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.NETWORK" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<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-permission android:name="android.permission.READ_LOGS" >
</uses-permission>
<application
android:name=".ParseApplication"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#string/google_play_services_version" />
<activity
android:name="com.example.singh.MainActivity"
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>
<activity
android:name=".UserDetailsActivity"
android:label="#string/title_activity_login"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Login"
android:label="#string/title_activity_login"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Register_activity"
android:label="#string/title_activity_register"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".InsoleConnection"
android:launchMode="singleInstance"
android:label="#string/title_activity_configuration"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".Activities"
android:label="#string/title_activity_activities"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".HistoryActivity"
android:label="#string/title_activity_history"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".HistoryActivity_web"
android:label="#string/title_activity_history"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.facebook.LoginActivity"
android:label="#string/title_activity_settings"
android:screenOrientation="portrait" >
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/faceBookAppID" />
<activity
android:name=".ActivitySummery"
android:label="#string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".TreadMillActivity"
android:launchMode="singleInstance"
android:label="#string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".ReportProblem"
android:label="#string/title_activity_activity_summery"
android:screenOrientation="portrait" >
</activity>
<service
android:name="************************"
android:enabled="true" />
<service android:name="******************************" />
</application>
With Android 4.0.4 Google Maps API V2 shows nothing (blank white screen). It works with Android >4.1, so the API key is correctly configured.
There are some Warnings in Logcat, but they also occur on Android >4.1, where everything works fine.
01-11 16:39:03.325: E/GooglePlayServicesUtil(6470): The Google Play services resources were not found.
Check your project configuration to ensure that the resources are included.
Here is my project's manifest : (eclipse build target is google APIs 19)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.hska"
android:versionCode="17"
android:versionName="2.0.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<!-- PERMISSIONS -->
<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.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Needed for GmapsApi v2 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<application
android:name="de.hska.HsKAmpusApp"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/HskaTheme" >
<provider
android:name="de.hska.util.BuildingSuggestionProvider"
android:authorities="de.hska.util.BuildingSuggestionProvider.search_suggestion_provider"
android:syncable="false" />
<!-- Activities -->
<activity
android:name="de.hska.gui.activity.SplashActivity"
android:enabled="true"
android:noHistory="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.searchable"
android:resource="#xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<activity
android:name="de.hska.gui.activity.SmallScreenActivity"
android:enabled="true" >
<meta-data
android:name="android.app.searchable"
android:resource="#xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<activity
android:name="de.hska.gui.activity.BigScreenActivity"
android:enabled="true" >
<meta-data
android:name="android.app.searchable"
android:resource="#xml/searchable" />
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<activity
android:name="de.hska.gui.activity.SelectScheduleActivity"
android:enabled="true"
android:noHistory="false" >
</activity>
<activity
android:name="de.hska.gui.activity.PersonDetailMapActivity"
android:enabled="true"
android:label="#string/title_activity_map" >
</activity>
<!-- Services -->
<service
android:name="de.hska.controller.FileService"
android:exported="false" />
<service android:name="de.hska.service.UpdateService" />
<service android:name="de.hska.service.GradeService" />
<service
android:name="de.hska.auth.AccountAuthenticatorService"
android:exported="true"
android:process=":auth" >
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="#xml/authenticator" />
</service>
<!-- Receivers -->
<receiver
android:name="de.hska.receiver.GradeJobScheduler"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
<action android:name="de.hska.gradeBroadcast" />
</intent-filter>
</receiver>
<receiver android:name="de.hska.receiver.GradeReceiver" >
<intent-filter>
<action android:name="android.intent.extra.ALARM_COUNT" />
</intent-filter>
</receiver>
<receiver android:name="de.hska.receiver.UpdateReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
<action android:name="de.hska.updateBroadcast" />
</intent-filter>
</receiver>
<receiver android:name="de.hska.receiver.ProgressReceiver" >
<intent-filter>
<action android:name="android.intent.extra.ALARM_COUNT" />
</intent-filter>
</receiver>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<!-- Google Maps v2 API Key -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
</application>
</manifest>
Here's the google play services manifest: (eclipse build target is Google APIs level 19)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"
android:versionCode="4030530"
android:versionName="4.0.30 (889083-30)" >
<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="19" />
</manifest>