Unable to lock orientation ; possible fix? - java

Trying to set orientation to Portrait only by default. To make it so, I've added:
android:configChanges="orientation"
android:screenOrientation="portrait"
However, the app auto rotates to Landscape mode when tilted. Furthermore, the app turns to Landscape mode when tilted even when the orientation is locked to portrait only in phone Settings .
Here is the Manifest.xml file :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.browser.codedady">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<!-- Browser Main Tab -->
<activity
android:name=".Activity_Main"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:label="#string/app_name"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="readLater" />
<action android:name="bookmarks" />
<action android:name="history" />
<action android:name="pass" />
</intent-filter>
<intent-filter
android:icon="#mipmap/ic_launcher"
android:label="#string/app_websearch">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="#xml/shortcuts" />
</activity>
<!-- Other activities -->
<activity
android:name=".about.About_activity"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_intro"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_app"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_data"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_searchMain"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_close"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_start"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_search"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<!-- Intents -->
<activity
android:name=".helper.Activity_intent"
android:label="#string/app_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
<!-- More stuff -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.browser.codedady.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
<activity
android:name=".Home"
android:label="#string/title_activity_home"
android:theme="#style/AppTheme" />
</application>
</manifest>
What could possibly be causing this and how to fix this issue?

Add screenOrientation = "portrait" to each activity, like so:
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" />
Make sure your Java code does not alter the activity's orientation by accident. Configchanges doesn't set it to default, it asks the Java to be in charge of setting it. Remove those if they don't do anything else. See android docs here (search for "android:configChanges")

Related

Error when installing on other device Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

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>

Supported devices 0 on play store

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'
}
}

Android Studio Manifest Start and End Tags

I just recently started programming, and encountered a problem. My code seems fine, but Android Studio matches different start tags with end tags. This is my code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="330" android:versionName="3.3 beta" package="com.example.furmanthelegend.nocrastinationapp">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />
<uses-permission android:name="android.permission.GET_TASKS" android:maxSdkVersion="24" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:name="android.hardware.sensor.stepcounter" android:required="false" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<application android:theme="null" android:label="NoCrastination" android:icon="res/drawable-mdpi-v4/ic_launcher.png" android:name="de.dfki.nocrastination.utils.NoCrastinationApplication" android:allowBackup="true">
<activity android:label="NoCrastination" android:name="de.dfki.nocrastination.ui.activities.MainActivity" android:excludeFromRecents="true">
<intent-filler>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filler>
</activity>
<activity android:label="Add New Condition" android:name="de.dfki.nocrastination.ui.activities.AddConditionsActivity" android:excludeFromRecents="true" />
<activity android:label="Condition" android:name="de.dfki.nocrastination.ui.activities.ConditionDetailActivity" android:excludeFromRecents="true" />
<activity android:label="App Information" android:name="de.dfki.nocrastination.ui.activities.appinformationActivity" android:excludeFromRecents="true" />
<activity android:label="Recently Used Apps" android:name="de.dfki.nocrastination.ui.activities.previousappsActivity" android:excludeFromRecents="true" />
<activity android:label="Credits" android:name="de.dfki.nocrastination.ui.activities.creditsActivity" android:excludeFromRecents="true" />
<activity android:label="Settings" android:name="de.dfki.nocrastination.ui.activities.settingsactivity" android:excludeFromRecents="true" />
<activity android:name="org.wordpress.passcodelock.PasscodeUnlockActivity" android:windowSoftInputMode="stateHidden" />
<activity android:name="org.wordpress.passcodelock.PasscodeManagePasswordActivity" android:windowSoftInputMode="stateHidden" />
<service android:name="de.dfki.nocrastination.logging.BackgroundService" android:enabled="true" android:exported="false" />
<reciever android:name="de.dfki.nocrastination.logging.BootCompleteReceiver" android:enabled="true" android:exported="false" />
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</reciever>
<provider android:label="NoCrastination" android:name="de.dfki.nocrastination.data.NoCrastinationProvider" android:exported="false" android:authorities="de.dfki.appdetox" />
<service android:label="NoCrastination Laws" android:icon="res/drawable-xhdpi-v4/dcw_ic_extension.png" android:name="de.dfki.nocrastination.dashclockextension.nocrastinationExtension" android:permission="com.google.android.appa.dashclock.premission.READ_EXTENSION_DATA">
<intent-filler>
<action android:name="com.google.android.apps.dashclock.Extension" />
</intent-filler>
<meta-data android:name="protocolVersion" android:value="1" />
<meta-data android:name="description" android:value="Shows current amount of active conditions and condition breaks" />
</service>
<service android:label="NoCrastination" android:name="de.dfki.nocrastination.logging.AppUsageAccesibilityService" android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" android:enabled="true" >
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="res/xml/accessibility_service_config.xml" />
</service>
<meta-data android:name="com.crashlytics.ApiKey" android:value="c5cac52287e9abe392fe06e567285ee4aa9ed0bb" />
<receiver android:label="NoCrastination&apos;s device admin" android:name="de.dfki.nocrastination.ui.activities.DeviceAdminSample" android:permission="android.permission.BING_DEVICE_ADMIN" android:description="Prevent stop forcefully">
<meta-data android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
<intent-filler>
<action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
</intent-filler>
</receiver>
</application>
<manifest>
I am not great at programming, so any tips would be extremely appreciated and helpful. The main problem is that android studio matches and other cases like that.
you use inline close tag and outline also just remove the (/) from the reciever tag, to be:
<reciever android:name="de.dfki.nocrastination.logging.BootCompleteReceiver" android:enabled="true" android:exported="false"> ==> removed "/"
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</reciever>
And add "/" to the last line to be

