Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 5    Views: 247

hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
01/16/14 05:36 PM (10 years ago)

Permissions

So I have a question about all the Permissions that are set by default. I was wondering are any of these mandatory? Are there criteria that explain the permissions? I have a very simply app that just somewhat mimics my business website. Give info of the company, it does have some forms that people fill out but nothing that involved or include critical personal information. I was wondering if I need to have all those permissions set and if not how do I disable them? Thanks in advance, Howard
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/16/14 07:42 PM (10 years ago)
Great Question. Complex answer, depending on what in particular you're speaking of… If you're talking about 'Android' permissions, such as those thrown at the user when they first launch your app, those are handled in your AndroidManifest.xml file. You'll see a bunch of them looking like this: <!-- required device permissions --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_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.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" /> So… Most of my apps don't need the camera. I can cut that out. Also, I don't do much with contacts. I can kill those off too. If your app doesn't use GPS, you can kill the "COARSE" and "FINE" location statements. Anything you use, keep. anything you don't use, you can throw away. Research the capabilities of each 'permission' and decide if your app needs it. If it doesn't, you can safely remove it. But also keep in mind that if you change your mind and add some GPS capability, you may need to submit an update with a corrected AndroidManifest.xml file "if" you deleted a needed permission. Hope this helps! Cheers! -- Smug
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/16/14 07:43 PM (10 years ago)
Hi Howard, You can remove any of the permissions that your app doesn't require. For yours, the camera permission is one that you could probably remove. If your app doesn't use that functionality, it's likely safe to remove (but make sure you test the install, of course!). Some good candidates for removal: (If you're not using GPS) <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.WRITE_CONTACTS" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> Mark
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/16/14 07:44 PM (10 years ago)
Lol Mark! Great minds… :) Cheers! -- Smug
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
01/16/14 09:06 PM (10 years ago)
Simultaneous posts...I love it! Mark
 
hasher13
Android Fan
Profile
Posts: 376
Reg: Jul 21, 2012
Wethersfield
8,060
like
01/17/14 06:14 AM (10 years ago)
I love it too! Thanks guys. Since I do use the camera for the BarCode Plug-in I assume that is considered using it? Also instead of deleting them, can I line them out so, if I do need them in the future I can just re-activate them? Thanks again and especially for the quick response. Howard
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.