Skip to content

Create custom dialogs and pushes dynamically from a server just editing a json file

License

Notifications You must be signed in to change notification settings

androidsx/simple-announcement

Repository files navigation

simple-announcement

How to use

The simplest integration:

Manifest:
Change the receiver class by your own, extending AnnouncementReceiver.java, if you want to track or make other things when announcements events occurs.

<receiver android:name="com.androidsx.announcement.service.SimpleAnnouncementReceiver">
    <intent-filter>
        <action android:name="com.androidsx.announcement.event" />
    </intent-filter>
</receiver>

Note: Take care to call super into the methods onPushOpen and onDialogOpen of your own Receiver class.
See the basic receiver implementation:
SimpleAnnouncementReceiver.java

Application:

AnnouncementManager.init(this, iconResId, appNumUses, JSON URL);

Activity:
Where you want to show a dialog.

AnnouncementManager.with(this).fetch().launchDialogAnnouncementIfApply(this, getFragmentManager());

Note: The pushes will be launched by the internal service called by the scheduled alarm at the hour inidicated in the push parameter.

License

Licensed under the MIT License. See the LICENSE.md file for more details.

About

Create custom dialogs and pushes dynamically from a server just editing a json file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages