Initialize Beams
After you have added the required dependencies, it’s time to start Pusher Beams in your project.
∞ Import Pusher Beams
Go to the Activity or Application class where you want to use Beams and import the SDK:
import com.pusher.pushnotifications.PushNotifications;
∞ Connect to Pusher
Add this line to connect the device to your Beams instance:
PushNotifications.start(getApplicationContext(), "YOUR_INSTANCE_ID");
Your instance ID can be found in the dashboard.
∞ Add a device interest
Finally, add this line to subscribe to an interest so that your server can send notifications to this device.
PushNotifications.addDeviceInterest("hello");
∞ Where Next?
Now that you have initialized Pusher Beams, why not send a notification?