allow manually sharing urls to subscribe activity

This commit is contained in:
Andrew Dolgov 2013-11-27 18:43:53 +04:00
parent f8a49d8c06
commit 64591a901c
2 changed files with 14 additions and 0 deletions

View File

@ -92,6 +92,15 @@
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:label="@string/subscribe_name" android:label="@string/subscribe_name"
android:theme="@style/DarkDialogTheme" > android:theme="@style/DarkDialogTheme" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

View File

@ -13,7 +13,9 @@ import org.fox.ttrss.types.FeedCategory;
import org.fox.ttrss.types.FeedCategoryList; import org.fox.ttrss.types.FeedCategoryList;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
@ -68,6 +70,9 @@ public class SubscribeActivity extends CommonShareActivity {
String urlValue = getIntent().getDataString(); String urlValue = getIntent().getDataString();
if (urlValue == null)
urlValue = getIntent().getStringExtra(Intent.EXTRA_TEXT);
if (savedInstanceState != null) { if (savedInstanceState != null) {
urlValue = savedInstanceState.getString("url"); urlValue = savedInstanceState.getString("url");