Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
2
Question by siddharth3322 · Jan 30, 2015 at 06:32 AM · androidpluginandroid-manifestpermissions

Android Manifest with Single Permission

I want to implement screen shot capturing and sharing feature for my game in Android platform. No other plugin included in game at present. So no manifest file exist at present in game.

I just need to include

 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

permission in manifest file.

So how to create minimal manifest file with single permission added?

What content necessary in manifest file?

Comment
Add comment · Show 1
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 siddharth3322 · Jan 30, 2015 at 07:52 AM 0
Share

Using this I don't need to create $$anonymous$$anifest file. Thanks for this help.

2 Replies

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

Answer by pako · Jan 30, 2015 at 07:38 AM

All Android projects have a manifest file, but they are not visible in Unity. They are automatically created when you build for Android, and are included inside the apk. The apk is just a zip file, so you can temporarily rename the extension of your build file to zip, and open it to see what's included.

However, I wouldn't consider it "best practice" to edit the manifest file this way, although it could probably work (but it could break something). The proper way is to click to enable "Google Android Project" in the Build Settings. Then, when you build your project an Android Project (java) will be exported, and you can open that in Android Studio. Your "AndroidManifest.xml" should be in the root of your project. You can open it, edit it and rebuild an apk from inside Android Studio.

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 siddharth3322 · Jan 30, 2015 at 07:46 AM 0
Share

Thanks for all this information.

avatar image
1

Answer by ShawnFeatherly · Jul 31, 2016 at 02:22 PM

After Android Studio generates that AndroidManifest.xml file, you can place it back inside of Unity. Copy the AndroidManifest.xml to the folder `Assets\Plugins\Android` (Create this folder if it doesn't exist) This allows you to skip the Android Studio step in future builds.

Unity will use this AndroidManifest.xml on the next build. Just be careful if there are multiple AndroidManifest.xml files, only one of them will be used.

If you want to skip Android Studio all together, here's a minimal AndroidManifest.xml:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.unity3d.player"
     android:versionCode="1"
     android:versionName="1.0" >
   <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 </manifest>
Comment
Add comment · Show 2 · 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 italomarques · Oct 14, 2017 at 09:22 PM 0
Share

i just put this $$anonymous$$imal Android$$anonymous$$anifest.xml in Assets\Plugins\Android ??

avatar image pako italomarques · Oct 15, 2017 at 12:14 PM 0
Share

@italomarques Yes, put it there.

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.

Follow this Question

Answers Answers and Comments

22 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

How to check if user has given camera or location permissions (android) 0 Answers

Disable permission requests 0 Answers

Unity3D Android plugins and SIGSEGV 0 Answers

How do I make an Android plugin for unity? 0 Answers

How to merge multiple AndroidManifest.xml files?? 3 Answers


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