Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
fix(android): migrate support libraries to androidx
Browse files Browse the repository at this point in the history
This fixes compilation with RN 0.60

Fixes gh-280
  • Loading branch information
timmywil authored and tanguyantoine committed Jul 9, 2019
1 parent b572320 commit 260f720
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 260f720

Please sign in to comment.