• JS RenderKit
  • JS Main
  • Components
    • Overview
    • Page
    • Basic
      • Rectangle
      • Text
      • Button
      • HTML Article
      • Toggle Button
      • Tiler
      • Web View
      • Image Zoomer
    • Navigation
      • Carousel
    • Forms
      • Form
      • Text Entry
    • Layout
      • Group
  • Web API
  • Tutorials
  • Contact
Menu
  • JS RenderKit
  • JS Main
  • Components
    • Overview
    • Page
    • Basic
      • Rectangle
      • Text
      • Button
      • HTML Article
      • Toggle Button
      • Tiler
      • Web View
      • Image Zoomer
    • Navigation
      • Carousel
    • Forms
      • Form
      • Text Entry
    • Layout
      • Group
  • Web API
  • Tutorials
  • Contact
Umajin Developer > App permissions on Android and iOS

Both Android and iOS control access to sensitive parts of the phone such as the Camera or GPS, requiring that the user approve when an app wants to use these features.

Umajin App Creator has built-in code to request these permissions when required; for example, using our GPS APIs will cause the user to be prompted to allow access to location for the app.

For the most part this will be handled automatically, however, you may need to be aware of permissions details in some cases.

iOS

Apple devices have from the start required that the app request permissions to access sensitive features, only when it wants to use them.

Recently (2019) the Apple app store requires that you supply a good description of why your app needs permission, with a particular emphasis on where any private information may end up. For example, if taking a photo, the description should say what happens to the photo and if it is transported anywhere outside the app.

These descriptions can be added in a file named “ios_usage_descriptions.json” that the editor will create in your project folder, the first time you go to the App Stores publish dialog.

ios_usage_descriptions.json

{
  "NSLocationWhenInUseUsageDescription": "to help guide you to your destination.",
  "NSLocationAlwaysUsageDescription": "to track your location over time",
  "NSPhotoLibraryUsageDescription": "to choose a user profile photo",
  "NSPhotoLibraryAddUsageDescription": "to save a cool framed user photo",
  "NSCameraUsageDescription": "to take photos for your profile and to scan QR codes",
  "NSBluetoothPeripheralUsageDescription": "to find your location using bluetooth beacons.",
  "NSBluetoothAlwaysUsageDescription": "to find your location using bluetooth beacons.",
  "NSMicrophoneUsageDescription": "We use the microphone to listen for your voice instructions."
}

The entries in this file will be copied into the iOS info.plist file when you complete publishing.

Android

Prior to Android Marshmallow (v6) all permissions for an app were requested at install time. The user only had two options – accept everything, or cancel the install. The required permissions were defined in the AndroidManifest.xml.

In Android Marshmallow, permissions were changed to be requested when the app wanted to use a feature, in the same way as iOS. However, the Manifest is still required to list all the permissions that the code will request.

Umajin App Creator will generate the Android manifest file automatically when you publish, based on the Components, Actions and APIs that your app contains. If you need to add additional permissions that the App Creator could not automatically detect, you can add them into AndroidPermissions.txt:

android_permissions.txt

This text file in your Project /scripts folder specifies additional permissions your app may need. It’s only needed if Umajin Editor scanning didn’t detect everything automatically.

The entries in this file are added to the Android Manifest at publishing time.

Each line lists a permission to add. You can comment out lines to ignore them using #.

 

# Because we use the Dial Number action android.permission.CALL_PHONE

Example

# Additional android permissions required by your Javascript code
# If you make API calls, callAction calls, or dynamically create components which require permissions
# Actions specified within the Umajin Editor, will automatically get appropriate permissions.

# Note: lines starting with hash are ignored

# if you want to write to user pictures, or anywhere else outside the app's own data.
# android.permission.WRITE_EXTERNAL_STORAGE

# to use GPS location services, OR to use Bluetooth
#android.permission.ACCESS_FINE_LOCATION
#android.permission.ACCESS_COARSE_LOCATION

# to use the camera (cameraCapture, cameraCodeScan)
#android.permission.CAMERA

# to use NFC
#android.permission.NFC

# to use Bluetooth or Bluetooth beacons, specify both permissions
#android.permission.BLUETOOTH
#android.permission.BLUETOOTH_ADMIN

#android.permission.RECORD_AUDIO

 

  • Developer Home
  • Umajin Home
  • Support Home
Menu
  • Developer Home
  • Umajin Home
  • Support Home