Fix intent filters

This commit is contained in:
vanitasvitae 2017-09-12 18:11:58 +02:00
parent 3e09b47632
commit 57b3068e70
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
2 changed files with 11 additions and 7 deletions

View File

@ -19,15 +19,9 @@
<!-- Spherical images -->
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="application/vnd.google.panorama360+jpg" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/vnd.google.panorama360+jpg" />
</intent-filter>
</activity>
</application>

View File

@ -1,13 +1,23 @@
package de.trac.spherical;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
public class MainActivity extends AppCompatActivity {
public static final String TAG = "Spherical";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = getIntent();
String action = intent.getAction();
String type = intent.getType();
Log.d(TAG, "Intent: " + action + " " + type);
}
}