mirror of
https://github.com/akaessens/NoFbEventScraper
synced 2025-06-05 23:29:13 +02:00
add share to nofb
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter android:label="NoFb Event Scraper">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
@ -32,6 +32,14 @@
|
||||
android:pathPrefix="/events" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- Accepts share intents” -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent-filter>
|
||||
|
||||
|
||||
|
||||
</activity>
|
||||
|
||||
|
@ -123,12 +123,18 @@ public class MainActivity extends AppCompatActivity {
|
||||
//get data from deep link
|
||||
Intent intent = getIntent();
|
||||
Uri data = intent.getData();
|
||||
String shared_text = intent.getStringExtra(Intent.EXTRA_TEXT);
|
||||
|
||||
if (data != null) {
|
||||
// opening external fb link
|
||||
field_uri_input.setText(data.toString());
|
||||
startScraping();
|
||||
}
|
||||
else if (shared_text != null) {
|
||||
//share to nofb
|
||||
field_uri_input.setText(shared_text);
|
||||
startScraping();
|
||||
}
|
||||
|
||||
}
|
||||
private String parseField(TextInputEditText field) {
|
||||
|
Reference in New Issue
Block a user