How Expo(React Native) can access gallery and external storage without CAMERA_ROLL permission? - react-native

I have a terrible question..
I hope there is anyone who know this problem..
In EXPO App which is a wrapper API for React Native,
How can Expo Image picker example app can access Gallery(external storage) without requesting any external storage access permission to user???
original source code is here..
https://docs.expo.io/versions/latest/sdk/imagepicker/
I tried with removing any askAsync(CAMERA_ROLL.permission) or getAsync(CAMERA_ROLL.permission).
So the example app has no permission about accessing external storage...
BUT!! I press the button, It access the Gallery....
How can it be possible??
I double check permission on the app, but there is no granted permission to external storage...
Please let me know...
I think it is the appropriate thing which firstly asked permission, then access the external storage..
P.S I tested it with android phone only.
i have never checked permissions..

To stop expo app from having this permission, do the following:
Remove all reference to the permission requests (That you already did)
Remove the Image launcher (but it seems you don't want to do that)
Clear the expo application permission of media access
Step 3 is what you are looking for, to clear application settings go to your phones settings -> application management -> select expo app -> permissions and clear the gallery/media permission.
Now when you run the application again you will not be able to access the gallery even if you press the button as you mentioned and if you include the getAsync to request for permission you will be prompt with asking for permission.
EDIT:
To explicitly set permissions for stand alone applications modify your app.json file and add the "permissions" parameter under the android configurations there, by default expo uses all permissions of your device. specify there the permissions you want your application to have.
Please refer to this link for further details on how to configure your app.json file.
Hope this helps!

Related

Is there a way to not request location permission after LOCATION_WHEN_IN_USE permission has been granted on the system settings, on an Expo Project?

I am doing a react native project on expo. When a user have a "never" permission on the phone, when pressing share location button, the app asks if the user wants to change location manually and if "yes" the app redirects to system settings.
However when the user turns back and I try to access location through method getCurrentPositionAsync (expo-location library) and I still see the "LOCATION_FOREGROUND permission is required to do this operation" error, even though the LOCATION_WHEN_IN_USE permission has been granted on the system settings, because my app has not requested the permission through the expo-location API.
Is there a way to achieve this on an expo project, without having to ask twice? (testing on iphone)

My React Native Expo cli app rejected from app store due to the following causes “Guideline 5.1.1 — Legal — Privacy — Data Collection and Storage”

We noticed that your app requests the user’s consent to access the photos, but doesn’t sufficiently explain the use of the photos in the purpose string.
To help users make informed decisions about how their data is used, all permission request alerts need to explain how your app will use the requested information.
Next Steps
Please revise the purpose string in your app’s Info.plist file for the photos to explain why your app needs access and include an example of how the user’s data will be used.
You can modify your app’s Info.plist file using the property list editor in Xcode.
But my app is developed by “React Native” expo cli. the app.json file configuration is shown following below also I have attached the app.json file of my application
EXPO SDK Version is “expo”: “44.0.0”,
React Native Version is “react-native”: “0.64.3”,
How I can overcome it? please help me

React Native Expo - Location service

Im trying to submit an app to google play console but it is showing an error ->
This release includes permissions that haven't been declared in Play Console. Go to Sensitive app permissions to update your permission declarations.
But Im not asking the user for any location permission or have any code to do the same.
The closest thing that Im getting from the user is their timezone using expo-localization
Is there a way to fix is ?

Add permission in the app in RingCentral production

We are working in RingCentral application and APIs with SMS and fax permissions.
The application recently moved to production from Sandbox environment.
We have now a requirement to add 2 additional permission ReadAccount, ReadContact in the app which was not added during sandbox testing.
How can we do that? I don't see any option to modify the app. Is there any way we can modify the existing app?
As per I know once your app is in production, you cannot change anything.
You need to ask devsupport#ringcentral.com for any help. Once they added the permission with your request (not sure if they do.. most probably they don't) you need to test again for that permission you acquired.
The official recommendation is to create a new app, add proper permissions and graduate it. So in that case you need to go through again.
As per the reference here
"You can clone the app, give it a new name or add a version to the new app name. Add the missing permissions and run test in the sandbox the same way as you did for the first app. Graduate your app and finally replace the client Id and secrete to use the new app. You can suspend the old app after that."
Similar question here: https://forums.developers.ringcentral.com/questions/1059/how-to-add-permissions-of-read-call-log-in-product.html

How to create a new app in Dropbox with Full permissions

I'm trying to change my Dropbox application permission from 'App folder' to 'Full Dropbox'. By application I mean 'My apps':
I'm doing this to access all the functions provided by Dropbox API, otherwise an error is shown, for example:
Error in call to API function "sharing/get_folder_metadata": Your API app is an "App Folder" app. It is not allowed to access this API function.
Anyway, I've read that the only way to change the permission to an app is by creating a new one. Therefore, what I did was, created a new app with permission type 'Full dropbox' but for some reason it didn't even show up under 'Dropbox > Apps' directory.
According to developers guide if app has permission App folder then it is moved under Apps folder automatically. I tried also that but the folder didn't appear there for some reason. So, why the first application is showing..
Can there be only one active app, like, should I download all the data from first one, delete it and then create new app with Full permissions?
It's not possible to switch the permission on an existing Dropbox API app.
If you want to change the permission used for an app that hasn't been released to users, you can do so by deleting the current API app registration and registering another with the desired permission. Deleting an API app in development mode frees up the name so you can register it again. Once you do, just be sure to update your app accordingly to use the new app key and secret. Access tokens for the deleted app will also no longer work.
If your app has already been released to users, we do not recommend disabling your API app, as it would break the integration for existing users. Instead, we recommend you register another API app for the other permission and add that as an option in your app.
You can register a new API app here:
https://www.dropbox.com/developers/apps/create
There isn't a limit on the number of API apps that can be owned by or linked to a particular account.
Your second App Console screenshot shows that you do own two API apps: one with the "app folder" permission, and one with the "full Dropbox" permission.
Note that only apps with the "app folder" permission get a special "app folder" automatically created under "/Apps". Apps the with "full Dropbox" permission do not, and instead can access any path in the account.