best-flutter / flutter_jpush Goto Github PK
View Code? Open in Web Editor NEWFlutter版本jpush
License: Other
Flutter版本jpush
License: Other
/// 获取别名
FlutterJPush.getAlias().then((JPushResult result) {
if (result.isOk) {
print('alias: ${result.result}');
}
});
报错:E/AndroidRuntime: FATAL EXCEPTION: MessageReceiver
Process: com.gxanxun.smart_maintenance, PID: 21978
java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: MessageReceiver
at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:807)
at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:740)
at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:156)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
at com.jzoom.flutterjpush.FlutterJPushPlugin$MyJPushMessageReceiver.onAliasOperatorResult(FlutterJPushPlugin.java:766)
at cn.jpush.android.a.b.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
我想在弹出消息之后再实现点击通知栏进入特定的页面,请问这个通知栏上有点击事件吗
print("初始化jpush");
await FlutterJPush.startup();
print("初始化jpush成功");
FlutterJPush.getRegistrationID().then((String registrationId) {
print("主动获取设备号:$registrationId");
});
FlutterJPush.addnetworkDidLoginListener((String registrationId) {
/// 用于推送
print("收到设备号:$registrationId");
});
打印:
I/flutter (29062): 初始化jpush
I/flutter (29062): NavObserverDidPush-Current:/ Previous:null
D/libc-netbsd(29062): [getaddrinfo]: hostname=uat-api.xdp.xi-life.cn; servname=(null); app_pid=29062; app_uid=10270; ai_flags=1024; ai_family=0; ai_socktype=1 from prox result 0
I/flutter (29062): 初始化jpush成功
I/flutter (29062): 主动获取设备号:
D/libc-netbsd(29062): [getaddrinfo]: hostname=uat-cdn.xdp.xi-life.cn; servname=(null); app_pid=29062; app_uid=10270; ai_flags=1024; ai_family=0; ai_socktype=1 from prox result 0
这个库怎么集成到项目里啊,添加依赖(pubsepc.yaml中dependences)
请问现在有没有稍微完善一点的文档那。光看代码有点难以理解。感谢。
ios上有通知栏,但收不到消息,点击通知栏才可以获取消息,如何在有通知栏时获取到消息
华为P10 plus,打开demo直接闪退,信任APP也没用。
Configuration 'compile' in project ':flutter_jpush' is deprecated. Use 'implementation' instead.
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
启动就闪退
Performing hot restart...
Restarted application in 1,553ms.
I/flutter ( 871): 初始化jpush
I/flutter ( 871): 初始化jpush成功
D/JPushReceiver( 871): JPushReceiver
I/flutter ( 871): Enter new
I/flutter ( 871): 收到推送提醒: Instance of 'JPushNotification'
D/JPushReceiver( 871): JPushReceiver
I/flutter ( 871): Enter new
I/flutter ( 871): 打开了推送提醒: Instance of 'JPushNotification'
W/System ( 871): ClassLoader referenced unknown path: /system/framework/tcmclient.jar
Lost connection to device.
有没有遇到过这种问题的,或者有没有好的推送组件推荐
报错信息:java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: MessageReceiver
AppDelegate.swift 中 怎么加入这段OC的代码 我在桥中已经搭了 但是调用的时候 无法按oc的方法来调用
HUAWEI nova 3e, android 9,EMUI 9.1.0, 能收到推送,但是onReceiveNotification 和onReceiveMessage 回调不执行
App在前台
_onOpenNotification 可以正常调用
极光推送虽然好,可是我需要友盟的
Methods marked with @UiThread must be executed on the main thread. Current thread: MessageReceiver
FlutterJPushPlugin.java:727行
result.success(map);此行代码造成闪退
FlutterJPush.addReceiveCustomMsgListener((JPushMessage msg) { print(msg.message); setState(() { print("收到推送消息提醒: $msg"); }); });
打印不出消息,但是会打印:
D/JPushReceiver(23526): JPushReceiver
///
/// 重置 alias.
///
/// @param {String} alias
///
/// @param {Function} success = ({"alias":String}) => { }
/// @param {Function} fail = ({"errorCode":int}) => { }
///
Future<Map<dynamic, dynamic>> setAlias(String alias) async {
final Map<dynamic, dynamic> result = await _channel.invokeMethod('setAlias', alias);
return result;
}
而事实上,我没有看到返回,不知道成功与否,也没有日志,也没有监控
When ios is in non-startup state of app, click push notification, how to monitor this action
The current Dart SDK version is 2.1.0-dev.0.0.flutter-be6309690f.
Because lian_miao depends on flutter_jpush from git which requires SDK version <2.0.0, version solving failed.
版本问题该如何解决?
D/FlutterJPushPlugin(30870): MyJPushMessageReceiver init
E/AndroidRuntime(30870): FATAL EXCEPTION: MessageReceiver
E/AndroidRuntime(30870): Process: com.jzoom.pushtest, PID: 30870
E/AndroidRuntime(30870): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: MessageReceiver
E/AndroidRuntime(30870): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
E/AndroidRuntime(30870): at io.flutter.embedding.engine.FlutterJNI.invokePlatformMessageResponseCallback(FlutterJNI.java:556)
E/AndroidRuntime(30870): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:131)
E/AndroidRuntime(30870): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:225)
E/AndroidRuntime(30870): at com.jzoom.flutterjpush.FlutterJPushPlugin$MyJPushMessageReceiver.onAliasOperatorResult(FlutterJPushPlugin.java:766)
E/AndroidRuntime(30870): at cn.jpush.android.a.b.run(Unknown Source:90)
E/AndroidRuntime(30870): at android.os.Handler.handleCallback(Handler.java:808)
E/AndroidRuntime(30870): at android.os.Handler.dispatchMessage(Handler.java:101)
E/AndroidRuntime(30870): at android.os.Looper.loop(Looper.java:166)
E/AndroidRuntime(30870): at android.os.HandlerThread.run(HandlerThread.java:65)
I/HwCust (30870): Constructor found for class android.net.HwCustConnectivityManagerImpl
D/HwCust (30870): Create obj success use class android.net.HwCustConnectivityManagerImpl
I/HwApiCacheMangerEx(30870): apicache pi null
I/HwApiCacheMangerEx(30870): apicache pi PackageInfo{db15c83 com.jzoom.pushtest}
D/NetworkSecurityConfig(30870): No Network Security Config specified, using platform default
I/Process (30870): Sending signal. PID: 30870 SIG: 9
1.如何锁屏后通知亮屏,提示时有通知声音,震动,弹出框,呼吸灯等
2.杀掉进程后接受不到推送
Attribute service#cn.jpush.android.service.PushService@process value=(:mult) from [:flutter_jpush] AndroidManifest.xml:63:13-36
is also present at [cn.jiguang.sdk:jpush:3.3.4] AndroidManifest.xml:65:13-40 value=(:pushcore).
Suggestion: add 'tools:replace="android:process"' to <service> element at AndroidManifest.xml:60:9-70:19 to override.
实例化 JPushMessage 的时候,extar 类型是空,会有异常
case 'receivePushMsg':
{
var map = call.arguments;
var extras = map['extras'];
if (extras != null) {
try {
if (extras is String) {
extras = json.decode(extras);
}
} catch (e) {}
}
_recvCustomMsgController.add(new JPushMessage(
title: map['title'],
message: map['message'] ?? map['content'],
contentType: map['contentType'] ?? map['content_type'],
extras: extras));
}
break;
JPushMessage({this.message, this.contentType, this.title, this.extras});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.