Browse Source

Fix intent filters

intent-filter
vanitasvitae 5 years ago
parent
commit
57b3068e70
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
  1. 8
      app/src/main/AndroidManifest.xml
  2. 10
      app/src/main/java/de/trac/spherical/MainActivity.java

8
app/src/main/AndroidManifest.xml

@ -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>

10
app/src/main/java/de/trac/spherical/MainActivity.java

@ -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);
}
}

Loading…
Cancel
Save