New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rich Push Notification #2208
Comments
I'd like to address these but all of my issues are going to 5.0 right now so I'm pushing back all RFE's. |
Custom actions and image attachments have been added. See I have not added:
I don't know what "Adding a frame to push content." is referring to. NOTE: Image attachment support requires an additional provisioning profile to be generated. The certificate wizard will generate this automatically and make it available to the build server during builds - but you'll need to generate new provisioning profiles for your app (using the certificate wizard) to trigger this. |
Status update: Test input is implemented in iOS, but not in Android yet. I have run into some difficulty getting android to work properly. Will take another shot at it soon. I don't think I'm going to include the "Different text when expanded" in this RFE. It may be best handled natively. |
I have finally added support for text replies as part of a push notification on Android. This completes this issue. Example usage. The app main class should implement PushActionProvider. It will define a method that returns a set of categories. E.g.
Then, when sending a push notification, you can specify the "category" of the message. If the category corresponds with a defined category in your getPushActionCategories() method, then the user will be presented with a set of buttons corresponding to the PushActions in that category. In the above example, we would send a push type 99 and a body of
This would trigger the "fo" category that we defined, which has 3 actions: Yes, No, and Maybe. And the "Maybe" action will provide a text input because of the extra parameters provided:
The last 2 parameters are the "hint" text and the reply button label. On android, the notification will look like If you click on "Maybe" (with API 27 or higher), then you'll get a text field to enter a reply directly. You can retrieve both which action was pressed, and what the user text input was using the PushContent class. An example push callback method to retrieve this data:
|
Codename One should support high-level customization of push notification on iOS and Android. Currently, the only push that could be sent is basic.
Some of the features that can be added are:
Examples of some of these features can be found below:
The text was updated successfully, but these errors were encountered: