Changed message links (2)

pull/212/head
M66B 3 years ago
parent 845ecce7e1
commit 261ac59178

@ -187,6 +187,16 @@
<data android:scheme="message" /> <data android:scheme="message" />
<data android:host="email.faircode.eu" /> <data android:host="email.faircode.eu" />
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="link.fairemail.net" />
</intent-filter>
</activity> </activity>
<activity <activity

@ -193,6 +193,16 @@
<data android:scheme="message" /> <data android:scheme="message" />
<data android:host="email.faircode.eu" /> <data android:host="email.faircode.eu" />
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="false">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="link.fairemail.net" />
</intent-filter>
</activity> </activity>
<activity <activity

@ -193,6 +193,16 @@
<data android:scheme="message" /> <data android:scheme="message" />
<data android:host="email.faircode.eu" /> <data android:host="email.faircode.eu" />
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="false">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="link.fairemail.net" />
</intent-filter>
</activity> </activity>
<activity <activity

@ -186,6 +186,16 @@
<data android:scheme="message" /> <data android:scheme="message" />
<data android:host="email.faircode.eu" /> <data android:host="email.faircode.eu" />
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="link.fairemail.net" />
</intent-filter>
</activity> </activity>
<activity <activity

@ -118,9 +118,11 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
Intent intent = getIntent(); Intent intent = getIntent();
Uri data = (intent == null ? null : intent.getData()); Uri data = (intent == null ? null : intent.getData());
if (data != null && if (data != null &&
"message".equals(data.getScheme()) && (("message".equals(data.getScheme()) &&
("email.faircode.eu".equals(data.getHost()) || ("email.faircode.eu".equals(data.getHost()) ||
BuildConfig.APPLICATION_ID.equals(data.getHost()))) { BuildConfig.APPLICATION_ID.equals(data.getHost()))) ||
("https".equals(data.getScheme()) &&
"link.fairemail.net".equals(data.getHost())))) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Bundle args = new Bundle(); Bundle args = new Bundle();
@ -131,7 +133,8 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
protected EntityMessage onExecute(Context context, Bundle args) { protected EntityMessage onExecute(Context context, Bundle args) {
Uri data = args.getParcelable("data"); Uri data = args.getParcelable("data");
long id; long id;
if ("email.faircode.eu".equals(data.getHost())) if ("email.faircode.eu".equals(data.getHost()) ||
"link.fairemail.net".equals(data.getHost()))
id = Long.parseLong(data.getFragment()); id = Long.parseLong(data.getFragment());
else { else {
String path = data.getPath(); String path = data.getPath();

@ -269,7 +269,7 @@ public class EntityMessage implements Serializable {
} }
String getLink() { String getLink() {
return "message://email.faircode.eu/link/#" + id; return "https://link.fairemail.net/#" + id;
} }
boolean isPlainOnly() { boolean isPlainOnly() {

@ -187,6 +187,16 @@
<data android:scheme="message" /> <data android:scheme="message" />
<data android:host="email.faircode.eu" /> <data android:host="email.faircode.eu" />
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
<data android:host="link.fairemail.net" />
</intent-filter>
</activity> </activity>
<activity <activity

Loading…
Cancel
Save