urbanairship / android-library

Urban Airship Android SDK
Other
109 stars 123 forks source link

getPushProvider restricted method #225

Closed charliemourant closed 1 year ago

charliemourant commented 1 year ago

Preliminary Info

What Airship dependencies are you using?

We are integrating with com.urbanairship.android:urbanairship-core v16.10

Query

My team would like to use the getPushProvider() method from PushManager.java but it has a restricted annotation. Can you share why it is restricted? Is it likely to be removed? does it not work?

rlepinski commented 1 year ago

It works but its an internal class that we have to expose in other modules. What are you trying to use it for? I do not think we want to expose it directly, but maybe we can expose the info you are wanting. Just an Enum of the push provider?

charliemourant commented 1 year ago

Exactly, we just want an Enum of the push provider.

rlepinski commented 1 year ago

Feel free to use the getter on PushManager for now. In a future SDK version we will provide a proper public enum for you to switch over. Ill keep this open until we have a replacement for you

charliemourant commented 1 year ago

Brilliant, thanks for the quick and helpful responses.

jyaganeh commented 1 year ago

Hi @charliemourant, we added a new getPushProviderType() method in the 17.0.3 release that just shipped. As Ryan mentioned earlier, you're totally fine to use the restricted push provider getter on PushManager for now, as there's essentially no chance we'll be changing that API in 16.x. When you're able to upgrade to 17.x, the new public method will be waiting for you. :)