Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Implementing Categories

If your application provides users a way to specify favorites, you may want to register your users for categories, so that you can push relevant content to them.

// Register for US and China Headlines

PushIOManager pushIOManager = PushIOManager.getInstance(this);
List<String> categories = new ArrayList<String>();
categories.add("US");
categories.add("China");
pushIOManager.registerCategories( categories, false );

// Unregister for US Headlines

PushIOManager pushIOManager = PushIOManager.getInstance(this);
List<String> categories = new ArrayList<String>();
categories.add("US");
pushIOManager.unregisterCategories( categories, false );

This kind of registration can be tied to a notifications UI, allowing the user to select categories.

If you want to add a single category, instead of using a list, that is possible also.

PushIOManager pushIOManager = PushIOManager.getInstance(this);
pushIOManager.registerCategory("US");

Tip: To verify that your registration code is working, log into the Web Dashboard and go to the Set Up > Categories section. The Categories page shows each category and its total number of registered devices:

"Web Dashboard Categories page screen image"