Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!(android): Migrate to AndroidX #119

Merged
merged 5 commits into from
Aug 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ To make the two work together, you need to migrate your GCM project from Google
"cordova": {
"plugins": {
"@havesource/cordova-plugin-push": {
"ANDROID_SUPPORT_V13_VERSION": "28.0.0",
"ANDROIDX_CORE_VERSION": "1.6.+",
"FCM_VERSION": "18.+"
}
},
Expand Down
5 changes: 3 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@
</config-file>

<config-file target="config.xml" parent="/*">
<preference name="AndroidXEnabled" value="true" />
<preference name="GradlePluginGoogleServicesEnabled" value="true" />
<preference name="GradlePluginGoogleServicesVersion" value="4.2.0" />
</config-file>

<preference name="ANDROID_SUPPORT_V13_VERSION" default="28.0.0"/>
<preference name="ANDROIDX_CORE_VERSION" default="1.6.+"/>
<preference name="FCM_VERSION" default="18.+"/>

<framework src="com.android.support:support-v13:$ANDROID_SUPPORT_V13_VERSION"/>
<framework src="androidx.core:core:$ANDROIDX_CORE_VERSION" />
<framework src="me.leolin:ShortcutBadger:1.1.17@aar"/>
<framework src="com.google.firebase:firebase-messaging:$FCM_VERSION"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.support.v4.app.RemoteInput;
import androidx.core.app.RemoteInput;

public class BackgroundActionButtonHandler extends BroadcastReceiver implements PushConstants {
private static String LOG_TAG = "Push_BGActionButton";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.support.v4.app.RemoteInput;
import androidx.core.app.RemoteInput;

public class BackgroundHandlerActivity extends Activity implements PushConstants {
private static String LOG_TAG = "Push_BackgroundHandlerActivity";
Expand Down
6 changes: 3 additions & 3 deletions src/android/com/adobe/phonegap/push/FCMService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationCompat.WearableExtender;
import android.support.v4.app.RemoteInput;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationCompat.WearableExtender;
import androidx.core.app.RemoteInput;
import android.text.Html;
import android.text.Spanned;
import android.util.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.support.v4.app.RemoteInput;
import androidx.core.app.RemoteInput;


public class PushHandlerActivity extends Activity implements PushConstants {
Expand Down
4 changes: 2 additions & 2 deletions src/android/com/adobe/phonegap/push/PushPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import android.util.Log;

import com.google.firebase.iid.FirebaseInstanceId;
Expand Down