tmp save
This commit is contained in:
parent
288de5f8b6
commit
dfb689522e
@ -260,4 +260,4 @@
|
|||||||
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
|
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
|
||||||
<!-- allows sharing to Messenger app -->
|
<!-- allows sharing to Messenger app -->
|
||||||
</queries>
|
</queries>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -172,7 +172,7 @@ public class MainActivity extends UnityPlayerActivity
|
|||||||
// begin of google sign
|
// begin of google sign
|
||||||
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
|
||||||
.requestIdToken(getString(R.string.default_web_client_id1))
|
.requestIdToken(getString(R.string.default_web_client_id1))
|
||||||
.requestScopes(new Scope(Scopes.EMAIL))
|
.requestScopes(new Scope(Scopes.EMAIL), new Scope("https://www.googleapis.com/auth/drive.appdata"))
|
||||||
// .requestScopes(new Scope("https://www.googleapis.com/auth/drive.appdata"))
|
// .requestScopes(new Scope("https://www.googleapis.com/auth/drive.appdata"))
|
||||||
.build();
|
.build();
|
||||||
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
|
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
|
||||||
@ -930,10 +930,11 @@ public class MainActivity extends UnityPlayerActivity
|
|||||||
|
|
||||||
public void authGetStoragePass(String funid, String account) {
|
public void authGetStoragePass(String funid, String account) {
|
||||||
Log.i(TAG, "authGetStoragePass with: " + account);
|
Log.i(TAG, "authGetStoragePass with: " + account);
|
||||||
Account[] accounts = accountManager.getAccountsByType(accountType);
|
// Account[] accounts = accountManager.getAccountsByType(accountType);
|
||||||
for (Account act : accounts) {
|
// for (Account act : accounts) {
|
||||||
Log.i(TAG, "authGetStoragePass account: " + act.name + " | " + act.type );
|
// Log.i(TAG, "authGetStoragePass account: " + act.name + " | " + act.type );
|
||||||
}
|
// }
|
||||||
|
|
||||||
// runOnUiThread(() -> {
|
// runOnUiThread(() -> {
|
||||||
// Intent intent = new Intent(this, BiometricActivity.class);
|
// Intent intent = new Intent(this, BiometricActivity.class);
|
||||||
// intent.putExtra("action", "decrypt");
|
// intent.putExtra("action", "decrypt");
|
||||||
|
@ -18,6 +18,7 @@ import org.json.JSONObject;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@ -176,7 +177,7 @@ public final class JConfiguration {
|
|||||||
Buffer configData = new Buffer();
|
Buffer configData = new Buffer();
|
||||||
try {
|
try {
|
||||||
configSource.readAll(configData);
|
configSource.readAll(configData);
|
||||||
mConfigJson = new JSONObject(configData.readString(Charset.forName("UTF-8")));
|
mConfigJson = new JSONObject(configData.readString(StandardCharsets.UTF_8));
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new InvalidConfigurationException(
|
throw new InvalidConfigurationException(
|
||||||
"Failed to read configuration: " + ex.getMessage());
|
"Failed to read configuration: " + ex.getMessage());
|
||||||
|
@ -5,9 +5,12 @@ import android.content.Context;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.cege.games.release.MainActivity;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -17,11 +20,12 @@ import java.util.UUID;
|
|||||||
|
|
||||||
public class IDUtils {
|
public class IDUtils {
|
||||||
private static String sID = null;
|
private static String sID = null;
|
||||||
private static final String INSTALLATION = "INSTALLATION";
|
private static final String WALLET_STATS = "wallets";
|
||||||
|
|
||||||
public synchronized static String id(Context context) {
|
public synchronized static String id(Context context) {
|
||||||
if (sID == null) {
|
if (sID == null) {
|
||||||
File installation = new File(context.getFilesDir(), INSTALLATION);
|
File installation = new File(context.getFilesDir(), WALLET_STATS);
|
||||||
|
Log.i("IDUtils", installation.getAbsolutePath());
|
||||||
try {
|
try {
|
||||||
if (!installation.exists())
|
if (!installation.exists())
|
||||||
writeInstallationFile(installation);
|
writeInstallationFile(installation);
|
||||||
@ -48,6 +52,7 @@ public class IDUtils {
|
|||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取Device Id
|
* 获取Device Id
|
||||||
*
|
*
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"client_id": "53206975661-asnf3qe4bg29p8h981pgf099osvrjbme.apps.googleusercontent.com",
|
"client_id": "53206975661-asnf3qe4bg29p8h981pgf099osvrjbme.apps.googleusercontent.com",
|
||||||
"redirect_uri": "com.googleusercontent.apps.53206975661-asnf3qe4bg29p8h981pgf099osvrjbme:/oauth2redirect",
|
"redirect_uri": "com.googleusercontent.apps.53206975661-asnf3qe4bg29p8h981pgf099osvrjbme:/oauth2redirect",
|
||||||
"end_session_redirect_uri": "com.googleusercontent.apps.53206975661-asnf3qe4bg29p8h981pgf099osvrjbme:/oauth2redirect",
|
"end_session_redirect_uri": "com.googleusercontent.apps.53206975661-asnf3qe4bg29p8h981pgf099osvrjbme:/oauth2redirect",
|
||||||
"authorization_scope": "openid email profile",
|
"authorization_scope": "openid email profile https://www.googleapis.com/auth/drive.appdata",
|
||||||
"discovery_uri": "https://accounts.google.com/.well-known/openid-configuration",
|
"discovery_uri": "https://accounts.google.com/.well-known/openid-configuration",
|
||||||
"authorization_endpoint_uri": "",
|
"authorization_endpoint_uri": "",
|
||||||
"token_endpoint_uri": "",
|
"token_endpoint_uri": "",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user