Skip to content

Commit

Permalink
🖕 add umeng
Browse files Browse the repository at this point in the history
umeng 我x你x,太tm坑爹了
  • Loading branch information
idealclover committed Oct 31, 2020
1 parent e977956 commit 78dbe22
Show file tree
Hide file tree
Showing 10 changed files with 340 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/barcode_scan-2.0.2/","dependencies":[]},{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"image_picker","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+12/","dependencies":[]},{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.21/","dependencies":[]},{"name":"shared_preferences","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+2/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.5/","dependencies":[]},{"name":"webview_flutter","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.3/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/barcode_scan-2.0.2/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11/","dependencies":[]},{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"image_picker","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+12/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.21/","dependencies":[]},{"name":"shared_preferences","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+2/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.5/","dependencies":[]},{"name":"webview_flutter","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.3/","dependencies":[]}],"macos":[{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+4/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+8/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+2/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+1/","dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+1/","dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+1/","dependencies":[]}],"web":[{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.4+1/","dependencies":[]}]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-10-31 23:52:44.948294","version":"1.22.0"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"barcode_scan","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/barcode_scan-2.0.2/","dependencies":[]},{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"image_picker","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+12/","dependencies":[]},{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.21/","dependencies":[]},{"name":"shared_preferences","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+2/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.5/","dependencies":[]},{"name":"webview_flutter","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.3/","dependencies":[]}],"android":[{"name":"barcode_scan","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/barcode_scan-2.0.2/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11/","dependencies":[]},{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"image_picker","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+12/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.21/","dependencies":[]},{"name":"shared_preferences","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+2/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.5/","dependencies":[]},{"name":"webview_flutter","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-1.0.3/","dependencies":[]}],"macos":[{"name":"package_info","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+4/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10/","dependencies":[]},{"name":"sqflite","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+8/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2/","dependencies":[]},{"name":"shared_preferences_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+2/","dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+1/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+1/","dependencies":[]},{"name":"shared_preferences_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+1/","dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+1/","dependencies":[]}],"web":[{"name":"fluttertoast","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/idealclover/Development/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.4+1/","dependencies":[]}]},"dependencyGraph":[{"name":"barcode_scan","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"package_info","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_linux","url_launcher_macos","url_launcher_windows"]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"webview_flutter","dependencies":[]}],"date_created":"2020-11-01 02:32:26.569932","version":"1.22.0"}
17 changes: 10 additions & 7 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ if (flutterVersionName == null) {
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystorePropertiesFile = rootProject.file("key.properties")
Expand All @@ -32,10 +31,6 @@ keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
compileSdkVersion 29

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}
Expand All @@ -60,6 +55,7 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Expand All @@ -69,5 +65,12 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
implementation "com.umeng.umsdk:common:9.1.0"
implementation "com.umeng.umsdk:asms:1.1.3"
implementation "com.umeng.umsdk:crash:0.0.4"
// api fileTree(include: ['*.jar'], dir: '../libs')
implementation "com.umeng.umsdk:oaid_lenovo:1.0.0" // (可选)
implementation "com.umeng.umsdk:oaid_mi:1.0.0" // (可选)
implementation "com.umeng.umsdk:oaid_oppo:1.0.4" // (可选)
implementation "com.umeng.umsdk:oaid_vivo:1.0.0.1" // (可选)
}
16 changes: 16 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-keep class com.umeng.** {*;}

-keep class com.uc.** {*;}

-keepclassmembers class * {
public <init> (org.json.JSONObject);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class com.zui.** {*;}
-keep class com.miui.** {*;}
-keep class com.heytap.** {*;}
-keep class a.** {*;}
-keep class com.vivo.** {*;}
4 changes: 3 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application
android:name="io.flutter.app.FlutterApplication"
android:name=".MainApplication"
android:label="南哪课表"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.lilystudio.wheretosleepinnju;

import android.os.Bundle;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant;
import com.umeng.analytics.MobclickAgent;

public class MainActivity extends FlutterActivity {
// @Override
// public void configureFlutterEngine(FlutterEngine flutterEngine) {
// GeneratedPluginRegistrant.registerWith(flutterEngine);
// }
//
// @Override
// protected void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
// com.lilystudio.wheretosleepinnju.UmengSdkPlugin.setContext(this);
// android.util.Log.i("UMLog", "onCreate@MainActivity");
// }
//
// @Override
// protected void onPause() {
// super.onPause();
// MobclickAgent.onPause(this);
// android.util.Log.i("UMLog", "onPause@MainActivity");
// }
//
// @Override
// protected void onResume() {
// super.onResume();
// MobclickAgent.onResume(this);
// android.util.Log.i("UMLog", "onResume@MainActivity");
// }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.lilystudio.wheretosleepinnju;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.flutter.app.FlutterApplication;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.analytics.MobclickAgent;

public class MainApplication extends FlutterApplication {
@Override
public void onCreate() {
super.onCreate();
UMConfigure.init(this, "5f8ef217fac90f1c19a7b0f3", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, "");
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
android.util.Log.i("UMLog", "UMConfigure.init@MainApplication");
// UMConfigure.setLogEnabled(true);
}
}
Loading

0 comments on commit 78dbe22

Please sign in to comment.