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

zmNinja complied from sources for Android and push notification #464

Closed
tecufanujacu opened this issue Feb 23, 2017 · 7 comments
Closed

Comments

@tecufanujacu
Copy link

I have just compiled zmNinja for Android from sources but I have a question, in your guide at step 5 there is this:

configure zmNinja for push notification (optional)
If you want to enable zmNinja to receive push notification, you have to install the phonegap-plugin-push.
cordova plugin add phonegap-plugin-push --variable SENDER_ID=XXXXX
Where the XXXXXXX in SENDER_ID="XXXXXXX" maps to the project number in the Google Developer Console. If you are not creating an Android application you can put in anything for this value.

but If I don't have a SENDER_ID I can't use the push notifications, right?
In this case if I start a new project to get a google SENDER_IT can then I use it without costs?

@pliablepixels
Copy link
Member

pliablepixels commented Feb 23, 2017

To be honest, I'm not a 100% sure its needed. I added it because the plugin doc for push said so. I already have a sender ID in package.json - not sure which one is used. This entire ID and how it works if you compile yourself is not completely clear to me - feel free to try and let me know (But yes, GCM push is free) (see this if it helps)

@tecufanujacu
Copy link
Author

tecufanujacu commented Feb 23, 2017

Well, I have just configured your server and everything is working fabulously, thanks a lot for your work.
The push notifications are working without problems but I don't know if they are working thanks to the WebSocket or to GCM, is there some way to check this? (and eventually sorry for the stupid question).

P.S.: I only have a little problem, sometime zmNinja crashes at exit, I'm on Android 6.0.1 (with cm13). From the logcat I can't see nothing, what could I do?(sorry for the OT)

@pliablepixels
Copy link
Member

Ok great. To test that, you can kill the app from the task switcher and force a push. If it gets it, then its GCM

Not sure I can offer much perspective, especially if logcat is not showing anything about the crash on exit as it doesn't happen with me. However, when you say 'exit' what does that mean? Switching the app to the background, killing it via task bar or using the "exit" menu option?

@tecufanujacu
Copy link
Author

tecufanujacu commented Feb 23, 2017

Well GCM is working :-) I don't use gapps, I use microG and I can clearly see the app zmNinja registered for the push notifications, sorry for my previous questions, I had forgotten that I can see this from microG.
Anyway I haven't set any SENDER_ID but I left the one that was present at build time.

About the crash at exit this happens when I press the exit button in the app and when I press the android back button, I have this problem on two phones, here the log:

02-24 00:58:52.835 I/ActivityManager(1452): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10300000 cmp=com.pliablepixels.zmninja_pro/.MainActivity bnds=[849,1339][1005,1495] (has extras)} from uid 10021 on display 0
02-24 00:58:52.878 I/ActivityManager(1452): Start proc 5493:com.pliablepixels.zmninja_pro/u0a66 for activity com.pliablepixels.zmninja_pro/.MainActivity
02-24 00:58:53.422 I/ActivityManager(1452): Displayed com.pliablepixels.zmninja_pro/.MainActivity: +555ms
02-24 00:59:06.430 W/ActivityManager(1452): Duplicate finish request for ActivityRecord{d765eaf u0 com.pliablepixels.zmninja_pro/.MainActivity t1977 f}
02-24 00:59:06.788 W/WindowManager(1452): Attempted to add application window with unknown token Token{699d2bc ActivityRecord{d765eaf u0 com.pliablepixels.zmninja_pro/.MainActivity t1977 f}}. Aborting.
02-24 00:59:06.904 F/libc (5493): Fatal signal 6 (SIGABRT), code -6 in tid 5493 (els.zmninja_pro)
02-24 00:59:07.006 F/DEBUG (255): pid: 5493, tid: 5493, name: els.zmninja_pro >>> com.pliablepixels.zmninja_pro <<<
02-24 00:59:07.869 I/ActivityManager(1452): Process com.pliablepixels.zmninja_pro (pid 5493) has died

Two questions:

  • is normal that zmNinja is the bigger battery drainer on my phones?
  • are you sure that have we to install the cert file for the ssl on our phones? I'm using two phones for my tests and I have installed the cert on only one phone but the notifications work on both the phones.

@pliablepixels
Copy link
Member

a) Battery - yes. If you are looking at montage, zmninja is essentially grabbing JPEG images every 2 seconds from your monitors. Try switching to "low bandwidth" mode

b) No, you don't need SSL certs - they are not related to notifications. they are for to SSL access to ZM and that too only if you enable strict SSL certs. Can you point me to the documentation that says you need it? I'll fix it

@tecufanujacu
Copy link
Author

tecufanujacu commented Feb 25, 2017

About the certificate, in this page:
https://github.com/pliablepixels/zmeventserver

In the section SSL certificate:

Once that certificate is done, you also need to install it on your phone - thats as simple as emailing yourself the ".crt" file and double tapping it to install it.

About the crash the strange thing is that now this happens only on one phone, If you want I took a full log.

As second thing, I'm having problems with notifications, but for this I open a new issue.

@pliablepixels
Copy link
Member

fixed the instruction page.

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

No branches or pull requests

2 participants