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

Refactor `Push#requestPermission` Method to Support Both iOS and Android

Open ttypic opened this issue 1 year ago • 0 comments

The current Push#requestPermission method has several major issues:

  1. It only works for iOS and lacks support for Android.
  2. It requires the Ably client to be initialized, which is not ideal for a simple permission request.
  3. The API doesn’t support retrieving information if permission is permanently denied, or showing the permission rationale widget flag

Proposed Solution:

  • Move the requestPermission method out of the Push object and into a separate PushUtils class as a static method.
  • Implement cross-platform support for both iOS and Android, ensuring permission requests can be handled universally without needing to initialize the Ably client.

┆Issue is synchronized with this Jira Story by Unito

ttypic avatar Sep 18 '24 09:09 ttypic