Skip to content

Commit

Permalink
Release 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Apr 28, 2023
1 parent 05d975f commit f247fbf
Show file tree
Hide file tree
Showing 30 changed files with 354 additions and 188 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
Binary file modified Sensorsdata-UniPlugin-App/android/SensorsdataUniPlugin.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>UniSensorsAnalyticsModule.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>UniSensorsAnalyticsModule.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Info.plist</key>
<data>
SMPoo8X4B6BWpf2ABXxho59cnzE=
8rPms2THPXe29JHWqNt9fdR1jlo=
</data>
<key>SensorsAnalyticsSDK.bundle/zh-Hans.lproj/Localizable.strings</key>
<dict>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<dict>
<key>Frameworks/SensorsAnalyticsSDK.framework/Info.plist</key>
<data>
SMPoo8X4B6BWpf2ABXxho59cnzE=
8rPms2THPXe29JHWqNt9fdR1jlo=
</data>
<key>Frameworks/SensorsAnalyticsSDK.framework/SensorsAnalyticsSDK</key>
<data>
xAuhmZhf5nJx6GfhXTNO31Y8Lxc=
8Hh6CfiGi0NEXtwSwxvVZdZ//xs=
</data>
<key>Frameworks/SensorsAnalyticsSDK.framework/SensorsAnalyticsSDK.bundle/zh-Hans.lproj/Localizable.strings</key>
<dict>
Expand All @@ -23,15 +23,15 @@
</dict>
<key>Frameworks/SensorsAnalyticsSDK.framework/_CodeSignature/CodeResources</key>
<data>
1DkxgpB/cytDMpmA7qdmHDMNvus=
85q58b4BLq9c8NEM/4XlK2i9bag=
</data>
<key>Frameworks/SensorsFocus.framework/Info.plist</key>
<data>
Kp5FsZ2gXOsxE7dOM3fUFG22e1U=
</data>
<key>Frameworks/SensorsFocus.framework/SensorsFocus</key>
<data>
wdg5L6y0kPYO6hzm2ntjtPcKjoU=
yDAasR2S5z5P2eEftYPqJatKgjs=
</data>
<key>Frameworks/SensorsFocus.framework/SensorsFocus.bundle/close.png</key>
<data>
Expand All @@ -41,26 +41,10 @@
<data>
LFhTF6A3YgKRMUwPTV7E/xMIaIQ=
</data>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeDirectory</key>
<data>
vQ3jFeXJIIWFeuLB1dLSlb4jUxI=
</data>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeRequirements</key>
<data>
OnX22wWFKRSOFN1+obRynMCeyXM=
</data>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeRequirements-1</key>
<data>
LqtAk9jykKWS/zXohd9bywHvJPs=
</data>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeResources</key>
<data>
AXrm5xsMtBOQNwRQq6NwLXQi66Y=
</data>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeSignature</key>
<data>
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
</data>
<key>Info.plist</key>
<data>
mz7sAG147WQF8HBcdCpiBFE7XKA=
Expand All @@ -76,22 +60,22 @@
<dict>
<key>hash</key>
<data>
SMPoo8X4B6BWpf2ABXxho59cnzE=
8rPms2THPXe29JHWqNt9fdR1jlo=
</data>
<key>hash2</key>
<data>
7P4xfn6q4HJP/ZMtEhKlESAmWZhCsyreDmsAZZfvENQ=
TlS6ywvgAaXJb8yAEO/JldxxeUpa//rS8dyV3R3Mf6Q=
</data>
</dict>
<key>Frameworks/SensorsAnalyticsSDK.framework/SensorsAnalyticsSDK</key>
<dict>
<key>hash</key>
<data>
xAuhmZhf5nJx6GfhXTNO31Y8Lxc=
8Hh6CfiGi0NEXtwSwxvVZdZ//xs=
</data>
<key>hash2</key>
<data>
CEfazllKmfvZXzHyPJOVmpLvZC/2CWVqSl4L6tYU42g=
uYDdXbtfnhgOiRn5bWKfNQW5/dqhNQ/9JQRMxhFrWF4=
</data>
</dict>
<key>Frameworks/SensorsAnalyticsSDK.framework/SensorsAnalyticsSDK.bundle/zh-Hans.lproj/Localizable.strings</key>
Expand All @@ -111,11 +95,11 @@
<dict>
<key>hash</key>
<data>
1DkxgpB/cytDMpmA7qdmHDMNvus=
85q58b4BLq9c8NEM/4XlK2i9bag=
</data>
<key>hash2</key>
<data>
wgYnKfMafkggTbfl+bY/6Wc5A9R7CPBT7LlzlRpl+qQ=
GxXHqpVr7mplDYCRNjpmHjLOajPn0BgeWIpl6kiakGk=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/Info.plist</key>
Expand All @@ -133,11 +117,11 @@
<dict>
<key>hash</key>
<data>
wdg5L6y0kPYO6hzm2ntjtPcKjoU=
yDAasR2S5z5P2eEftYPqJatKgjs=
</data>
<key>hash2</key>
<data>
xZgVFE4KxjqSfFWzs4zGMIjeYYsxAp0YUZJxiOkabWU=
x7z2jTrhqRMpIqszB526Iwc6+7vmjwulIuD2rZZcfYw=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/SensorsFocus.bundle/close.png</key>
Expand All @@ -162,39 +146,6 @@
iwZ5I6TucQkxqLBCvM7LRCbuXozncNZuLrTrXZpoPAs=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeDirectory</key>
<dict>
<key>hash</key>
<data>
vQ3jFeXJIIWFeuLB1dLSlb4jUxI=
</data>
<key>hash2</key>
<data>
6fj2uAHcrStLb6C4Oe13gIBSL2+nt0QOOqxT94wUGm0=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeRequirements</key>
<dict>
<key>hash</key>
<data>
OnX22wWFKRSOFN1+obRynMCeyXM=
</data>
<key>hash2</key>
<data>
mHkgkE6rZQ51eIwFSqCwUk5qgL/HGqMt+NI3phdD+YY=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeRequirements-1</key>
<dict>
<key>hash</key>
<data>
LqtAk9jykKWS/zXohd9bywHvJPs=
</data>
<key>hash2</key>
<data>
ikQD2mIC1KE4dJj+jA3EMmKtzQgLg4NYjONd3puQbPU=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeResources</key>
<dict>
<key>hash</key>
Expand All @@ -206,17 +157,6 @@
nD3PcDz2+2BpjjUM6kGSQ4JPXvGkDT5XcWTCpq31fz4=
</data>
</dict>
<key>Frameworks/SensorsFocus.framework/_CodeSignature/CodeSignature</key>
<dict>
<key>hash</key>
<data>
2jmj7l5rSw0yVb/vlWAYkK/YBwk=
</data>
<key>hash2</key>
<data>
47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
</data>
</dict>
<key>Modules/module.modulemap</key>
<dict>
<key>hash</key>
Expand Down
4 changes: 2 additions & 2 deletions Sensorsdata-UniPlugin-App/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Sensorsdata-UniPlugin-App",
"id": "Sensorsdata-UniPlugin-App",
"version": "0.1.2",
"version": "0.1.3",
"description": "插件描述信息",
"_dp_type": "nativeplugin",
"_dp_nativeplugin": {
Expand All @@ -21,7 +21,7 @@
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>"
],
"dependencies": [
"com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.6",
"com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.7",
"com.sensorsdata.analytics.android:SensorsFocusSDK:0.6.3"
],
"parameters": {
Expand Down
2 changes: 1 addition & 1 deletion android/SensorsdataUniPlugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {

compileOnly fileTree(dir: 'libs', include: ['uniapp-v8-release.aar'])
// compileOnly fileTree(dir: 'libs', include: ['SensorsFocusSDK.aar'])
compileOnly 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.6'
compileOnly 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.7'
compileOnly 'com.alibaba:fastjson:1.1.46.android'
//SF Android SDK 点击回调优化发版后需要修改为该版本
compileOnly 'com.sensorsdata.analytics.android:SensorsFocusSDK:0.6.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import com.sensorsdata.analytics.android.sdk.SAConfigOptions;
import com.sensorsdata.analytics.android.sdk.SensorsDataAPI;
import com.sensorsdata.uniapp.property.PluginVersionInterceptor;
import com.sensorsdata.uniapp.property.UniSAGlobalPropertyPlugin;
import com.sensorsdata.uniapp.property.UniPropertyManager;
import com.sensorsdata.uniapp.util.JSONUtils;
import com.sensorsdata.uniapp.util.VersionUtils;

public class UniSensorsAnalyticsHelper {

Expand All @@ -23,6 +25,10 @@ public static void initSDK(Context context, JSONObject jsonConfig) {
String serverUrl = jsonConfig.getString("server_url");
configOptions = new SAConfigOptions(serverUrl);
configOptions.enableLog(JSONUtils.optObject(jsonConfig, "show_log", Boolean.class, false));
JSONObject globalProperties = jsonConfig.getJSONObject("global_properties");
if (globalProperties != null && !globalProperties.isEmpty() && VersionUtils.checkSAVersion("6.4.3")) {
configOptions.registerPropertyPlugin(new UniSAGlobalPropertyPlugin(JSONUtils.convertToJSONObject(globalProperties)));
}
JSONObject appConfig = jsonConfig.getJSONObject("app");
if (appConfig != null) {
configOptions.setRemoteConfigUrl(appConfig.getString("remote_config_url"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public class UniSensorsAnalyticsModule extends UniDestroyableModule {

public static final String VERSION = "0.1.2";
public static final String VERSION = "0.1.3";

private static final String MODULE_NAME = "UniSensorsAnalyticsModule";
public static final String LOG_TAG = "SA.UniModule";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.sensorsdata.uniapp.property;

import com.sensorsdata.analytics.android.sdk.data.persistent.PersistentLoader;
import com.sensorsdata.analytics.android.sdk.plugin.property.SAPropertyPlugin;
import com.sensorsdata.analytics.android.sdk.plugin.property.SAPropertyPluginPriority;
import com.sensorsdata.analytics.android.sdk.plugin.property.beans.SAPropertiesFetcher;
import com.sensorsdata.analytics.android.sdk.plugin.property.beans.SAPropertyFilter;
import com.sensorsdata.uniapp.util.JSONUtils;

import org.json.JSONObject;

public class UniSAGlobalPropertyPlugin extends SAPropertyPlugin {
private JSONObject mProperties;

public UniSAGlobalPropertyPlugin(JSONObject globalProperties) {
mProperties = globalProperties;
}

@Override
public boolean isMatchedWithFilter(SAPropertyFilter filter) {
return filter.getType().isTrack();
}

@Override
public void properties(SAPropertiesFetcher fetcher) {
if (mProperties == null || mProperties.length() == 0) {
return;
}
JSONObject properties = PersistentLoader.getInstance().getSuperPropertiesPst().get();
try {
JSONUtils.mergeSuperJSONObject(mProperties, properties);
PersistentLoader.getInstance().getSuperPropertiesPst().commit(properties);
mProperties = null;
} catch (Exception ignored) {
}
}

@Override
public SAPropertyPluginPriority priority() {
return SAPropertyPluginPriority.LOW;
}

}
Loading

0 comments on commit f247fbf

Please sign in to comment.