优化storeAppInfo方法,首次打开不获取android_id
This commit is contained in:
parent
746caa61fb
commit
39e50ca2ce
|
@ -25,7 +25,9 @@ import { Platform } from "react-native";
|
|||
export async function storeAppInfo() {
|
||||
const Application = require("expo-application");
|
||||
async function getDid() {
|
||||
const notFirstTimeOpenApp = await get("not_first_time_open_app");
|
||||
if (Platform.OS === "android") {
|
||||
if (!notFirstTimeOpenApp) return "";
|
||||
return Application.getAndroidId();
|
||||
} else {
|
||||
return await Application.getIosIdForVendorAsync();
|
||||
|
@ -33,6 +35,7 @@ export async function storeAppInfo() {
|
|||
}
|
||||
|
||||
const b_did = await getDid();
|
||||
console.log(b_did);
|
||||
const b_ver = Application.nativeApplicationVersion;
|
||||
const b_dt = Device.osName === "Android" ? 0 : 1;
|
||||
const b_ch = "production";
|
||||
|
|
Loading…
Reference in New Issue