增加bugly插件,收集程序bug日志
This commit is contained in:
parent
39220fc37f
commit
0b20ed0927
@ -58,6 +58,12 @@ android {
|
|||||||
keyPassword 'leyuan'
|
keyPassword 'leyuan'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
// 如打包出现Failed to transform libs.jar to match attributes
|
||||||
|
checkReleaseBuilds false
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.leyuan.app"
|
applicationId "com.leyuan.app"
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- audioplayers_darwin (0.0.1):
|
- audioplayers_darwin (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- Bugly (2.5.93)
|
||||||
- camera_avfoundation (0.0.1):
|
- camera_avfoundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- connectivity (0.0.1):
|
- connectivity (0.0.1):
|
||||||
@ -51,6 +52,9 @@ PODS:
|
|||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- flutter_apns_only (0.0.1):
|
- flutter_apns_only (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- flutter_bugly (0.0.1):
|
||||||
|
- Bugly
|
||||||
|
- Flutter
|
||||||
- flutter_image_compress (1.0.0):
|
- flutter_image_compress (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- Mantle
|
- Mantle
|
||||||
@ -169,6 +173,7 @@ DEPENDENCIES:
|
|||||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_apns_only (from `.symlinks/plugins/flutter_apns_only/ios`)
|
- flutter_apns_only (from `.symlinks/plugins/flutter_apns_only/ios`)
|
||||||
|
- flutter_bugly (from `.symlinks/plugins/flutter_bugly/ios`)
|
||||||
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
|
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
|
||||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||||
- flutter_plugin_record_plus (from `.symlinks/plugins/flutter_plugin_record_plus/ios`)
|
- flutter_plugin_record_plus (from `.symlinks/plugins/flutter_plugin_record_plus/ios`)
|
||||||
@ -199,6 +204,7 @@ DEPENDENCIES:
|
|||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
- Bugly
|
||||||
- DKImagePickerController
|
- DKImagePickerController
|
||||||
- DKPhotoGallery
|
- DKPhotoGallery
|
||||||
- FMDB
|
- FMDB
|
||||||
@ -235,6 +241,8 @@ EXTERNAL SOURCES:
|
|||||||
:path: Flutter
|
:path: Flutter
|
||||||
flutter_apns_only:
|
flutter_apns_only:
|
||||||
:path: ".symlinks/plugins/flutter_apns_only/ios"
|
:path: ".symlinks/plugins/flutter_apns_only/ios"
|
||||||
|
flutter_bugly:
|
||||||
|
:path: ".symlinks/plugins/flutter_bugly/ios"
|
||||||
flutter_image_compress:
|
flutter_image_compress:
|
||||||
:path: ".symlinks/plugins/flutter_image_compress/ios"
|
:path: ".symlinks/plugins/flutter_image_compress/ios"
|
||||||
flutter_native_splash:
|
flutter_native_splash:
|
||||||
@ -292,6 +300,7 @@ EXTERNAL SOURCES:
|
|||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
audioplayers_darwin: 877d9a4d06331c5c374595e46e16453ac7eafa40
|
||||||
|
Bugly: b8715e6ec4004b7f7fbffab0643ba80545aee3da
|
||||||
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
|
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
|
||||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
|
||||||
@ -303,6 +312,7 @@ SPEC CHECKSUMS:
|
|||||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
flutter_apns_only: 3d91c0ca9dbef4439874858590909a19f8ed06a4
|
flutter_apns_only: 3d91c0ca9dbef4439874858590909a19f8ed06a4
|
||||||
|
flutter_bugly: c9800f4d5bc5bdc27ffdde3417a26ba44266e0c3
|
||||||
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
|
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
|
||||||
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
|
||||||
flutter_plugin_record_plus: 79b8e13ee7ed9a94f6c067018653599528cee1fc
|
flutter_plugin_record_plus: 79b8e13ee7ed9a94f6c067018653599528cee1fc
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import 'package:circle_app/util/device.dart';
|
|||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@ -36,14 +37,23 @@ final TUIChatSeparateViewModel chatSeparateViewModel =
|
|||||||
TUIChatSeparateViewModel();
|
TUIChatSeparateViewModel();
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
||||||
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
|
||||||
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
|
||||||
runApp(const MyApp());
|
FlutterBugly.postCatchedException(() {
|
||||||
|
// 如果需要 ensureInitialized,请在这里运行。
|
||||||
|
// WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
runApp(MyApp());
|
||||||
|
FlutterBugly.init(
|
||||||
|
androidAppId: "8509314e11",
|
||||||
|
iOSAppId: "51e7b4e472",
|
||||||
|
);
|
||||||
|
});
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
getLostData();
|
getLostData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getLostData() async {
|
Future<void> getLostData() async {
|
||||||
final ImagePicker picker = ImagePicker();
|
final ImagePicker picker = ImagePicker();
|
||||||
final LostDataResponse response = await picker.retrieveLostData();
|
final LostDataResponse response = await picker.retrieveLostData();
|
||||||
@ -57,14 +67,15 @@ Future<void> getLostData() async {
|
|||||||
_handleError(response.exception);
|
_handleError(response.exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleLostFiles(List<XFile> file) {}
|
void _handleLostFiles(List<XFile> file) {}
|
||||||
Future<void> _handleError(dynamic error) async {
|
Future<void> _handleError(dynamic error) async {
|
||||||
// 处理错误,例如记录错误或显示错误消息
|
// 处理错误,例如记录错误或显示错误消息
|
||||||
print('Error occurred: $error');
|
print('Error occurred: $error');
|
||||||
// 在界面上显示错误消息
|
// 在界面上显示错误消息
|
||||||
showToast('内存异常,请重新上传');
|
showToast('内存异常,请重新上传');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int IM_SDK_APP_ID = 1400799631;
|
int IM_SDK_APP_ID = 1400799631;
|
||||||
|
|
||||||
String IOS_APP_ID = "";
|
String IOS_APP_ID = "";
|
||||||
@ -81,8 +92,12 @@ loginIM(String userId, String sig) async {
|
|||||||
.v2TIMManager
|
.v2TIMManager
|
||||||
.getMessageManager()
|
.getMessageManager()
|
||||||
.setC2CReceiveMessageOpt(
|
.setC2CReceiveMessageOpt(
|
||||||
userIDList: ['qpqz_dev_10_10000000000','qpqz_prod_10_10000000000'], // 需要设置的用户id列表
|
userIDList: [
|
||||||
opt: ReceiveMsgOptEnum.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE); // 用户消息接收选项属性
|
'qpqz_dev_10_10000000000',
|
||||||
|
'qpqz_prod_10_10000000000'
|
||||||
|
], // 需要设置的用户id列表
|
||||||
|
opt: ReceiveMsgOptEnum
|
||||||
|
.V2TIM_RECEIVE_NOT_NOTIFY_MESSAGE); // 用户消息接收选项属性
|
||||||
if (setC2CReceiveMessageOptRes.code == 0) {
|
if (setC2CReceiveMessageOptRes.code == 0) {
|
||||||
//设置成功
|
//设置成功
|
||||||
}
|
}
|
||||||
@ -98,12 +113,12 @@ logoutIM() async {
|
|||||||
//获取设备Token,获取成功后开启离线推送
|
//获取设备Token,获取成功后开启离线推送
|
||||||
void uploadBuzIDAndToken() async {
|
void uploadBuzIDAndToken() async {
|
||||||
bool isAgreemement = await getAgreemement();
|
bool isAgreemement = await getAgreemement();
|
||||||
if(!isAgreemement){
|
if (!isAgreemement) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (Platform.isAndroid) {
|
// if (Platform.isAndroid) {
|
||||||
initWxApi();
|
initWxApi();
|
||||||
// }
|
// }
|
||||||
await ChannelPush.init((msg) {});
|
await ChannelPush.init((msg) {});
|
||||||
|
|
||||||
@ -305,11 +320,10 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
initIM();
|
initIM();
|
||||||
WidgetsBinding.instance.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
|
|
||||||
|
|
||||||
// uploadBuzIDAndToken();
|
// uploadBuzIDAndToken();
|
||||||
loadBgImage();
|
loadBgImage();
|
||||||
super.initState();
|
super.initState();
|
||||||
addPayNotifi();
|
addPayNotifi();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -354,7 +368,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
@override
|
@override
|
||||||
Future<V2TimCallback> setOfflinePushStatus(
|
Future<V2TimCallback> setOfflinePushStatus(
|
||||||
{required AppStatus status, int? totalCount}) {
|
{required AppStatus status, int? totalCount}) {
|
||||||
|
|
||||||
if (status == AppStatus.foreground) {
|
if (status == AppStatus.foreground) {
|
||||||
// 当应用status为前台时,上报doForeground()
|
// 当应用status为前台时,上报doForeground()
|
||||||
return TencentImSDKPlugin.v2TIMManager
|
return TencentImSDKPlugin.v2TIMManager
|
||||||
@ -458,7 +471,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
await precacheImage(precacheImages(_guideList.last), context);
|
await precacheImage(precacheImages(_guideList.last), context);
|
||||||
await precacheImage(AssetImage(getCircleImage('circle_bg')), context,
|
await precacheImage(AssetImage(getCircleImage('circle_bg')), context,
|
||||||
size: Size(Get.width, Get.height));
|
size: Size(Get.width, Get.height));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
precacheImages(String image) {
|
precacheImages(String image) {
|
||||||
@ -474,31 +486,29 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
minTextAdapt: true,
|
minTextAdapt: true,
|
||||||
splitScreenMode: true,
|
splitScreenMode: true,
|
||||||
builder: (context, child) {
|
builder: (context, child) {
|
||||||
return
|
return RefreshConfiguration(
|
||||||
RefreshConfiguration(
|
footerBuilder: () => CustomLoadFooter(),
|
||||||
footerBuilder: () => CustomLoadFooter(),
|
child: OKToast(
|
||||||
child: OKToast(
|
|
||||||
// 2-A: wrap your app with OKToast
|
// 2-A: wrap your app with OKToast
|
||||||
textStyle: const TextStyle(fontSize: 19.0, color: Colors.white),
|
textStyle:
|
||||||
backgroundColor: Colors.grey,
|
const TextStyle(fontSize: 19.0, color: Colors.white),
|
||||||
animationCurve: Curves.easeIn,
|
backgroundColor: Colors.grey,
|
||||||
// animationBuilder: const Miui10AnimBuilder(),
|
animationCurve: Curves.easeIn,
|
||||||
animationDuration: const Duration(milliseconds: 200),
|
// animationBuilder: const Miui10AnimBuilder(),
|
||||||
duration: const Duration(seconds: 2),
|
animationDuration: const Duration(milliseconds: 200),
|
||||||
child: GetMaterialApp(
|
duration: const Duration(seconds: 2),
|
||||||
title: '微乐园',
|
child: GetMaterialApp(
|
||||||
initialBinding: SplashBinding(),
|
title: '微乐园',
|
||||||
getPages: AppPages.routes,
|
initialBinding: SplashBinding(),
|
||||||
home: SplashPage(),
|
getPages: AppPages.routes,
|
||||||
builder: FlutterSmartDialog.init(),
|
home: SplashPage(),
|
||||||
debugShowCheckedModeBanner: false,
|
builder: FlutterSmartDialog.init(),
|
||||||
)))
|
debugShowCheckedModeBanner: false,
|
||||||
;
|
)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void addPayNotifi() {
|
void addPayNotifi() {
|
||||||
IOSPayment.instance.startSubscription();
|
IOSPayment.instance.startSubscription();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -574,6 +574,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.0"
|
version: "0.7.0"
|
||||||
|
flutter_bugly:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_bugly
|
||||||
|
sha256: a2d13cb35bedb907cb020ea4862264dcc9044675a49a8313bb3ab2e61af79c77
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.4.4"
|
||||||
flutter_cache_manager:
|
flutter_cache_manager:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -106,8 +106,8 @@ dependencies:
|
|||||||
qr_flutter: ^4.0.0
|
qr_flutter: ^4.0.0
|
||||||
#本地目录
|
#本地目录
|
||||||
path_provider: ^2.1.0
|
path_provider: ^2.1.0
|
||||||
#第三方分享平台
|
#腾讯bugly
|
||||||
# sharesdk_plugin: 1.3.6
|
flutter_bugly: ^0.4.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user