|
30 | 30 | import android.content.ComponentName;
|
31 | 31 | import android.content.Context;
|
32 | 32 | import android.content.pm.PackageManager;
|
| 33 | +import android.util.Base64; |
| 34 | + |
33 | 35 | import android.support.annotation.NonNull;
|
34 | 36 |
|
35 | 37 | import com.google.firebase.FirebaseApp;
|
|
44 | 46 |
|
45 | 47 | class PushRegistratorFCM extends PushRegistratorAbstractGoogle {
|
46 | 48 |
|
47 |
| - private static final String FCM_DEFAULT_PROJECT_ID = "onesignal-shared-public"; // project_info.project_id |
48 |
| - private static final String FCM_DEFAULT_APP_ID = "1:754795614042:android:c682b8144a8dd52bc1ad63"; // client.client_info.mobilesdk_app_id |
49 |
| - private static final String FCM_DEFAULT_API_KEY = "AIzaSyAnTLn5-_4Mc2a2P-dKUeE-aBtgyCrjlYU"; // client.api_key.current_key |
| 49 | + // project_info.project_id |
| 50 | + private static final String FCM_DEFAULT_PROJECT_ID = "onesignal-shared-public"; |
| 51 | + // client.client_info.mobilesdk_app_id |
| 52 | + private static final String FCM_DEFAULT_APP_ID = "1:754795614042:android:c682b8144a8dd52bc1ad63"; |
| 53 | + // client.api_key.current_key |
| 54 | + private static final String FCM_DEFAULT_API_KEY_BASE64 = "QUl6YVN5QW5UTG41LV80TWMyYTJQLWRLVWVFLWFCdGd5Q3JqbFlV"; |
50 | 55 |
|
51 | 56 | private static final String FCM_APP_NAME = "ONESIGNAL_SDK_FCM_APP_NAME";
|
52 | 57 |
|
@@ -113,7 +118,7 @@ private void initFirebaseApp(String senderId) {
|
113 | 118 | private static @NonNull String getApiKey() {
|
114 | 119 | if (OneSignal.remoteParams.fcmParams.apiKey != null)
|
115 | 120 | return OneSignal.remoteParams.fcmParams.apiKey;
|
116 |
| - return FCM_DEFAULT_API_KEY; |
| 121 | + return new String(Base64.decode(FCM_DEFAULT_API_KEY_BASE64, Base64.DEFAULT)); |
117 | 122 | }
|
118 | 123 |
|
119 | 124 | private static @NonNull String getProjectId() {
|
|
0 commit comments