add log method to utility module

This commit is contained in:
Akinwale Ariwodola 2020-03-13 02:03:39 +01:00
parent 364de592fa
commit 966dd2bf2c
2 changed files with 6 additions and 0 deletions

View file

@ -61,6 +61,7 @@ public class LbrynetMessagingService extends FirebaseMessagingService {
String channelUrl = payload.get("channel_url"); String channelUrl = payload.get("channel_url");
//String publishTime = payload.get("publish_time"); //String publishTime = payload.get("publish_time");
String publishTime = null; String publishTime = null;
if (type != null && getEnabledTypes().indexOf(type) > -1 && body != null && body.trim().length() > 0) { if (type != null && getEnabledTypes().indexOf(type) > -1 && body != null && body.trim().length() > 0) {
// only log the receive event for valid notifications received // only log the receive event for valid notifications received
if (firebaseAnalytics != null) { if (firebaseAnalytics != null) {

View file

@ -482,4 +482,9 @@ public class UtilityModule extends ReactContextBaseJavaModule {
String platform = String.format("Android %s (API %s)", Utils.getAndroidRelease(), Utils.getAndroidSdk()); String platform = String.format("Android %s (API %s)", Utils.getAndroidRelease(), Utils.getAndroidSdk());
promise.resolve(platform); promise.resolve(platform);
} }
@ReactMethod
public void log(String tag, String message) {
android.util.Log.d(tag, message);
}
} }