raix-push icon indicating copy to clipboard operation
raix-push copied to clipboard

Programmatically ask for permission to receive push notifications

Open gwendall opened this issue 9 years ago • 16 comments

First off, thanks for this great package.

From what I have seen, the apps using this package ask for the user permission to receive push notifications right away, on startup.

It does not seem to be the best pattern - see this interesting article.

Is there a way we could control when to ask for the permission?

gwendall avatar Jul 20 '15 17:07 gwendall

it depends on the cordova push plugin https://github.com/raix/PushPlugin (a cloned working version) - If wanting to change the behaviour that would be the place

raix avatar Jul 27 '15 10:07 raix

Thanks the the answer @raix. For those interested in this question, see https://github.com/phonegap-build/PushPlugin/issues/378.

gwendall avatar Jul 27 '15 16:07 gwendall

@gwendall I followed up on that issue, the most recent Phonegap push plugin supports programmatically delaying push: https://github.com/phonegap/phonegap-plugin-push

mikepaszkiewicz avatar Dec 16 '15 16:12 mikepaszkiewicz

+1 I also think that asking for push notifications on startup is not a good idea, especially if the user does not know much about the app's purpose yet. It would be great if the push delay could be implemented.

derwaldgeist avatar Feb 05 '16 10:02 derwaldgeist

I'm getting quite bad feedback on my app due to this. Any chance that this will be changed soon? The Cordova plugin supports this now, so this should not be too complicated. Would be great, thanks!

derwaldgeist avatar Feb 28 '16 06:02 derwaldgeist

@raix With 1.3 supporting cordova-ios 4.0.1, this looks to be a lot more feasible? This issue implies changing the push plugin dep version to 1.5.2 would enable programmatic control of the register event - in addition to changing some behavior of the Configure method on class PushHandler (lib/client/cordova.js)

I've only recently started poking around the package internals, and might start to mess around with the behavior. curious to get your thoughts on sizing up the task at hand in the meantime - i'm definitely no expert here!

mikepaszkiewicz avatar Apr 05 '16 00:04 mikepaszkiewicz

@mikepaszkiewicz yeah - It seems like I have to upgrade the cordova plugin for it to work on 1.3, might add an option for manually requesting push access

raix avatar Apr 06 '16 07:04 raix

That would be awesome! :+1:

derwaldgeist avatar Apr 06 '16 12:04 derwaldgeist

by upgrading the cordova plugin - are there any changes to actual package code, or just bumping the Cordova.require to 1.5.2?

mikepaszkiewicz avatar Apr 06 '16 20:04 mikepaszkiewicz

@mikepaszkiewicz I havent investigated - code wise I'd probably just bump cordova, clean up things and add a couple of features

I'm considering writing a QA test plan so others can help out QA things - it might speed up development - What do you guys think, would that be feasible?

raix avatar Apr 07 '16 05:04 raix

All for it, a QA test plan would be an awesome place to start out. Can definitely contribute where needed!

mikepaszkiewicz avatar Apr 07 '16 05:04 mikepaszkiewicz

Just downloaded this plugin and trying to get the final touches working. However, this is a big issue. I wanted to know before I went and dug deep on this, has progress been made on this?

markshust avatar Oct 21 '16 10:10 markshust

fyi @raix it appears this issue can now be easily solved because of https://github.com/raix/push/issues/252#issuecomment-255372516

do you know what exactly would be involved in implementing? is it modifying this line https://github.com/raix/push/blob/524f23ac3c3c968a237bfbbf1b77f324d5c830bc/lib/client/cordova.js#L61 to work from options defined instead of startup? i don't mind taking this task unless this has been already implemented.

markshust avatar Oct 21 '16 13:10 markshust

@markoshust I'd appreciate any steps forward on this. In fact, the way the permission is asked today (always at app start) is far from being user-friendly. Typically, most users would dismiss this, since they first want to know "why" the app wants these rights.

derwaldgeist avatar Oct 21 '16 17:10 derwaldgeist

I agree - we should give more control,

raix avatar Oct 21 '16 20:10 raix

Also interested in this! Any updates?

jensljungblad avatar Mar 18 '17 10:03 jensljungblad