Your Dropsource app can interact with other apps and functions on the user’s mobile device. You can send data from your app to other apps, import data from other apps, and access native functionality including location / mapping and notifications.
A number of Actions allow you to send data from an input source in your app to another app on the user device, including:
- Open a Web Page – send a URL to open in the device browser.
- Create Email – send message details to open a new email in the default device client.
- Create Text Message – send a phone number and text to open a new text message.
- Dial Phone Number – send a phone number to open in the device dialer app.
- Save Image to Device – allow the user to save an image from the app onto their device.
- Send User to Rate your App – open your app URL in the App Store for rating.
Your app pages can display pictures from the device camera and gallery, using the Select Image from Photos, Pick an Image, and Take a Photo Actions. By adding an Image Element to a page, then adding one of these Actions to an Event such as a button tap, you can allow the user to bring their own media into your app.
You can implement barcode scanning functionality in your app via the device camera.
Your app can also allow the user to select files from any available cloud document providers using the device file picker app.
To import a remote file by URL, use the Download Remote File Action, accessing the file data via the Event Data container in the Download Succeeded Event. Use the Delete Local File Action when you are done or the downloaded file will increase your app’s size on the user device.
On Android, you will need a Google Maps API Key to access location data – add your key in your app Location Settings.
To build user location into your app:
- On iOS, add a Page Variable of CLLocationManager type. Add the Request Location Authorization Action to an Event, such as a page loading, selecting the Location Manager you created and an access type. On Android you only need to create location variables for certain Actions, and permissions requests are handled automatically.
- For a single update, add the Request Location Update Action to an Event. For continuous updates, choose the Start Tracking Location Action – use the Stop Updating Location Action when you are finished.
If you use the Start Tracking Location Action on Android, your app can receive location updates requested by other apps. Use the Interval parameter to specify how often your application will request updates, and Fastest Interval to specify how often you will receive GPS updates from other apps.
You can build latitude and longitude into a location object using the Create a Location Object Action on iOS or the Create a LatLng Object Action on Android – this allows you to use location data from an external source such as an API request.
Your app can carry out a variety of location-aware functions, such as retrieving user-friendly info about locations, calculating distance and travel time between locations, and showing directions in the device maps app. Check out the native functionality tutorials for practical walkthroughs of building location into your app user experience.
To display a map in your app, add the Map View Element to a page. You will see various Properties including different map types such as Satellite, and an option to show the user location.
To specify the location shown in a Map, add the Set Visible Map Region Action.
You can respond to Events on the Map, including the user long-pressing it, or tapping a pin/marker. When adding Actions to Map Events, use the Event Data container to access information about the location or annotation the user has touched.
You can also manipulate the Map display using Actions to add or remove pins/markers.
On iOS, first check Push Notifications Enabled in your app Settings > Push Notifications section. Next request the user’s permission to receive notifications, use the Request Notification Authorization Action, which includes nested Events for authorization being granted or denied.
On Android, in your app Settings > Firebase section, upload a Google Services JSON file to receive push notifications for your app. For more on Firebase Cloud Messaging in Android, see the official guidance. If you’re using OneSignal, complete the details in Settings > OneSignal Notification Service.
In the App Lifecycles drawer on the left of the editor, you can respond to notification Events – on iOS these include the app being registered for notifications and the user responding to a notification, on Android Firebase / OneSignal notifications being received.
In Actions added to these Events you can access the registration and notification details via the Event Data container.