mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 05:20:14 -07:00
[MS OAuth] Try to return back to activity after login
This commit is contained in:
parent
15123644a1
commit
bc5f94e2ee
3 changed files with 12 additions and 21 deletions
|
|
@ -67,7 +67,7 @@ dependencies {
|
||||||
implementation 'com.android.support:preference-v14:26.0.0'
|
implementation 'com.android.support:preference-v14:26.0.0'
|
||||||
implementation 'com.android.support:design:26.0.0'
|
implementation 'com.android.support:design:26.0.0'
|
||||||
implementation 'com.android.support:support-annotations: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.sdp:sdp-android:1.0.5'
|
||||||
// implementation 'com.intuit.ssp:ssp-android:1.0.5'
|
// implementation 'com.intuit.ssp:ssp-android:1.0.5'
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,24 @@
|
||||||
android:value="ratio_float"/>
|
android:value="ratio_float"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="sensorLandscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
android:label="@string/app_short_name"
|
android:label="@string/app_short_name"
|
||||||
android:name=".PojavLoginActivity"
|
android:name=".PojavLoginActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation">
|
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</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>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import android.app.*;
|
|
||||||
import android.content.*;
|
import android.content.*;
|
||||||
import android.graphics.*;
|
|
||||||
import android.net.*;
|
import android.net.*;
|
||||||
import android.support.customtabs.*;
|
|
||||||
import android.support.v4.content.*;
|
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import net.kdt.pojavlaunch.*;
|
import androidx.browser.customtabs.*;
|
||||||
|
|
||||||
public class CustomTabs {
|
public class CustomTabs {
|
||||||
|
|
||||||
|
|
@ -18,18 +14,4 @@ public class CustomTabs {
|
||||||
CustomTabsIntent customTabsIntent = builder.build();
|
CustomTabsIntent customTabsIntent = builder.build();
|
||||||
customTabsIntent.launchUrl(context, Uri.parse(url));
|
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…
Add table
Add a link
Reference in a new issue