APIs

For HERE API’s, visit HERE’s site at https://developer.here.com/documentation.

Auto upload configuration API

Several cloud storage applications provide automatic picture and video upload to a cloud service. The Auto upload configuration API, introduced in Nokia X software platform version 2.0, provides an easily discoverable way to launch a configuration dialogue for a third party application with such a feature. For the end-user this means the feature can be found directly from the native camera and from the native gallery application, where the auto upload menu item is visible as shown in figures 1 and 2:

Figure 1. Auto upload menu item in camera settings.

Figure 1. Auto upload menu item in camera settings.

Figure 2. Auto upload menu item in gallery menu.

Figure 2. Auto upload menu item in gallery menu.

When the Auto upload menu item is selected, and there is more than one application that can handle the action, an application selection dialogue is shown. Figure 3 shows the dialogue when there is a third party application utilising the Auto upload configuration intent:

Figure 3. Auto upload dialogue when more than one app is registered to handle auto upload intents.

Figure 3. Auto upload dialogue when more than one app is registered to handle auto upload intents.

Adding the auto upload support to your application is really simple. All you need to do is specify the intent filter for your selected Activity in the Android manifest file (AndroidManifest.xml):

<activity
    android:name="com.example.myapp.UploadSettingsActivity"
    android:label="@string/upload_settings_activity_label">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="com.nokia.intent.category.GALLERY_MEDIA_PROVIDER" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

When the user selects the third party application from the dialogue (figure 3), the Activity, which has the intent filter declared, is started. The activity is usually expected to display auto upload related options and settings. The label shown in the dialogue is the one defined in android:label property of the Activity (see figure 3 where @string/upload_settings_activity_label has the value of “My upload settings”). The icon shown in the dialogue is the one associated with the application containing the activity.

The developer has to implement the settings view and the business logic for the upload settings. The figure below shows how this view is implemented in OneDrive:

Figure 4. OneDrive auto upload settings view.

Figure 4. OneDrive auto upload settings view.