Merging AndroidManifest.xml Different Android Studio

I tried to Merging the two files, but many of the errors show what is right
Master file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.life.com">
<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_CONTACTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<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.NFC" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/ConversationsTheme"
tools:replace="android:label">
<service android:name=".services.XmppConnectionService" />
<receiver android:name=".services.EventReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
<action android:name="android.media.RINGER_MODE_CHANGED" />
</intent-filter>
</receiver>
<activity
android:name=".ui.ConversationActivity"
android:label="#string/app_name"
android:launchMode="singleTask"
android:minWidth="300dp"
android:minHeight="300dp"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.StartConversationActivity"
android:label="#string/title_activity_start_conversation"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="imto" />
<data android:host="jabber" />
</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="xmpp" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="xmpp" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host="chat.domain.com" />
<data android:pathPrefix="/i/" />
<data android:pathPrefix="/j/" />
</intent-filter>
</activity>
<activity
android:name=".ui.WelcomeActivity"
android:label="#string/app_name"
android:launchMode="singleTask"/>
<activity
android:name=".ui.MagicCreateActivity"
android:label="#string/create_account"
android:launchMode="singleTask"/>
<activity
android:name=".ui.SetPresenceActivity"
android:configChanges="orientation|screenSize"
android:label="#string/change_presence"
android:launchMode="singleTask"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.SettingsActivity"
android:label="#string/title_activity_settings" />
<activity
android:name=".ui.ChooseContactActivity"
android:label="#string/title_activity_choose_contact" />
<activity
android:name=".ui.BlocklistActivity"
android:label="#string/title_activity_block_list" />
<activity
android:name=".ui.ChangePasswordActivity"
android:label="#string/change_password_on_server" />
<activity
android:name=".ui.ManageAccountActivity"
android:label="#string/title_activity_manage_accounts"
android:launchMode="singleTask" />
<activity
android:name=".ui.EditAccountActivity"
android:launchMode="singleTask"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".ui.ConferenceDetailsActivity"
android:label="#string/title_activity_conference_details"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.ContactDetailsActivity"
android:label="#string/title_activity_contact_details"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.PublishProfilePictureActivity"
android:label="#string/mgmt_account_publish_avatar"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.VerifyOTRActivity"
android:label="#string/verify_otr"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.ShareWithActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
</intent-filter>
<meta-data
android:name="android.service.chooser.chooser_target_service"
android:value=".services.ContactChooserTargetService" />
</activity>
<activity
android:name=".ui.TrustKeysActivity"
android:label="#string/trust_omemo_fingerprints"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="de.duenndns.ssl.MemorizingActivity"
android:theme="#style/ConversationsTheme"
tools:replace="android:theme" />
<activity
android:name=".ui.AboutActivity"
android:label="#string/title_activity_about"
android:parentActivityName=".ui.SettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.life.com.ui.SettingsActivity" />
</activity>
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
<service android:name=".services.ExportLogsService" />
<service
android:name=".services.ContactChooserTargetService"
android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
<intent-filter>
<action android:name="android.service.chooser.ChooserTargetService" />
</intent-filter>
</service>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.life.com.files"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_paths" />
</provider>
</application>
</manifest>
The following codes file you want to add and integrate it with the file above
The following file is a file to another project for notifications I want to integrate it the right way
To become all one file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.fcmpush.com"
android:versionCode="2"
android:versionName="1.1.0">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.fcmpush.com.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.fcmpush.com.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher_fcm"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name="com.fcmpush.com.UI.MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.fcmpush.com.UI.DailogeNotice"
android:theme="#style/AppTheme.Dialog"/>
<activity
android:name="com.fcmpush.com.UI.CustomeWebView"
android:theme="#style/AppTheme"/>
<activity
android:name="com.fcmpush.com.UI.PreferenceActivity"
android:theme="#style/AppTheme"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<service android:name="com.fcmpush.com.Push.FIRInstanceIdService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<service android:name="com.fcmpush.com.Push.FIRMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
<action android:name="com.fcmpush.com.SDK.FCMActivity.NEW_NOTIFICATION" />
</intent-filter>
</service>
<activity android:name="com.fcmpush.com.Push.FCMActivity"/>
<activity
android:name="com.fcmpush.com.UI.CategorySelectionActivity"
android:label="#string/title_activity_category_selection"
android:theme="#style/AppTheme"/>
<service android:name="com.fcmpush.com.Push.AlarmReceiver"/>
<receiver android:name="com.fcmpush.com.Push.AlarmBrodcastReceiver"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"
tools:replace="android:value" />
</application>
</manifest>
I'm new and I learn and thank you and apologize for any inconvenience

Multi windows error androidmanifest.xml

I am trying to insert nell'android manifest support for multi windows .. that's what I did:
<application
<uses-library required="false" name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.X.XX.XXX"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
Why do I receive an error? How can i fix it?
You're putting it in the wrong place.. According to the [MOD] Multiwindow Apps It should be inserted right before the ending application tag.
In your case you should use the following:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.X.XX.XXX"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />
</application>
EDIT: I added namespace prefixes as suggested by other answer.
the error is here ( attribute is missing the android namespace prefix )
Replace:
<uses-library required="false" name="com.sec.android.app.multiwindow" />
with:
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow" />

Categories

Resources