Package com.streamwide.smartms.lib.std
Class FCMPushConnector
java.lang.Object
com.streamwide.smartms.lib.std.FCMPushConnector
- All Implemented Interfaces:
com.streamwide.smartms.lib.template.push.IPushConnector
public class FCMPushConnector
extends Object
implements com.streamwide.smartms.lib.template.push.IPushConnector
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.streamwide.smartms.lib.template.push.IPushConnector
com.streamwide.smartms.lib.template.push.IPushConnector.ConnectorCallback, com.streamwide.smartms.lib.template.push.IPushConnector.IErrorCallback, com.streamwide.smartms.lib.template.push.IPushConnector.TokenHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckRegistrationStatus(android.content.Context context, com.streamwide.smartms.lib.template.push.IPushConnector.IErrorCallback callback, com.streamwide.smartms.lib.template.push.IPushConnector.TokenHandler tokenHandler) Check if GCM is already registered or not If Google Play Services are not available, it will display the error and potentially a Google Play Services dialog to help the uservoidinitCallback(com.streamwide.smartms.lib.template.push.IPushRegistrator pushRegistrator) voidregisterInBackground(android.content.Context context, com.streamwide.smartms.lib.template.push.IPushConnector.ConnectorCallback connectorCallback) Registers the application with GCM servers asynchronously.
-
Constructor Details
-
FCMPushConnector
public FCMPushConnector()
-
-
Method Details
-
initCallback
public void initCallback(@Nullable com.streamwide.smartms.lib.template.push.IPushRegistrator pushRegistrator) - Specified by:
initCallbackin interfacecom.streamwide.smartms.lib.template.push.IPushConnector
-
registerInBackground
public void registerInBackground(@NonNull android.content.Context context, @Nullable com.streamwide.smartms.lib.template.push.IPushConnector.ConnectorCallback connectorCallback) Registers the application with GCM servers asynchronously.Stores the registration ID and the app versionCode in the application's shared preferences.
- Specified by:
registerInBackgroundin interfacecom.streamwide.smartms.lib.template.push.IPushConnector
-
checkRegistrationStatus
public boolean checkRegistrationStatus(@NonNull android.content.Context context, @Nullable com.streamwide.smartms.lib.template.push.IPushConnector.IErrorCallback callback, @Nullable com.streamwide.smartms.lib.template.push.IPushConnector.TokenHandler tokenHandler) Check if GCM is already registered or not If Google Play Services are not available, it will display the error and potentially a Google Play Services dialog to help the user- Specified by:
checkRegistrationStatusin interfacecom.streamwide.smartms.lib.template.push.IPushConnector- Returns:
- true if GCM is already registered, false otherwise
-