diff --git a/android/build.gradle b/android/build.gradle index 1513c298..9ca59df8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -40,5 +40,6 @@ repositories { dependencies { compileOnly 'com.facebook.react:react-native:+' - implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '26.+')}" + implementation 'androidx.core:core:1.0.2' + implementation 'androidx.media:media:1.0.1' } diff --git a/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java b/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java index c3ef5da9..2b26e6e0 100644 --- a/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java +++ b/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java @@ -2,11 +2,10 @@ import android.content.Intent; import android.os.Build; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.WritableMap; import com.facebook.react.modules.core.DeviceEventManagerModule; diff --git a/android/src/main/java/com/tanguyantoine/react/MusicControlModule.java b/android/src/main/java/com/tanguyantoine/react/MusicControlModule.java index fff94266..28e852e7 100644 --- a/android/src/main/java/com/tanguyantoine/react/MusicControlModule.java +++ b/android/src/main/java/com/tanguyantoine/react/MusicControlModule.java @@ -14,13 +14,13 @@ import android.media.AudioManager; import android.os.SystemClock; import android.os.Build; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.support.v4.media.MediaMetadataCompat; import android.support.v4.media.RatingCompat; import android.support.v4.media.session.MediaSessionCompat; import android.support.v4.media.session.PlaybackStateCompat; -import android.support.v4.app.NotificationCompat; -import android.support.v4.media.app.NotificationCompat.MediaStyle; +import androidx.core.app.NotificationCompat; +import androidx.media.app.NotificationCompat.MediaStyle; import android.util.Log; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; diff --git a/android/src/main/java/com/tanguyantoine/react/MusicControlNotification.java b/android/src/main/java/com/tanguyantoine/react/MusicControlNotification.java index 2df08bb3..94692fdb 100644 --- a/android/src/main/java/com/tanguyantoine/react/MusicControlNotification.java +++ b/android/src/main/java/com/tanguyantoine/react/MusicControlNotification.java @@ -10,16 +10,16 @@ import android.content.res.Resources; import android.os.Build; import android.os.IBinder; -import android.support.v4.app.NotificationManagerCompat; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import android.support.v4.media.session.PlaybackStateCompat; -import android.support.v4.app.NotificationCompat; import android.view.KeyEvent; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReadableMap; import java.util.Map; -import static android.support.v4.app.NotificationCompat.PRIORITY_MIN; +import static androidx.core.app.NotificationCompat.PRIORITY_MIN; import static com.tanguyantoine.react.MusicControlModule.CHANNEL_ID; import static com.tanguyantoine.react.MusicControlModule.NOTIFICATION_ID; diff --git a/android/src/main/java/com/tanguyantoine/react/MusicControlVolumeListener.java b/android/src/main/java/com/tanguyantoine/react/MusicControlVolumeListener.java index 95281b75..14bf1675 100644 --- a/android/src/main/java/com/tanguyantoine/react/MusicControlVolumeListener.java +++ b/android/src/main/java/com/tanguyantoine/react/MusicControlVolumeListener.java @@ -1,6 +1,6 @@ package com.tanguyantoine.react; -import android.support.v4.media.VolumeProviderCompat; +import androidx.media.VolumeProviderCompat; import com.facebook.react.bridge.ReactApplicationContext; public class MusicControlVolumeListener extends VolumeProviderCompat {