This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.packtpub.ltm; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.ArrayAdapter; | |
import android.widget.Spinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
06-14 18:11:29.861 12380-12440/com.ionexample E/ION_VERBOSE_LOGGING: (6360 ms) https://api.paystack.co/transaction/charge_token: Connection error | |
06-14 18:11:29.876 12380-12440/com.ionexample E/ION_VERBOSE_LOGGING: Fatal alert received internal_error | |
javax.net.ssl.SSLException: Fatal alert received internal_error | |
at com.android.org.conscrypt.SSLEngineImpl.unwrap(SSLEngineImpl.java:484) | |
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:383) | |
at com.koushikdutta.async.AsyncSSLSocketWrapper$5.onDataAvailable(AsyncSSLSocketWrapper.java:194) | |
at com.koushikdutta.async.Util.emitAllData(Util.java:23) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.google.gms.google-services' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
compile 'com.google.firebase:firebase-core:9.2.0' | |
compile 'com.google.firebase:firebase-messaging:9.2.0' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaultConfig { | |
applicationId "com.example.myfirebaseapp" //add your application Id | |
minSdkVersion ... | |
targetSdkVersion ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFirebaseMessagingService extends FirebaseMessagingService { | |
private static final String TAG = "FCM Service"; | |
@Override | |
public void onMessageReceived(RemoteMessage remoteMessage) { | |
Log.d(TAG, "From: " + remoteMessage.getFrom()); | |
Log.d(TAG, "From: " + remoteMessage.getNotification().getBody()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service | |
android:name=".MyFirebaseMessagingService" | |
android:enabled="true" | |
android:exported="true"> | |
<intent-filter> | |
<action android:name="com.google.firebase.MESSAGING_EVENT" /> | |
</intent-filter> | |
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FirebaseIDService extends FirebaseInstanceIdService { | |
private static final String TAG = "FirebaseIDService"; | |
@Override | |
public void onTokenRefresh() { | |
String refreshedToken = FirebaseInstanceId.getInstance().getToken(); | |
Log.d(TAG, "Refreshed token: " + refreshedToken); | |
// TODO: Implement this method to send any registration to your app's servers. | |
sendRegistrationToServer(refreshedToken); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service android:name=".FirebaseIDService"> | |
<intent-filter> | |
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> | |
</intent-filter> | |
</service> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Log.d(TAG, "From: " + remoteMessage.getFrom()); | |
Log.d(TAG, "From: " + remoteMessage.getNotification().getBody()); | |
OlderNewer