@@ -151,7 +151,7 @@ public interface OSRemoteNotificationReceivedHandler {
151
151
}
152
152
153
153
/**
154
- * Meant to be implemented with {@link OneSignal#setNotificationWillShowInForegroundHandler(NotificationWillShowInForegroundHandler )}
154
+ * Meant to be implemented with {@link OneSignal#setNotificationWillShowInForegroundHandler(OSNotificationWillShowInForegroundHandler )}
155
155
* <br/><br/>
156
156
* Call {@link OSNotificationReceivedEvent#complete(OSNotification)} with null
157
157
* for not displaying notification or {@link OSMutableNotification} to modify notification before displaying.
@@ -160,7 +160,7 @@ public interface OSRemoteNotificationReceivedHandler {
160
160
* TODO: Update docs with new NotificationReceivedHandler
161
161
* @see <a href="https://documentation.onesignal.com/docs/android-native-sdk#notificationreceivedhandler">NotificationReceivedHandler | OneSignal Docs</a>
162
162
*/
163
- public interface NotificationWillShowInForegroundHandler {
163
+ public interface OSNotificationWillShowInForegroundHandler {
164
164
165
165
void notificationWillShowInForeground (OSNotificationReceivedEvent notificationReceivedEvent );
166
166
}
@@ -185,28 +185,28 @@ public interface OSNotificationOpenedHandler {
185
185
* An interface used to process a OneSignal In-App Message the user just tapped on.
186
186
* <br/>
187
187
* Set this during OneSignal init in
188
- * {@link OneSignal#setInAppMessageClickHandler(InAppMessageClickHandler )}
188
+ * {@link OneSignal#setInAppMessageClickHandler(OSInAppMessageClickHandler )}
189
189
*/
190
- public interface InAppMessageClickHandler {
190
+ public interface OSInAppMessageClickHandler {
191
191
/**
192
192
* Fires when a user taps on a clickable element in the notification such as a button or image
193
193
* @param result a {@link OSInAppMessageAction}
194
194
**/
195
195
void inAppMessageClicked (OSInAppMessageAction result );
196
196
}
197
197
198
- public interface IdsAvailableHandler {
198
+ public interface OSIdsAvailableHandler {
199
199
void idsAvailable (String userId , String registrationId );
200
200
}
201
201
202
202
/**
203
- * Interface which you can implement and pass to {@link OneSignal#getTags(GetTagsHandler )} to
203
+ * Interface which you can implement and pass to {@link OneSignal#getTags(OSGetTagsHandler )} to
204
204
* get all the tags set on a user
205
205
* <br/><br/>
206
206
* <b>Note:</b> the {@link #tagsAvailable(JSONObject)} callback does not run on the Main(UI)
207
207
* Thread, so be aware when modifying UI in this method.
208
208
*/
209
- public interface GetTagsHandler {
209
+ public interface OSGetTagsHandler {
210
210
/**
211
211
* <b>Note:</b> this callback does not run on the Main(UI)
212
212
* Thread, so be aware when modifying UI in this method.
@@ -297,13 +297,13 @@ static Activity getCurrentActivity() {
297
297
private static int subscribableStatus = Integer .MAX_VALUE ;
298
298
299
299
static OSRemoteNotificationReceivedHandler remoteNotificationReceivedHandler ;
300
- static NotificationWillShowInForegroundHandler notificationWillShowInForegroundHandler ;
300
+ static OSNotificationWillShowInForegroundHandler notificationWillShowInForegroundHandler ;
301
301
302
302
// TODO: Start of old mInitBuilder params
303
303
// These should be cleaned up and managed else where maybe?
304
304
// These have been ripped out of mInitBuilder since it was deleted and placed here for now
305
305
static OSNotificationOpenedHandler notificationOpenedHandler ;
306
- static InAppMessageClickHandler inAppMessageClickHandler ;
306
+ static OSInAppMessageClickHandler inAppMessageClickHandler ;
307
307
308
308
static boolean mAutoPromptLocation ;
309
309
// TODO: End of old mInitBuilder params
@@ -326,7 +326,7 @@ static boolean isInForeground() {
326
326
return appEntryState ;
327
327
}
328
328
329
- private static IdsAvailableHandler idsAvailableHandler ;
329
+ private static OSIdsAvailableHandler idsAvailableHandler ;
330
330
331
331
private static TrackGooglePurchase trackGooglePurchase ;
332
332
private static TrackAmazonPurchase trackAmazonPurchase ;
@@ -378,7 +378,7 @@ public void onSessionEnding(@NonNull List<OSInfluence> lastInfluences) {
378
378
379
379
private static Collection <JSONArray > unprocessedOpenedNotifs = new ArrayList <>();
380
380
private static HashSet <String > postedOpenedNotifIds = new HashSet <>();
381
- private static final ArrayList <GetTagsHandler > pendingGetTagsHandlers = new ArrayList <>();
381
+ private static final ArrayList <OSGetTagsHandler > pendingGetTagsHandlers = new ArrayList <>();
382
382
383
383
static DelayedConsentInitializationParameters delayedInitParams ;
384
384
@@ -621,7 +621,7 @@ static void setRemoteNotificationReceivedHandler(OSRemoteNotificationReceivedHan
621
621
remoteNotificationReceivedHandler = callback ;
622
622
}
623
623
624
- public static void setNotificationWillShowInForegroundHandler (@ Nullable NotificationWillShowInForegroundHandler callback ) {
624
+ public static void setNotificationWillShowInForegroundHandler (@ Nullable OSNotificationWillShowInForegroundHandler callback ) {
625
625
notificationWillShowInForegroundHandler = callback ;
626
626
}
627
627
@@ -632,7 +632,7 @@ public static void setNotificationOpenedHandler(@Nullable OSNotificationOpenedHa
632
632
fireCallbackForOpenedNotifications ();
633
633
}
634
634
635
- public static void setInAppMessageClickHandler (@ Nullable InAppMessageClickHandler callback ) {
635
+ public static void setInAppMessageClickHandler (@ Nullable OSInAppMessageClickHandler callback ) {
636
636
inAppMessageClickHandler = callback ;
637
637
}
638
638
@@ -1697,11 +1697,11 @@ void onFailure(int statusCode, String response, Throwable throwable) {
1697
1697
1698
1698
/**
1699
1699
* Retrieve a list of tags that have been set on the user frm the OneSignal server.
1700
- * @param getTagsHandler an instance of {@link GetTagsHandler }.
1700
+ * @param getTagsHandler an instance of {@link OSGetTagsHandler }.
1701
1701
* <br/>
1702
- * Calls {@link GetTagsHandler #tagsAvailable(JSONObject) tagsAvailable} once the tags are available
1702
+ * Calls {@link OSGetTagsHandler #tagsAvailable(JSONObject) tagsAvailable} once the tags are available
1703
1703
*/
1704
- public static void getTags (final GetTagsHandler getTagsHandler ) {
1704
+ public static void getTags (final OSGetTagsHandler getTagsHandler ) {
1705
1705
if (taskController .shouldQueueTaskForInit (OSTaskController .GET_TAGS )) {
1706
1706
logger .error ("Waiting for remote params. " +
1707
1707
"Moving " + OSTaskController .GET_TAGS + " operation to a pending queue." );
@@ -1760,7 +1760,7 @@ public void run() {
1760
1760
if (tags .serverSuccess ) getTagsCall = true ;
1761
1761
1762
1762
synchronized (pendingGetTagsHandlers ) {
1763
- for (GetTagsHandler handler : pendingGetTagsHandlers ) {
1763
+ for (OSGetTagsHandler handler : pendingGetTagsHandlers ) {
1764
1764
handler .tagsAvailable (tags .result == null || tags .toString ().equals ("{}" ) ? null : tags .result );
1765
1765
}
1766
1766
@@ -1845,7 +1845,7 @@ public static void deleteTags(JSONArray jsonArray, ChangeTagsUpdateHandler handl
1845
1845
}
1846
1846
}
1847
1847
1848
- public static void idsAvailable (final IdsAvailableHandler inIdsAvailableHandler ) {
1848
+ public static void idsAvailable (final OSIdsAvailableHandler inIdsAvailableHandler ) {
1849
1849
if (taskController .shouldQueueTaskForInit (OSTaskController .IDS_AVAILABLE )) {
1850
1850
logger .error ("Waiting for remote params. " +
1851
1851
"Moving " + OSTaskController .IDS_AVAILABLE + " operation to a pending queue." );
@@ -2047,7 +2047,7 @@ static void handleNotificationReceived(OSNotificationGenerationJob notificationJ
2047
2047
* Checks if the app is in the background
2048
2048
* Checks if notificationWillShowInForegroundHandler is setup
2049
2049
* <br/><br/>
2050
- * @see NotificationWillShowInForegroundHandler
2050
+ * @see OSNotificationWillShowInForegroundHandler
2051
2051
*/
2052
2052
static boolean shouldFireForegroundHandlers () {
2053
2053
if (!isInForeground ()) {
@@ -2066,7 +2066,7 @@ static boolean shouldFireForegroundHandlers() {
2066
2066
/**
2067
2067
* Responsible for firing the notificationWillShowInForegroundHandler
2068
2068
* <br/><br/>
2069
- * @see NotificationWillShowInForegroundHandler
2069
+ * @see OSNotificationWillShowInForegroundHandler
2070
2070
*/
2071
2071
static void fireForegroundHandlers (OSNotificationController notificationController ) {
2072
2072
OneSignal .onesignalLog (OneSignal .LOG_LEVEL .INFO , "Fire notificationWillShowInForegroundHandler" );
0 commit comments