How to block Permissions asked by an android app with fake data - android

I am trying to control permission grant based on user choice. So if say user walks out in public and doesn't want to share his/her location with facebook app, he/she should revoke that pemission grant and system should send some fake data to facebook. Android 4.3 have this feature with permission manager, but it doesn't send fake data, rather block permission altogether rendering app not work at all.

Check out XPrivacyLua. Requires ROOT, though.

Related

Android / Turning on dangerous permissions automatically without user's consultation

requestPermissions(permissionsToRequest.toArray(new String[permissionsToRequest.size()]), 101);
In Android, after Marshmallow version, is there any way to turn on dangerous permissions like accessing device's fine location, camera or microphone automatically without user's consultation? If not, why is it so? What is the reason behind it?
I wish I would be able to closely monitor my iPad by using my smartphone while I am at office and it would be good if it were possible to do it without user's consultation. I also know that once an app is installed and if a user accepts for a dangerous permission at least once, then it would not prompt for it again.
By the way, why it is known as dangerous permission and not something like sensitive permission, as it intrudes user's privacy and makes it possible to access stored files on any given user's mobile device?
Dangerous permissions
Dangerous permissions cover areas where the app wants data or resources that involve the user's private information, or could potentially affect the user's stored data or the operation of other apps. For example, the ability to read the user's contacts is a dangerous permission. If an app declares that it needs a dangerous permission, the user has to explicitly grant the permission to the app. Until the user approves the permission, your app cannot provide functionality that depends on that permission.
To use a dangerous permission, your app must prompt the user to grant permission at runtime. For more details about how the user is prompted, see Request prompt for dangerous permission.

How can I identify the foreground 'app' in OS?

I am an Android developer and I want to write an if statement in my application. In this statement I want to check which app is run which time in my mobile like Facebook, messenger,You Tube,chrome etc when its open and when its close. How can I do this programmatically?
I'm not sure what you mean with the if statement part but I guess that what you are looking for is UsageStatsManager.
Take into account that this API requires the permission android.permission.PACKAGE_USAGE_STATS, which is a system-level permission and will not be granted to third-party apps. However, declaring the permission implies intention to use the API and the user of the device can grant permission through the Settings application.

Android M: Effect of Selective Permissions on Ads

Now that Android 6.0 becomes more popular among users, I've asked myself what the consequences of the selective permission granting are.
Let's assume I had a free ad-supported version of an app. It will obviously need internet permission to query ads. Now the user is able to deny that permission and apps could not be queried. The consequence I am thinking of is to deny app function if not all the permissions are granted. But this would make the permission model pointless for my app. It would be an "all or nothing" scenario. Is that thinking correct? I am interested in your thoughts.
Another thought I had was: Is the permission of internet access granted to AdMob automatically, by any chance? This would prevent users from disablings ads simply by takingvaway the internet permission. As AdMob is a Google company and this functionality is implemented in the Google Play Services, I guess that could be possible?! Any thoughts on this?
Let me know what you think.
Update: Admob also wants to have Location Info. So even though Internet does not need permission, the question still is interesting.
#mad: in android 6.0, your app never ask your to allow internet permission. because internet not part of user's privacy in android 6.0
(in sort user not able to deny internet permission) only on/off internet from device!
so don't worry about it. you app work same in android 6.0 as previous version of android.
you have to ask user for permission only if you are using, CAMERA, CONTACTS, LOCATION, MICROPHONE, Phone, STORAGE ...etc..
LOCATION: when you fetch location from your app and pass to any 3rd party app. in this case you must have to ask user to allow location permission. otherwise its not needed like Google Play service or In-App Purchease.(both fetch user location where app installed or product purchase but when we use both library in our app we must not have to ask location permission).

Report GET_ACCOUNTS permission in other app

I am actually preparing to release an app using the device google account to authenticate on Google App Engine server.
To do that, I need those permissions :
USE_CREDENTIALS : obviously
INTERNET : obviously
GET_ACCOUNTS : to ask the user to select one of the google accounts registered on his phone.
My problem is with GET_ACCOUNTS : I think it's quite intrusive to ask this permission along with INTERNET : I would be able to get all his accounts (google, facebook, etc...) and send them to my server (I won't do that of course !). But I fear this permission may scare users, and they may not download my app...
I had the idea to report this permission to an other app, which wouldn't have INTERNET permission. This app would be called with an intent, and return only the account chosen by the user. And then, my main app don't need GET_ACCOUNTS anymore.
The source code is there : http://code.google.com/p/account-chooser/
It's quite simple (only one screen)
To send an intent to this app I use a utility library like IntentIntegrator from ZXing. If my "account chooser" app is not present on the device, it asks the user to download it from market.
What do you think about that ? Is it a good idea ? Am I right to bother the user with downloading a mysterious app he may not understand the usefulness ? Or should I just use GET_ACCOUNTS permission in my main app without questionning myself about privacy ?
So instead of just asking for the GET_ACCOUNTS permission within your app, you plan to request it in another app and in turn expose that information to any other app on the device (via an intent).
Stick with asking for the GET_ACCOUNTS permission within your app and be done with it. Speaking from experience, if an app I downloaded forced me to install yet another app just to get some functionality out of it, well.. you know what happens next :)

How to grant permission dynamically in android, i.e while running an application, Is this achievable?

I have few doubts.
Is it possible for Android application after installation, to ask user for permission for accessing certain functions? Like say the app A wants to read contacts for a specific purpose. If the user grants permission, then the activity will take place. Else it wont. Is it possible?
Is there a way of allowing user to select/de-select permissions during installation time?
I have read that using CyanogenMod grants user these kind of priveleges. Is there any solution for non-rooted user, apart from take-it-or-leave-it approach?
It would be great, but not, all permission must be granted during installation :-(
Only exception is access to the google profile, this will be authorized during first access.
I hope that a future android version will can do that.
Cyanogen can do opposite. You must grant all permissions during install, but you can explicitly remove them later. But it result in application crash very often. This is only for advanced users.

Categories

Resources