Author | SHA1 | Message | Date |
---|---|---|---|
|
4ba987f129 | Merge remote-tracking branch 'origin/master' | 5 years ago |
|
1404fa08fa | 推送/人工翻译 | 5 years ago |
@@ -24,4 +24,4 @@ | |||||
}, | }, | ||||
"region":"SG", | "region":"SG", | ||||
"configuration_version":"1.0" | "configuration_version":"1.0" | ||||
} | |||||
} |
@@ -56,9 +56,9 @@ android { | |||||
// manifestPlaceholders = [ | // manifestPlaceholders = [ | ||||
// AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key | // AMAP_KEY : "1fd4e93e3b4b13747da41f484c955fe2", /// 高德地图key | ||||
// ] | // ] | ||||
// ndk { | |||||
// abiFilters 'armeabi-v7a' | |||||
// } | |||||
ndk { | |||||
abiFilters 'armeabi-v7a' | |||||
} | |||||
multiDexEnabled true | multiDexEnabled true | ||||
manifestPlaceholders = [ | manifestPlaceholders = [ | ||||
JPUSH_PKGNAME : 'com.cyhd.henhoandroid', | JPUSH_PKGNAME : 'com.cyhd.henhoandroid', | ||||
@@ -2,10 +2,9 @@ | |||||
# This is a generated file; do not edit or check into version control. | # This is a generated file; do not edit or check into version control. | ||||
export "FLUTTER_ROOT=/Users/random/sdk/flutter_sdk" | export "FLUTTER_ROOT=/Users/random/sdk/flutter_sdk" | ||||
export "FLUTTER_APPLICATION_PATH=/Users/random/code/flutter/project/hibok" | export "FLUTTER_APPLICATION_PATH=/Users/random/code/flutter/project/hibok" | ||||
export "FLUTTER_TARGET=/Users/random/code/flutter/project/hibok/lib/main.dart" | |||||
export "FLUTTER_TARGET=lib/main.dart" | |||||
export "FLUTTER_BUILD_DIR=build" | export "FLUTTER_BUILD_DIR=build" | ||||
export "SYMROOT=${SOURCE_ROOT}/../build/ios" | export "SYMROOT=${SOURCE_ROOT}/../build/ios" | ||||
export "FLUTTER_FRAMEWORK_DIR=/Users/random/sdk/flutter_sdk/bin/cache/artifacts/engine/ios" | |||||
export "FLUTTER_BUILD_NAME=1.1.1" | |||||
export "FLUTTER_BUILD_NUMBER=16" | |||||
export "TRACK_WIDGET_CREATION=true" | |||||
export "FLUTTER_FRAMEWORK_DIR=/Users/random/sdk/flutter_sdk/bin/cache/artifacts/engine/ios-release" | |||||
export "FLUTTER_BUILD_NAME=1.1.2" | |||||
export "FLUTTER_BUILD_NUMBER=17" |
@@ -560,7 +560,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | ||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
@@ -575,7 +575,7 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = ""; | PROVISIONING_PROFILE_SPECIFIER = ""; | ||||
@@ -598,7 +598,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; | CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | ||||
ENABLE_BITCODE = YES; | ENABLE_BITCODE = YES; | ||||
@@ -606,7 +606,7 @@ | |||||
INFOPLIST_FILE = "Share Extension/Info.plist"; | INFOPLIST_FILE = "Share Extension/Info.plist"; | ||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0; | IPHONEOS_DEPLOYMENT_TARGET = 9.0; | ||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; | ||||
MTL_FAST_MATH = YES; | MTL_FAST_MATH = YES; | ||||
OTHER_LDFLAGS = ""; | OTHER_LDFLAGS = ""; | ||||
@@ -632,7 +632,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; | CODE_SIGN_ENTITLEMENTS = "Share Extension/Share Extension.entitlements"; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | ||||
ENABLE_BITCODE = YES; | ENABLE_BITCODE = YES; | ||||
@@ -640,7 +640,7 @@ | |||||
INFOPLIST_FILE = "Share Extension/Info.plist"; | INFOPLIST_FILE = "Share Extension/Info.plist"; | ||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0; | IPHONEOS_DEPLOYMENT_TARGET = 9.0; | ||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
MTL_FAST_MATH = YES; | MTL_FAST_MATH = YES; | ||||
OTHER_LDFLAGS = ""; | OTHER_LDFLAGS = ""; | ||||
PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok.share; | PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok.share; | ||||
@@ -664,7 +664,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = "Share Extension/Share ExtensionProfile.entitlements"; | CODE_SIGN_ENTITLEMENTS = "Share Extension/Share ExtensionProfile.entitlements"; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = NO; | ||||
ENABLE_BITCODE = YES; | ENABLE_BITCODE = YES; | ||||
@@ -672,7 +672,7 @@ | |||||
INFOPLIST_FILE = "Share Extension/Info.plist"; | INFOPLIST_FILE = "Share Extension/Info.plist"; | ||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0; | IPHONEOS_DEPLOYMENT_TARGET = 9.0; | ||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
MTL_FAST_MATH = YES; | MTL_FAST_MATH = YES; | ||||
OTHER_LDFLAGS = ""; | OTHER_LDFLAGS = ""; | ||||
PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok.share; | PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok.share; | ||||
@@ -802,7 +802,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | ||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
@@ -817,7 +817,7 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = ""; | PROVISIONING_PROFILE_SPECIFIER = ""; | ||||
@@ -837,7 +837,7 @@ | |||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | ||||
CODE_SIGN_IDENTITY = "Apple Development"; | CODE_SIGN_IDENTITY = "Apple Development"; | ||||
CODE_SIGN_STYLE = Automatic; | CODE_SIGN_STYLE = Automatic; | ||||
CURRENT_PROJECT_VERSION = 14; | |||||
CURRENT_PROJECT_VERSION = 15; | |||||
DEVELOPMENT_TEAM = QJ9M3998Q6; | DEVELOPMENT_TEAM = QJ9M3998Q6; | ||||
EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | EMBEDDED_CONTENT_CONTAINS_SWIFT_CODE = YES; | ||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
@@ -852,7 +852,7 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
MARKETING_VERSION = 1.1.0; | |||||
MARKETING_VERSION = 1.1.2; | |||||
PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | PRODUCT_BUNDLE_IDENTIFIER = com.chengyouhudong.hibok; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = ""; | PROVISIONING_PROFILE_SPECIFIER = ""; | ||||
@@ -122,6 +122,8 @@ | |||||
<string>UIInterfaceOrientationLandscapeLeft</string> | <string>UIInterfaceOrientationLandscapeLeft</string> | ||||
<string>UIInterfaceOrientationLandscapeRight</string> | <string>UIInterfaceOrientationLandscapeRight</string> | ||||
</array> | </array> | ||||
<key>UISupportsDocumentBrowser</key> | |||||
<true/> | |||||
<key>UIViewControllerBasedStatusBarAppearance</key> | <key>UIViewControllerBasedStatusBarAppearance</key> | ||||
<false/> | <false/> | ||||
<key>UTExportedTypeDeclarations</key> | <key>UTExportedTypeDeclarations</key> | ||||
@@ -188,8 +190,6 @@ | |||||
</array> | </array> | ||||
<key>io.flutter.embedded_views_preview</key> | <key>io.flutter.embedded_views_preview</key> | ||||
<true/> | <true/> | ||||
<key>UISupportsDocumentBrowser</key> | |||||
<true/> | |||||
<key>kTCCServiceMediaLibrary</key> | <key>kTCCServiceMediaLibrary</key> | ||||
<string>App need your agree, can visit your music</string> | <string>App need your agree, can visit your music</string> | ||||
</dict> | </dict> | ||||
@@ -1,5 +1,6 @@ | |||||
import 'package:chat/data/UserData.dart'; | import 'package:chat/data/UserData.dart'; | ||||
import 'package:chat/generated/i18n.dart'; | import 'package:chat/generated/i18n.dart'; | ||||
import 'package:chat/utils/local_notification_util.dart'; | |||||
import 'package:chat/utils/screen.dart'; | import 'package:chat/utils/screen.dart'; | ||||
import 'package:connectivity/connectivity.dart'; | import 'package:connectivity/connectivity.dart'; | ||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
@@ -37,6 +38,9 @@ class _IndexPageState extends State<IndexPage> { | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
super.initState(); | super.initState(); | ||||
print('index page--'); | |||||
LocalNotificationUtil.instance.initJPush(); | |||||
LocalNotificationUtil.instance.initLocalPush(); | |||||
fluwx.responseFromAuth.listen((data) { | fluwx.responseFromAuth.listen((data) { | ||||
if (data.errCode == 0) { | if (data.errCode == 0) { | ||||
getLoginData(data.code); | getLoginData(data.code); | ||||
@@ -151,6 +151,7 @@ class _HomeMainState extends State<HomeMain> { | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light); | ||||
super.initState(); | super.initState(); | ||||
LocalNotificationUtil.instance.initState(context); | LocalNotificationUtil.instance.initState(context); | ||||
@@ -71,8 +71,7 @@ initLocalData() async { | |||||
void main() async { | void main() async { | ||||
WidgetsFlutterBinding.ensureInitialized(); | WidgetsFlutterBinding.ensureInitialized(); | ||||
LocalNotificationUtil.instance.initJPush(); | |||||
LocalNotificationUtil.instance.initLocalPush(); | |||||
await FileCacheMgr.initPathKey(); | await FileCacheMgr.initPathKey(); | ||||
await SqlUtil.init(); | await SqlUtil.init(); | ||||
@@ -285,7 +285,8 @@ class MsgModel { | |||||
'SendTime': DateUtils() | 'SendTime': DateUtils() | ||||
.getFormartData(timeSamp: time, format: 'yyyy-MM-dd hh:mm:ss'), | .getFormartData(timeSamp: time, format: 'yyyy-MM-dd hh:mm:ss'), | ||||
'Content': base64Encode(utf8.encode(desc)), | 'Content': base64Encode(utf8.encode(desc)), | ||||
'UserId': from | |||||
'UserId': from, | |||||
'ChatType':msgType | |||||
}; | }; | ||||
} | } | ||||
} | } |
@@ -44,9 +44,9 @@ class HttpUtil { | |||||
//static const String BaseUrl = 'http://192.168.0.223:7001/'; | //static const String BaseUrl = 'http://192.168.0.223:7001/'; | ||||
//static const String BaseUrl = 'http://192.168.0.207:9080/'; | //static const String BaseUrl = 'http://192.168.0.207:9080/'; | ||||
static const String BaseUrl = 'http://120.79.107.63:9080/'; | |||||
// static const String BaseUrl = 'http://120.79.107.63:9080/'; | |||||
//static const String BaseUrl = 'http://192.168.0.177:9016/'; | //static const String BaseUrl = 'http://192.168.0.177:9016/'; | ||||
//static const String BaseUrl = 'https://datasm.chengyouhd.com/'; | |||||
static const String BaseUrl = 'https://datasm.chengyouhd.com/'; | |||||
static HttpUtil _getInstance() { | static HttpUtil _getInstance() { | ||||
if (_instance == null) { | if (_instance == null) { | ||||
@@ -36,7 +36,7 @@ class LocalNotificationUtil { | |||||
/// date+@+节目id | /// date+@+节目id | ||||
static const String PAYLOAD_OTHER = 'other'; | static const String PAYLOAD_OTHER = 'other'; | ||||
JPush jpush = new JPush(); | |||||
/// 其他 | /// 其他 | ||||
LocalNotificationUtil._internal() { | LocalNotificationUtil._internal() { | ||||
@@ -58,7 +58,7 @@ class LocalNotificationUtil { | |||||
BehaviorSubject<String> selectNotificationSubject = BehaviorSubject<String>(); | BehaviorSubject<String> selectNotificationSubject = BehaviorSubject<String>(); | ||||
void initJPush() { | void initJPush() { | ||||
JPush jpush = new JPush(); | |||||
///ios一定要加这句 | ///ios一定要加这句 | ||||
jpush.applyPushAuthority( | jpush.applyPushAuthority( | ||||
@@ -117,7 +117,7 @@ class LocalNotificationUtil { | |||||
jpush.setup( | jpush.setup( | ||||
appKey: "13dd603952a6632d1dd3ac54", | appKey: "13dd603952a6632d1dd3ac54", | ||||
channel: "theChannel", | channel: "theChannel", | ||||
production: false, | |||||
production: true, | |||||
debug: true, // 设置是否打印 debug 日志 | debug: true, // 设置是否打印 debug 日志 | ||||
); | ); | ||||
jpush.getRegistrationID().then((rid) { | jpush.getRegistrationID().then((rid) { | ||||
@@ -126,24 +126,27 @@ class LocalNotificationUtil { | |||||
} | } | ||||
void setAlias() { | void setAlias() { | ||||
JPush jpush = new JPush(); | |||||
print('flutter jpush setAlias ${UserData().basicInfo.userId.toString()}'); | print('flutter jpush setAlias ${UserData().basicInfo.userId.toString()}'); | ||||
jpush.setAlias(UserData().basicInfo.userId.toString()).then((map) {}); | |||||
jpush.addTags( | |||||
["yueliao", 'yueliao_' + UserData().language.toString()], | |||||
).then((map) {}); | |||||
try{ | |||||
jpush.setAlias(UserData().basicInfo.userId.toString()).then((map) {}); | |||||
jpush.addTags( | |||||
["yueliao", 'yueliao_' + UserData().language.toString()], | |||||
).then((map) {}); | |||||
if (Platform.isIOS) { | |||||
jpush.getLaunchAppNotification().then((map) { | |||||
print('getLaunchAppNotification $map'); | |||||
Map jExtra = map['extras']; | |||||
String payload = getPayload(jExtra); | |||||
print('onOpenNotification payload:$payload'); | |||||
goPage(payload); | |||||
FlutterAppBadger.removeBadge(); | |||||
}).catchError((error) { | |||||
print('getLaunchAppNotificationerror $error'); | |||||
}); | |||||
} | |||||
}catch(e){ | |||||
if (Platform.isIOS) { | |||||
jpush.getLaunchAppNotification().then((map) { | |||||
print('getLaunchAppNotification $map'); | |||||
Map jExtra = map['extras']; | |||||
String payload = getPayload(jExtra); | |||||
print('onOpenNotification payload:$payload'); | |||||
goPage(payload); | |||||
FlutterAppBadger.removeBadge(); | |||||
}).catchError((error) { | |||||
print('getLaunchAppNotificationerror $error'); | |||||
}); | |||||
} | } | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
name: chat | name: chat | ||||
description: A new Flutter project. | description: A new Flutter project. | ||||
#修改版本号后get-clean | #修改版本号后get-clean | ||||
version: 1.1.1+16 | |||||
version: 1.1.2+17 | |||||
environment: | environment: | ||||
sdk: ">=2.1.0 <3.0.0" | sdk: ">=2.1.0 <3.0.0" | ||||