Skip to content

Commit

Permalink
feat: add receive_sharing_intent package (sometimes working)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamslo committed Jun 8, 2023
1 parent d9a4bba commit c5a3eb8
Show file tree
Hide file tree
Showing 14 changed files with 773 additions and 4 deletions.
18 changes: 18 additions & 0 deletions app/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Intent filters for receiving shared data -->
<!-- Health-X dataLOFT specific files -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="dwa.health-x.org/*" />
</intent-filter>
<!-- For testing, allow all file types and text -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/*" />
</intent-filter>
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
10 changes: 10 additions & 0 deletions app/android/app/src/main/kotlin/de/hpi/frasecys/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
package de.hpi.pharme

import android.os.Bundle
import io.flutter.embedding.android.FlutterActivity
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK

class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
if (intent.getIntExtra("org.chromium.chrome.extra.TASK_ID", -1) == this.taskId) {
this.finish()
intent.addFlags(FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
super.onCreate(savedInstanceState)
}
}
6 changes: 6 additions & 0 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ PODS:
- Flutter
- path_provider_ios (0.0.1):
- Flutter
- receive_sharing_intent (0.0.1):
- Flutter
- sensors_plus (0.0.1):
- Flutter
- shared_preferences_ios (0.0.1):
Expand All @@ -30,6 +32,7 @@ DEPENDENCIES:
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- receive_sharing_intent (from `.symlinks/plugins/receive_sharing_intent/ios`)
- sensors_plus (from `.symlinks/plugins/sensors_plus/ios`)
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
Expand All @@ -51,6 +54,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
receive_sharing_intent:
:path: ".symlinks/plugins/receive_sharing_intent/ios"
sensors_plus:
:path: ".symlinks/plugins/sensors_plus/ios"
shared_preferences_ios:
Expand All @@ -67,6 +72,7 @@ SPEC CHECKSUMS:
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
receive_sharing_intent: c0d87310754e74c0f9542947e7cbdf3a0335a3b1
sensors_plus: 5717760720f7e6acd96fdbd75b7428f5ad755ec2
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
Expand Down
Loading

0 comments on commit c5a3eb8

Please sign in to comment.