「Skin」

1、增加合并id的方法;
2、修复崩溃
This commit is contained in:
donghongyu
2024-11-05 19:31:19 +08:00
parent 82dc52df7d
commit da09ca77e5
3 changed files with 13 additions and 7 deletions

View File

@@ -32,23 +32,23 @@
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"> android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity <activity
android:name=".NSDNettyActivity" android:name=".NSDNettyActivity"
android:exported="false" /> android:exported="false" />
<activity <activity
android:exported="true"
android:name=".MainActivity" android:name=".MainActivity"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
android:enabled="true" android:enabled="true"
android:exported="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:launchMode="singleTask" android:launchMode="singleTask"
android:resizeableActivity="false" android:resizeableActivity="false"
android:screenOrientation="landscape"
android:resumeWhilePausing="true" android:resumeWhilePausing="true"
android:screenOrientation="landscape"
android:stateNotNeeded="true" android:stateNotNeeded="true"
android:windowSoftInputMode="adjustPan|stateHidden" android:windowSoftInputMode="adjustPan|stateHidden">
android:theme="@style/AppTheme">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@@ -30,6 +30,8 @@ import com.mogo.v2x.event.V2XEvent;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import ly.count.android.sdk.Countly;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
private static final String TAG = "MainActivity"; private static final String TAG = "MainActivity";
@@ -321,6 +323,8 @@ public class MainActivity extends AppCompatActivity {
btnV2XFunctionTest.setVisibility(View.VISIBLE); btnV2XFunctionTest.setVisibility(View.VISIBLE);
} }
initPassportInfo(); initPassportInfo();
// 通过服务器合并更改设备 ID, 首次安装app的设备没有蘑菇sn临时用devicesID待生成蘑菇ID后修改已上传的信息
Countly.sharedInstance().deviceId().changeWithMerge(sn);
} }
@Override @Override

View File

@@ -91,8 +91,10 @@ public class MoGoApplication extends MultiDexApplication {
COUNTLY_APP_KEY, COUNTLY_APP_KEY,
COUNTLY_SERVER_URL COUNTLY_SERVER_URL
); );
// 设置设备唯一标志 // 设置设备唯一标志,后面获取了蘑菇平台的SN后将重新设置
countlyConfig.setDeviceId("202309055W83WSZ") // 通过服务器合并更改设备 ID, 首次安装app的设备没有蘑菇sn临时用devicesID待生成蘑菇ID后修改已上传的信息
// Countly.sharedInstance().deviceId().changeWithMerge(sn);
countlyConfig.setDeviceId("2502a9a72cb281b8")
// 获取您在 Countly 服务器中设置的一些配置 // 获取您在 Countly 服务器中设置的一些配置
.enableServerConfiguration() .enableServerConfiguration()
// 自动视图跟踪 // 自动视图跟踪