• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ThePositiveMoxie · Oct 20, 2013 at 12:54 PM · crashorientationmanifest

Editing Manifest for Unity 4.2 Orientation (Android)

As others have stated at one time or another, I am running into the problem where my manifest file conflicts with Unity's Orientation object in Android. I've researched and have seen all the posts available, but have yet to find a way to fix this. I know you must edit your manifest until Unity 4.3 fixes this. I've tried downgrading to 4.1.5 but it trashes my backup, as some things aren't compatible.

I've tried many things, like removing |orientation| and Android:screenOrientation and only putting it in the Unity Native Player, as well as MainActivity sections. Then I get when I try rotating, my game crashes. How would I edit this Manifest below, properly to allow me to constantly be in Landscape Left, aka, sensorLandscape. The game is due out this week, and is the last missing piece. As it still rotates when you turn your phone. Below is the original, how it was merged using Neatplugs Facebook integration.

Thanks!

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" package="com.platoevolved.inappbilling" android:versionName="1.0" android:versionCode="1">
   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
     <!-- Unity3d Activities -->
     <activity android:name="com.neatplug.u3d.plugins.common.NPUnityPlayerActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:launchMode="singleTask">
       <intent-filter>
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
     </activity>
   
     <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="portrait">
     </activity>
     <service android:name="com.platoevolved.inappbilling.BillingService" />
     <receiver android:name="com.platoevolved.inappbilling.BillingReceiver">
       <intent-filter>
         <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
         <action android:name="com.android.vending.billing.RESPONSE_CODE" />
         <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
       </intent-filter>
     </receiver>
     <activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation">
     </activity>
     <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 1422397297976133" />
     <activity android:name="com.neatplug.u3d.plugins.facebook.FriendPickerActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" />
     <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
     <meta-data android:name="com.google.android.gms.appstate.APP_ID" android:value="@string/app_id" />
     <activity android:label="@string/app_name" android:name="com.nerdiacs.nerdgpgplugin.DummyActivity" />
   </application>
   <!-- Required permission to use in-app billing. -->
   <uses-permission android:name="com.android.vending.BILLING" />
   <uses-feature android:glEsVersion="0x00020000" />
   <uses-sdk android:minSdkVersion="6" android:targetSdkVersion="15" />
   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 </manifest>
Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Oct 20, 2013 at 12:54 PM 0
Share

What are the orientation settings in Build Settings -> Player Settings, set up as?

avatar image ThePositiveMoxie · Oct 20, 2013 at 12:56 PM 0
Share

Thanks for the quick reply, under Default orientation, it is set to Landscape Left.

avatar image meat5000 ♦ · Oct 20, 2013 at 01:45 PM 0
Share

Do you export to Eclipse? If so, have you tried deleting the export folder and reimporting to a fresh workspace? Unity will build a fresh export and importing this ins$$anonymous$$d of refreshing will make sure there are no residual files.

Also, in eclipse a manifest file gets generated from the first...make sure to edit the right one!

avatar image ThePositiveMoxie · Oct 20, 2013 at 01:48 PM 0
Share

I have eclipse, but never use it for Unity based work. I will give it a try and let you know if it helps. Thanks.

avatar image meat5000 ♦ · Oct 20, 2013 at 01:48 PM 0
Share
 android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|ui$$anonymous$$ode|touchscreen" android:screenOrientation="landscape" android:name="com.company.game.UnityPlayerProxyActivity">


The last line here has my orientation in it. Just pasted from my manifest as I also use landscape left.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ThePositiveMoxie · Oct 20, 2013 at 03:01 PM

I actually ended up taking out your added piece. Changed mine right above intent adding the android:screenOrientation = "landscape". It worked. Not sure why, I swear I did it this way before. Though it worked and it is all good. Unfortunately I don't have a direct answer to know why it worked this time and not before, for a real acceptable answer. Must have messed some other things up in the process my first few goes at it.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Oct 20, 2013 at 08:04 PM 0
Share

Perhaps you changed the one in the bin. Left it open in editor and modified the wrong one? :P It happens.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 2018.1.9f1 crash when open Photo Album on iOS 10.x 0 Answers

How force the app to landscape in Android with a Manifest.xml? 1 Answer

Unity Android app crashes when launched from Facebook Messenger app. 0 Answers

Android app crash at start because of error "Unable to get provider androidx.core.content.FileProvider" 1 Answer

The Android app starts in portrait mode (setting is AutoRotation, Landscape) and Crash when I rotate my device. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges