I have this error when running my apk:
09-20 14:08:57.052: E/AndroidRuntime(5430): FATAL EXCEPTION: main
09-20 14:08:57.052: E/AndroidRuntime(5430): java.lang.RuntimeException: Unable to instantiate application com.soinfit.serverAndServices.ErrorReport: java.lang.ClassNotFoundException: Didn't find class "com.soinfit.serverAndServices.ErrorReport" on path: DexPathList[[zip file "/data/app/com.soinfit-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.soinfit-1, /system/lib]]
09-20 14:08:57.052: E/AndroidRuntime(5430): at android.app.LoadedApk.makeApplication(LoadedApk.java:509)
09-20 14:08:57.052: E/AndroidRuntime(5430): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4417)
I have read all the topics about this issue on stackoverflow and no one helped me.
I cleaned my project
Checked order and export
My application project is this class:
package serverAndServices;
import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;
import serverAndServices.ServerUtilities;
import android.app.Application;
import com.soinfit.R;
#ReportsCrashes(formKey = "dGVacG0ydVHnaNHjRjVTUTEtb3FPWGc6MQ",
customReportContent = { ReportField.APP_VERSION_CODE,
ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION,
ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.BUILD,
ReportField.STACK_TRACE, ReportField.LOGCAT, ReportField.DEVICE_ID }, formUri = ServerUtilities.ERROR_REPORT_FILE, mode = ReportingInteractionMode.TOAST, forceCloseDialogAfterToast = false, // optional,
// default
// false
resToastText = R.string.error_happned)
public class ErrorReport extends Application {
#Override
public void onCreate() {
super.onCreate();
// The following line triggers the initialization of ACRA
ACRA.init(ErrorReport.this);
}
}
In my manifest I have this code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.soinfit"
android:versionCode="36"
android:versionName="1.16" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<permission
android:name="com.soinfit.gcm.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.soinfit.gcm.permission.C2D_MESSAGE" />
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="20" />
<application
android:name=".serverAndServices.ErrorReport"
android:allowBackup="true"
android:configChanges="orientation|keyboardHidden|screenSize|locale"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:debuggable="false"
android:theme="#style/AppTheme" >
<activity
android:name="soInFitMain.SplashScreen"
android:configChanges="keyboardHidden|orientation"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="soInFitMain.ProgramPlay" >
</activity>
<activity android:name="soInFitMain.SocialPage" >
</activity>
<activity android:name="soInFitMain.RegisterPage" >
</activity>
<activity android:name="soInFitMain.FinishProgramPage" >
</activity>
<activity android:name="soInFitMain.ProgramBuilder" >
</activity>
<activity android:name="soInFitMain.BuildProgramScreen" >
</activity>
<activity android:name="soInFitMain.ChooseProgramType" >
</activity>
<activity android:name="soInFitMain.SettingChoosePage" >
</activity>
<activity android:name="soInFitMain.ProfilePage" >
</activity>
<activity android:name="soInFitMain.PersonalDetails" >
</activity>
<activity android:name="soInFitMain.PrivacyPage" >
</activity>
<activity android:name="soInFitMain.HomePage" >
</activity>
<activity android:name="soInFitMain.ProgramSettings" >
</activity>
<activity android:name="soInFitMain.QandA" >
</activity>
<activity android:name="soInFitMain.SentProgramsPage" >
</activity>
<activity android:name="soInFitMain.MyGymPage" >
</activity>
<activity android:name="soInFitMain.UsersInClass" >
</activity>
<activity android:name="soInFitMain.GymMessages" >
</activity>
<activity android:name="soInFitMain.PrivateTrains" >
</activity>
<activity android:name="soInFitMain.TrainerClasses" >
</activity>
<activity android:name="soInFitMain.TrainersInMyGym" >
</activity>
<activity android:name="soInFitMain.ChallengesPage" >
</activity>
<receiver
android:name="serverAndServices.ChallengesActionReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="com.soinfit.utilities.CHALLENGE_CLICK" />
</intent-filter>
</receiver>
<receiver
android:name="serverAndServices.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.GCM_RECEIVED_ACTION" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.soinfit" />
</intent-filter>
</receiver>
<service android:name="serverAndServices.GcmIntentService" />
<service android:name="serverAndServices.OnTheWayCounterService" />
<service android:name="serverAndServices.ProgramTimeCounterService" />
<service android:name="serverAndServices.SetRestTimeCounterService" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<activity android:name="com.facebook.LoginActivity" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="org.acra.CrashReportDialog"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleInstance"
android:theme="#android:style/Theme.Dialog" />
</application>
</manifest>
My project packages
The package in your custom application is serverAndServices. Making your class serverAndServices.ErrorReport. Android is looking for com.soinfit.serverAndServices.ErrorReport. Which is the name you declared in the manifest. The two should match.
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.
We are facing an error of default activity is not found after update android studio to version "3.2". On another PC, which is running lower version 3.1.4 of android studio, this same application is working. If anyone has a solution then please suggest us.
I have attached manifest file of screen shot of android studio for that error.
<?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.exmple.com">
<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.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait" >
</activity>
<activity android:name=".Category_item"
android:screenOrientation="portrait"/>
<activity android:name=".ImageDatail"
android:screenOrientation="portrait"/>
<activity android:name=".SplashScreen"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW"/>
</intent-filter>
<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="your-own-uri" />
</intent-filter>
</activity>
<service android:name=".FireBase.MyFirebaseMessagingService"
android:exported="true"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name=".FireBase.MyFirebaseInstanceIDService"
android:exported="true"
android:stopWithTask="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<receiver
android:name=".Util.ConnectivityReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.qualifiedapps.inspirationalquotes.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
</application>
</manifest>
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>
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.
I tried to implement the new Google Cloud Messaging API on an Application i'm working on, it works fine on version 4.2++, i can receive notifications and act on it. But there is a serious issue i experience in version 2.3. or lower versions:
protected void onHandleIntent(Intent intent) {
System.out.println("STARTING SERVICE !!!!! ");
InstanceID instanceID = InstanceID.getInstance(this);
try {
final String token = instanceID.getToken(getString(R.string.sender_id), GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
System.out.println("GCM TOKEN :::: " + token);
if(!token.isEmpty()) {
new MyGcmRunner(token, this);
}
}
catch (IOException ex){
ex.printStackTrace();
}
//instanceID.getToken()
}
with the above implementation i receive a GCM TOKEN. The first time i try to send a message to GCM server using this token it returns a successful message, even though the client app doesn't receive any notification.
If i try again it returns the below error:
{"multicast_id":5130293481949972794,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}
I really don't understand why it behaves like this, is there something i'm missing.
NOTE : The situation occurs in android version 2.3 or lower versions that i'm currently experimenting on.
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- To auto-complete the email text field in the login form with the user's emails -->
<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.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.healthboxes.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.healthboxes.app.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/hb_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>
<service
android:name=".Authentication.Services.HBInstanceIDListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service
android:name=".Authentication.Services.RegistrationService"
android:enabled="true"
android:exported="false" />
<service
android:name=".General.Service.GcmMessageListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<activity
android:name=".HBSplashActivity"
android:label="#string/title_activity_hbsplash"
android:noHistory="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Authentication.Activity.HBLoginActivity"
android:label="#string/title_activity_hblogin"
android:parentActivityName=".HBSplashActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.HBSplashActivity" />
</activity>
<activity
android:name=".Home.Activity.HBHomeActivity"
android:label="#string/title_activity_hbhome"
android:launchMode="singleTop"
android:parentActivityName=".Authentication.Activity.HBLoginActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Authentication.Activity.HBLoginActivity" />
</activity>
<activity
android:name=".HBAppointment.Activity.HBCreateAppointmentActivity"
android:label="#string/title_activity_create_appointment"
android:parentActivityName=".Home.Activity.HBHomeActivity"
android:windowSoftInputMode="stateHidden" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
<activity
android:name=".HBRiskChecker.Activity.HBQuestionActivity"
android:label="#string/title_activity_hbquestion"
android:launchMode="singleTop"
android:parentActivityName=".Home.Activity.HBHomeActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
<activity
android:name=".Authentication.Activity.SignUpActivity"
android:label=""
android:parentActivityName=".Authentication.Activity.HBLoginActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Authentication.Activity.HBLoginActivity" />
</activity>
<activity
android:name=".Authentication.Activity.HBSignUpProcessActivity"
android:label="#string/title_activity_hbsign_up_process"
android:parentActivityName=".Authentication.Activity.SignUpActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Authentication.Activity.SignUpActivity" />
</activity>
<activity
android:name=".Activity.HBDetailActivity"
android:label="#string/title_activity_detail"
android:parentActivityName=".Home.Activity.HBHomeActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
<activity
android:name=".Chat.Activity.HBChatActivity"
android:label="#string/title_activity_hbchat"
android:parentActivityName=".Home.Activity.HBHomeActivity"
android:windowSoftInputMode="adjustResize|stateHidden" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
<activity
android:name=".Activity.SearchActivity"
android:label="#string/title_activity_search"
android:parentActivityName=".Home.Activity.HBHomeActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
<activity
android:name=".Activity.ProfileActivity"
android:label="#string/title_activity_profile"
android:parentActivityName=".Activity.SearchActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Activity.SearchActivity" />
</activity>
<activity
android:name=".Chat.Activity.ChatRequestActivity"
android:label="#string/title_activity_chat_request"
android:exported="true"
android:parentActivityName=".Home.Activity.HBHomeActivity" >
<intent-filter>
<action android:name="CHAT_ACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.healthboxes.app.Home.Activity.HBHomeActivity" />
</activity>
</application>
You can have added these two permissions for GCM:
<permission
android:name="com.healthboxes.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.healthboxes.app.permission.C2D_MESSAGE" />
Try to add also:
<uses-permission android:name="android.permission.C2D_MESSAGE" />