Cordova Slack Digest

Thu, 17 Dec 2020 08:37:02 GMT

User count: 4288

Join the conversation at slack.cordova.io

Channel #general (7 messages)


Wed, 16 Dec 2020 15:59:07 GMT

@info460 says

Hi everybody, I have a question about photos in Android Apps. I was reading quite a lot about the DPI/PPI and difernt resolutions but its still little bit hard to understand. Should I prepare all images (in Photoshop) with at least 320PPI + let say 1280x 1920 for portrait mode in modern phones? I am asking because this will make the images / photos quite big

Wed, 16 Dec 2020 15:59:57 GMT

@norman137 says

Ask away

Wed, 16 Dec 2020 18:13:41 GMT

@tomkinson says

Anyone have GCM (FCM but used GCM) slow notifications issue? Essentially the device manages the GCM service and it can be stopped or throttled so we get chat notifs (using PushWoosh) way delayed. Clearly not ideal. Any workarounds? Considering http://fanout.io|fanout.io

Wed, 16 Dec 2020 18:14:22 GMT

@tomkinson says

To explain that for those wondering https://stackoverflow.com/questions/25743476/how-does-whatsapp-overcome-the-gcm-push-notifications-delay|https://stackoverflow.com/questions/25743476/how-does-whatsapp-overcome-the-gcm-push-notifications-delay

Wed, 16 Dec 2020 18:14:35 GMT

@tomkinson says

But yes obviously a chat notifs needs to be timely

Wed, 16 Dec 2020 18:37:57 GMT

@norman137 says

I'm not sure about how to do this within Pushwoosh SDK but FCM supports a priority option... High priority is for urgent messages that should be received immediately. These are generally reserved for notification messages where you expect urgent attention and it may wake the device from sleeping to produce the notification for the user.

Normal priority messages may be delayed cause they signal that timing is not that important.

Related links: https://firebase.google.com/docs/cloud-messaging/send-message#defining-the-message-options https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message https://firebase.google.com/docs/reference/admin/node/admin.messaging.MessagingOptions#priority

Thu, 17 Dec 2020 08:02:21 GMT

@lonestarx91 says

hello

Channel #cordova-ios (4 messages)


Thu, 17 Dec 2020 08:03:14 GMT

@lonestarx91 says

hey, anyone struggling with accessing local files from remote ?

Thu, 17 Dec 2020 08:05:47 GMT

@lonestarx91 says

https://cdvfile/localhost/..... seems to fail with 10.0.0 (6.0.0 ios) and the latest version of https://github.com/apache/cordova-plugin-file

Thu, 17 Dec 2020 08:06:50 GMT

@lonestarx91 says

<script>..</... requests don't seem to be intercepted at all

Thu, 17 Dec 2020 08:06:55 GMT

@lonestarx91 says

using wkwebview i should mention

Channel #cordova-android (8 messages)


Wed, 16 Dec 2020 11:18:18 GMT

@jakob.pfab says

Does someone know why calling

mediaRec = new Media(src);```
with File Plugin and Media Plugin requests a permission to access files fotos etc. ?

From my understanding cordova.file.dataDirectory should be within the app sandbox and should not require external storage permissions.
Is there any way to prevent asking for those?

Wed, 16 Dec 2020 13:31:54 GMT

@jakob.pfab says

aah i think its the Media plugin as it calls getExternalStorageState() during temp file creation

Wed, 16 Dec 2020 13:47:45 GMT

@jakob.pfab says

ok actually Media Plugin requires external storage at some more positions, will see if i can rewrite it....

Wed, 16 Dec 2020 15:39:17 GMT

@ucheozoemena says

Hi folks, I‘ve noticed that sometimes push notifications are delayed in getting to Android devices even though my push notifications provider marks the notifications as delivered. Btw https://www.pushwoosh.com/|Pushwoosh is the service I’m using. From some online research (<https://stackoverflow.com/questions/25743476/how-does-whatsapp-overcome-the-gcm-push-notifications-delay|this thread> is an example), it seems the real problem lies with the underlying GCM/FCM service that pushwoosh uses, and under different conditions the delays are outside the control of Pushwoosh. I‘ve seen in a few threads that the most reliable solution is to use a push notifications service that doesn’t rely on GCM/FCM, and one example given is https://pushy.me/|Pushy. I'm curious to know if anyone else has encountered something like this and what solutions you found. Thanks. :simple_smile:

Wed, 16 Dec 2020 15:56:34 GMT

@norman137 says

I've only had some exposure in using push notifications but GCM/FCM is what you should be using. Notifications will be sent eventually. There are different priority levels for different use cases. I forget what each priority level is called but if you need urgent attention (such as providing a phone call notification) these will always be sent almost immediately. Normal prioritisation may take a few minutes.

It is possible to set up push notifications without FCM using your own socket connections for example, which I suspect is what Pushy does... but this isn‘t really recommended because if every app does this, it will cause a considerable amount of drain to the user’s device. FCM provides a single channel for all the user apps to receive notifications which is why Google recommends using FCM for push notifications (or for ios, the equivalent is APNS).

My basic exposure with push notifications was through Pushwoosh, but it's good to understand the underlying technology.

Wed, 16 Dec 2020 18:46:22 GMT

@info460 says

Do we still need to address 300ms issue or its outdated and solved in Cordova already?

Wed, 16 Dec 2020 18:55:35 GMT

@norman137 says

For mouse clicks? Android webview will disable that “feature” if you use the meta viewport tag.

Wed, 16 Dec 2020 18:56:22 GMT

@norman137 says

At minimum you'll need this:

&lt;meta name="viewport" content="width=device-width"&gt;

More info can be found here: https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away