1

I am receiving a file through mail "*.pzl". this files has some data that is required from my application. now I want to do that when I clicked on that mail that has ".pzl" file. I want to open my app and do some work. I have tried so may method but I can't find the solution.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.agicent.fifteen_puzzle"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="19" />

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data
            android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
        <meta-data
            android:name="com.google.android.gms.appstate.APP_ID"
            android:value="@string/app_id" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

        <activity
            android:name=".activities.SplashScreen"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activities.MenuActivity"
            android:label="@string/title_activity_menu"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activities.MyActivity"
            android:label="@string/title_activity_game"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="file" />
                <data android:mimeType="*/*" />
                <data android:pathPattern=".*\\.pzl" />
            </intent-filter>
        </activity>
        <activity
            android:name=".activities.SettingsActivity"
            android:label="@string/title_activity_settings"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".activities.AchevementsActivity"
            android:label="@string/title_activity_achevements" >
        </activity>
    </application>

</manifest>
Bjørn-Roger Kringsjå
  • 9,582
  • 6
  • 32
  • 59
Umesh Kumar Saraswat
  • 718
  • 3
  • 10
  • 24

1 Answers1

0

possible solutions:
Remove mimtype or

add data android:host="*" in intent filter

have called intent in the activity which handle pzl file type?

Hirak Chhatbar
  • 2,981
  • 23
  • 34