Skip to content

Commit

Permalink
feat!(android): Migrate to AndroidX (#119)
Browse files Browse the repository at this point in the history
* feat!(android): migrate ASL to AndroidX
* feat!(android): swap framework support-v13 w/ androidx.core
* feat!(android): force AndroidXEnabled to true
* feat!(android): bump androidx.core:core@1.6.+
* doc(android): add androidx core version

Co-authored-by: Bojan Cvjetkovic <bojan.cvjetkovic@arz.at>
  • Loading branch information
erisu and ED220-CvjB committed Aug 27, 2021
1 parent 82dff88 commit b910146
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
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

0 comments on commit b910146

Please sign in to comment.