mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 09:07:48 -04:00
[MS OAuth] Try to return back to activity after login
This commit is contained in:
parent
15123644a1
commit
bc5f94e2ee
@ -67,7 +67,7 @@ dependencies {
|
||||
implementation 'com.android.support:preference-v14:26.0.0'
|
||||
implementation 'com.android.support:design:26.0.0'
|
||||
implementation 'com.android.support:support-annotations:26.0.0'
|
||||
implementation 'com.android.support:customtabs:25.2.0'
|
||||
implementation 'androidx.browser:browser:1.0.0'
|
||||
|
||||
// implementation 'com.intuit.sdp:sdp-android:1.0.5'
|
||||
// implementation 'com.intuit.ssp:ssp-android:1.0.5'
|
||||
|
@ -19,15 +19,24 @@
|
||||
android:value="ratio_float"/>
|
||||
|
||||
<activity
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:label="@string/app_short_name"
|
||||
android:name=".PojavLoginActivity"
|
||||
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:host="login.live.com" android:scheme="https"
|
||||
android:pathPrefix="/oauth20_desktop.srf"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
|
@ -1,13 +1,9 @@
|
||||
package net.kdt.pojavlaunch;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
import android.graphics.*;
|
||||
import android.net.*;
|
||||
import android.support.customtabs.*;
|
||||
import android.support.v4.content.*;
|
||||
import android.widget.*;
|
||||
import net.kdt.pojavlaunch.*;
|
||||
import androidx.browser.customtabs.*;
|
||||
|
||||
public class CustomTabs {
|
||||
|
||||
@ -18,18 +14,4 @@ public class CustomTabs {
|
||||
CustomTabsIntent customTabsIntent = builder.build();
|
||||
customTabsIntent.launchUrl(context, Uri.parse(url));
|
||||
}
|
||||
|
||||
public static class CopyBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String url = intent.getDataString();
|
||||
|
||||
ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData data = ClipData.newPlainText("Link", url);
|
||||
clipboardManager.setPrimaryClip(data);
|
||||
|
||||
Toast.makeText(context, "Copied " + url, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user