Show Gadgetbridge in the "share" system dialog for installing firmwares, apps etc.

here
Daniele Gobbetti 2016-12-27 12:20:59 +01:00
parent 440a5e071f
commit 353bd4651b
2 changed files with 12 additions and 0 deletions

View File

@ -191,6 +191,15 @@
<data android:mimeType="application/zip" />
<data android:mimeType="application/x-zip-compressed" />
</intent-filter>
<!-- to receive files from the "share" intent -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<service

View File

@ -152,6 +152,9 @@ public class FwAppInstallerActivity extends GBActivity implements InstallActivit
});
uri = getIntent().getData();
if (uri == null) { //for "share" intent
uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
}
installHandler = findInstallHandlerFor(uri);
if (installHandler == null) {
setInfoText(getString(R.string.installer_activity_unable_to_find_handler));