ably-java icon indicating copy to clipboard operation
ably-java copied to clipboard

Proposal: Remove setAndroidContext, take it at push.activate() instead

Open tcard opened this issue 5 years ago • 2 comments

In order for push activation to work, you need to do this:

rest.setAndroidContext(context)
rest.push.activate(useCustomRegistrar)

(Which, by the way, is really poorly documented currently.)

If you do push.activate without doing setAndroidContext first, it crashes.

So, why not just:

rest.push.activate(useCustomRegistrar, androidContext)

We use the context exclusively for push, now and for the foreseeable future, so I think it makes sense we take it there.

┆Issue is synchronized with this Jira Task by Unito

tcard avatar Feb 26 '20 11:02 tcard

@paddybyers WDYT?

tcard avatar Feb 26 '20 13:02 tcard

We use the context exclusively for push, now and for the foreseeable future, so I think it makes sense we take it there.

Not quite, because it's also used to subscribe for platform network changes (cf RTN20 from memory)

paddybyers avatar Feb 26 '20 14:02 paddybyers