Special callbacks for apps from Google Now app chooser

68 Views Asked by At

I am writing a Calendar app and try to integrate it with Google Now. After phrase "Create event" Google Now initiate creation of calendar event.

Event creation

Also it allows to select app for event creation:

Choosing app

Created event puts into user calendar and here the question: what advantages gives app choosing? Are choosed app receives some special intents or activity callbacks?

Manifest code:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.test"
    android:versionCode="2"
    android:versionName="2.0" >

    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/MaterialTheme" >
        <activity
            android:name="com.example.test.SomeActivity"
            android:label="@string/app_name"
            android:configChanges="keyboardHidden|orientation|screenSize" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>

        <activity
            android:name="com.example.test.OtherActivity"
            >

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="vnd.android.cursor.item/event" />
            </intent-filter>

        </activity>

        <receiver
            android:name=".NativeEventChangeReceiver">

            <intent-filter>
                <action android:name="android.intent.action.PROVIDER_CHANGED"/>
                <data android:scheme="content"/>
                <data android:host="com.android.calendar"/>
            </intent-filter>

        </receiver>

    </application>

</manifest>
0

There are 0 best solutions below