Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setBroadcastTime超过某个阀值后,会立刻推送出来 #30

Open
zhaoqingqing opened this issue Oct 15, 2018 · 2 comments
Open

setBroadcastTime超过某个阀值后,会立刻推送出来 #30

zhaoqingqing opened this issue Oct 15, 2018 · 2 comments

Comments

@zhaoqingqing
Copy link

你好,在安卓上调用这个接口 AddLocalNotification设置延时X秒后进行推送。

如果设置30天(2592000秒)会立即推送出来,我测试当超过2200000秒后,就会立即把消息推送出来。

我使用的是JPushUnityPlugin_v3.2.6.unitypackage

aar中包含的sdk版本为:

jpush-android-3.1.5.jar
jcore-android-1.2.3.jar

我的代码

JPushBinding.AddLocalNotification(0, "推送内容", "标题", 1, 2592000, "");

设置20天后推送adb日志

10-15 19:57:05.476: D/JIGUANG-JPush(9359): [JPushDataAction] Action - onActionRun
10-15 19:57:05.476: D/JIGUANG-JPush(9359): [PushServiceCore] bundle:Bundle[{sdktype=JPUSH, action=org.qing.jpush.intent.MULTI_PROCESS, multi_type=6, local_notification=cn.jpush.android.data.JPushLocalNotification@1}]
10-15 19:57:05.476: D/JIGUANG-JPush(9359): [PushServiceCore] Action - handleServiceAction - action:org.qing.jpush.intent.MULTI_PROCESS
10-15 19:57:05.476: D/JIGUANG-JPush(9359): [JPushLocalNotificationCenter] add LocalNotification

设置30天后推送adb日志

10-15 19:59:17.508: D/JIGUANG-JPush(9359): [JPushDataAction] Action - onActionRun
10-15 19:59:17.508: D/JIGUANG-JPush(9359): [PushServiceCore] bundle:Bundle[{sdktype=JPUSH, action=org.qing.jpush.intent.MULTI_PROCESS, multi_type=6, local_notification=cn.jpush.android.data.JPushLocalNotification@1}]
10-15 19:59:17.508: D/JIGUANG-JPush(9359): [PushServiceCore] Action - handleServiceAction - action:org.qing.jpush.intent.MULTI_PROCESS
10-15 19:59:17.508: D/JIGUANG-JPush(9359): [JPushLocalNotificationCenter] add LocalNotification
10-15 19:59:17.584: D/JIGUANG-JCore(9359): [PushReceiver] onReceive - cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY
10-15 19:59:17.588: D/JIGUANG-JPush(9359): [PushReceiverCore] onReceive - cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY
10-15 19:59:17.604: D/JIGUANG-JPush(9359): [NotificationHelper] running flag:false
10-15 19:59:17.604: D/JIGUANG-JPush(9359): [NotificationHelper] notification intent component=ComponentInfo{org.qing.jpush/cn.jpush.android.service.PushReceiver}
10-15 19:59:17.604: I/NotificationManagerService(502): send statusbar msg to player:jpush-unity3d-demo:推送内容
10-15 19:59:17.612: D/dalvikvm(780): GC_CONCURRENT freed 1678K, 49% free 11005K/21272K, paused 2ms+0ms, total 7ms
10-15 19:59:17.612: E/WVMExtractor(155): Failed to open libwvm.so
10-15 19:59:17.620: D/JIGUANG-JPush(9359): [NotificationHelper] Send push received broadcast to developer defined receiver
10-15 19:59:17.620: I/JPushReceiver(9359): GameObject: Canvas
@JoshLipan
Copy link
Member

确实存在这个问题,建议先不要设置大于阈值的秒数,等待修复。
可以调用AddLocalNotificationByDate代替

@zhaoqingqing
Copy link
Author

AddLocalNotificationByDate 需要传入具体的日期,有的月份是30,31天(2月是28,29天),需要计算出每个月的天数,稍微会麻烦些,所以使用AddLocalNotification接口。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants