Вы находитесь на странице: 1из 9

=================================== Version 3.

5 ==============================
1. Update to newest Android studio 3.5.2

2. Go To Top-Level build.gradle in Your source code, Let change

classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.2'
to
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'com.google.gms:google-services:4.3.3'

3. Find and replace activity_show_url.xml in app/src/main/res/ folder

4. Find and Replace file YPYStreamService.java and change com.ypyglobal.xradio to


your package name

5. Find and replace file YPYFragmentActivity.java, YPYFragmentAdapter.java and


change com.ypyglobal.xradio to your package name

6. Find and replace GlideImageLoader.java ResolutionUtils.java and change


com.ypyglobal.xradio to your package name

7. Open IXRadioConstants.java and add this line:

boolean ALLOW_FB_ADS = false;

if you put = false, the facebook ads will not install


if you put = true, the facebook ads will be installed correctly

8. Open IXRadioConstants.java and add these lines :

String DEFAULT_START_COLOR = "#cf6cc9";


String DEFAULT_END_COLOR = "#ee609c";

this is default color and default end color when you install app in the first time,
let change this color to adapt your app

9. Find and replace XRadioSettingManager.java and change com.ypyglobal.xradio to


your package name.

10. Find and replace XRadioApplication.java and change com.ypyglobal.xradio to


your package name

11. Find and replace XSingleRadioMainActivity.java, FragmentDragDrop.java and


change com.ypyglobal.xradio to your package name

12. Clean project and build again

=================================== Version 3.4 ==============================


1. Back up your current project. If update has any problem, we can revert the
current

2. Open file local.properties and delete the line which starting with "ndk.dir="
ndk.dir=/Volumes/Data/AndroidTools/adt-bundle-mac-x86_64/sdk/ndk-bundle

3. Go to Top Level build.gradle. Let change


classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'

to
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.2'

And press Sync Now. If it show the Error

"ERROR: Minimum supported Gradle version is 5.4.1. Current version is 5.1.1."

Let click the blue lines to fix

"Please fix the project's Gradle settings.


Fix Gradle wrapper and re-import project
Open Gradle wrapper properties
Gradle settings"

4. Go to app/build.gradle. Let change

implementation 'com.google.android.exoplayer:exoplayer-core:2.9.3'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.3'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.3'

to
implementation 'com.google.android.exoplayer:exoplayer-core:2.10.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.10.4'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.10.4'

Press Sync Now to sync again

5. Find and Replace file YPYMediaPlayer.java, YPYStreamService.java,


XMultiRadioMainActivity.java and change com.ypyglobal.xradio to your packagename

6. Find and Replace file XRadioSplashActivity.java and change com.ypyglobal.xradio


to your packagename

7. Clean project and build again

=================================== Version 3.3 ==============================


1. Back up your code before doing anything.

2. Open /app/src/main/res folder, please delete 3 folders

drawable-hdpi , drawable-mdpi, drawable-xhdpi

BE CAREFULLY: You dont allow to delete folder drawable-xxhdpi because it is


containing all images for app. Just delete drawable-hdpi , drawable-mdpi, drawable-
xhdpi because it is containing all old icon app.

3. We will move to Adaptive Icon on Android by copying 5 folders to


/app/src/main/res
mipmap-hdpi, mipmap-mdpi, mipmap-xhdpi, mipmap-xxhdpi, mipmap-xxxhdpi

4. Open 5 folders, let replace xradio icon to be your icons but you NEED to KEEP
Name and size of icons. Also you need to keep format (including transparent or
shape of icon). We are having 2 icons in each folder, one is square with border
corner, and two is circle. You need to keep the same format as my icon. It will
help your app to have Adaptive Icon and your icon app will be very beautiful on
every device.

NOTE: You can refer this link for more information


https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

5. Open /app/src/main/AndroidManifest.xml, Find the line in tag application

android:icon="@drawable/ic_launcher"

let change it to be

android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"

6. Replace file YPYStreamService.java and change it to your package name

7. Open file IXRadioConstants.java and add 2 lines

//true if you just want to use the in-app webview when you click link in the
application
boolean USE_INTERNAL_WEB_BROWSER = false;

//number grid column in app for Flat Grid, Card Grid


int NUMBER_GRID_COLUMN = 2;

8. Replace file GDPRManager.java, GDPRModel.java and change com.ypyglobal.xradio to


your packagename

9. Find and replace file XRadioListFragment.java, XRadioFragmentActivity.java,


XRadioSplashActivity.java

10. Clean project and build again

=================================== Version 3.2 ==============================


1. Replace file ShareActionUtils.java

2. Go to Top-Level build.gradle and check


if
classpath 'com.google.gms:google-services:4.2.0'

Please change it to be
classpath 'com.google.gms:google-services:4.3.0'

3. Go to app/build.gradle
change
implementation 'com.facebook.android:audience-network-sdk:5.+'
to
implementation 'com.facebook.android:audience-network-sdk:5.4.1'

4. Go to app/build.gralde also
Change library of ads
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'

implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
to
implementation 'com.google.android.gms:play-services-ads:18.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'

implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-messaging:19.0.1'

Press Sync Again

5. open IXRadioConstants.java. Let add 3 lines

boolean SAVE_FAVORITE_SDCARD = false; // false if you dont want to save favorite to


SDCARD, vice versa

String[] LIST_PERMISSIONS= {Manifest.permission.WRITE_EXTERNAL_STORAGE};

String FILE_GENRES= "genres.json";

6. Go to app/src/main/AndroidManifest.xml, add this line


<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

7. Replace files TotalDataManager.java, XRadioNetUtils.java, JsonParsingUtils.java


and change com.ypyglobal.xradio to be your package name

8. Replace file XRadioSplashActivity.java and change com.ypyglobal.xradio to be


your package name

9. Replace file XRadioGrantActivity.java and change com.ypyglobal.xradio to be your


package name

10. Replace files XRadioSettingManager.java, IXRadioSettingConstants.java and


change com.ypyglobal.xradio to be your package name

11. Replace file XRadioFragmentActivity.java and change com.ypyglobal.xradio to be


your package name

12. Replace files FragmentDetailList.java,FragmentDragDrop.java,


FragmentGenre.java, FragmentTheme.java, XRadioListFragment.java and change
com.ypyglobal.xradio to be your package name

13. Replace files GenreAdapter.java, RadioAdapter.java, ThemeAdapter.java and


change com.ypyglobal.xradio to be your package name

Clean Project and Build Again

=================================== Version 3.1 ==============================


Update for Admin panel
1. Find and replace file api.php on your admin panel
2. Find and replace file xradio_remote_configs.php on your admin panel

Update For Android studio


1. Update Android studio to 3.4.1

2. Go to Top-Level build.gradle and check


if
classpath 'com.android.tools.build:gradle:3.4.0'
Please change it to be
classpath 'com.android.tools.build:gradle:3.4.1'

3. Go to app/build.gradle
change

implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.5.0'
implementation 'com.facebook.android:audience-network-sdk:5.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
to
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.facebook.android:audience-network-sdk:5.+'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'

4. Go to IXRadioConstants.java, add this line

int UI_HIDDEN= 0;

5. Replace file TotalDataManager.java and change com.ypyglobal.xradio to your


package name

6. Replace file YPYStreamService.java and change com.ypyglobal.xradio to your


package name

7. Replace file XMultiRadioMainActivity.java, XSingleRadioMainActivity.java and


change com.ypyglobal.xradio to your package name

8. Clean project and build again

=================================== Version 3.0 ==============================


Update for Admin panel
1. Find and replace file xradio_remote_configs.php on your admin panel

Update For Android studio


1. open app/build.gradle, let add this line and Press Sync Again
implementation 'org.jsoup:jsoup:1.11.3'

2.open file proguard-rules.pro, let add these lines

#jsoup
-dontwarn org.jsoup.**
-keep class org.jsoup.** {*;}

3. Open IXRadioConstants.java , let add these lines


int UI_PLAYER_NO_LAST_FM_SQUARE_DISK= 4;
int UI_PLAYER_NO_LAST_FM_CIRCLE_DISK= 5;
int UI_PLAYER_NO_LAST_FM_ROTATE_DISK= 6;

4. Find and replace FragmentDragDrop.java and change com.ypyglobal.xradio to your


package name

5. Find and replace XSingleRadioMainActivity.java and change com.ypyglobal.xradio


to your package name

6. Find and replace TotalDataManager.java and change com.ypyglobal.xradio to your


package name
7. Find and replace XRadioNetUtils.java and JsonParsingUtils.java and change
com.ypyglobal.xradio to your package name

NOTE: If you have bought iTunes cover Files from us, please skip this step
because
itunes is very good.

Clean Project and Build again

=================================== Version 2.9 ==============================


Update for Admin panel
1. Find and replace file api.php in folder api on your admin panel

Update For Android studio


1. Update your android studio to 3.4

2. Open Top Level build.gradle

change
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.0.0'
to
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
3. Open app/build.gradle

Change
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
to
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

and Add these lines:


implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

press Sync Again

4. Open file IXRadioConstants.java, let remove all sequence strings


"public static final" in each params

For examples:
public static final boolean USE_BLUR_EFFECT = true;
will change to
boolean USE_BLUR_EFFECT = true;

5.Open file IYPYStreamConstants.java , let remove all sequence strings


"public static final" in each params

For examples:
public static final String KEY_VALUE = "value";
will change to
String KEY_VALUE = "value";

6. Open AndroidManifest.xml and add this line inside <application> tag :


below the line
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true" />

add this line


<uses-library android:name="org.apache.http.legacy"
android:required="false"/>

Delete these line


<meta-data
android:name="com.ypyglobal.xradio.ypylibs.imageloader.model.GlideConfiguration"
android:value="AppGlideModule"/>

7. Find and replace GlideConfiguration.java and change it to your package name

8. Open app/build.gradle

Delete this line:


implementation 'com.github.mattias-karlsson:exoplayer-shoutcast:1.0.0'

and Change :

implementation 'com.google.android.exoplayer:exoplayer-core:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.8.4'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.8.4'

to
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.3'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.3'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.3'

press Sync Again

10. Copy my folder com/ypyglobal/xradio/stream/shoutcast and paste it to your


project at folder
app/src/main/YOUR_PACKAGE_NAME/stream/

for example if YOUR_PACKAGE_NAME = com.app.radio so you will paste this folder to


this path app/src/main/com/app/radio/stream/

And go to Android Studio, open all files in this shoutcast folder which you just
copied and change com.ypyglobal.xradio to your package name

11.Find and replace file YPYMediaPlayer.java, YPYStreamService.java,


YPYIntentReceiver.java and change com.ypyglobal.xradio to your package name

12. open res/values/colors.xml and add this line


<!--dialog accent color-->
<color name="dialog_color_accent">@color/colorAccent</color>

13. Find and replace file YPYFragmentActivity.java and change com.ypyglobal.xradio


to your package name

14. Find and replace file XRadioSplashActivity.java and XRadioFragmentActivity.java


change com.ypyglobal.xradio to your package name

15.Find and replace file XRadioListFragment.java change com.ypyglobal.xradio to


your package name

16.Open app/build.gradle again

let change:

implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
to
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.google.android.gms:play-services-gcm:16.1.0'

Let change
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-messaging:17.3.4'

to
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.5.0'

press Sync Again

17. Delete the file XRadioFBInstanceIDService.java

18. File and update file GDPRManager.java

After finishing all, please clean project and build again.

===================================Version 2.8================================
Update for Android Studio
1. open AndroidManifest.xml, let add this line
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
below the line
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

2. Open AndroidManifest.xml, let add this line


android:usesCleartextTraffic="true"
below the line
android:hardwareAccelerated="true"

3. Open AndroidManifest.xml, let delete this line


<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

4. Open app/build.gradle let add this line


implementation 'com.google.android.ads.consent:consent-library:1.0.7'
Press Sync Again

5. Copy my folder com/ypyglobal/xradio/gdpr and paste it to your project at folder


app/src/main/YOUR_PACKAGE_NAME/

for example if YOUR_PACKAGE_NAME = com.app.radio so you will paste this folder to


this path app/src/main/com/app/radio
And go to Android Studio, open 2 file GDPRManager.java and GDPRModel.java, change
com.ypyglobal.xradio to your package name

6. copy and replace the new config.json in assets folder to your assets folder and
update to your config. We will have new config param it is publisher_id in admob
ads type which you can find in your admod account

7. Replace file ConfigureModel.java, AdMobAdvertisement.java and change


com.ypyglobal.xradio to your package name

8. open res/values/strings.xml file and add this line


<string name="title_setting_ads" >Setting Advertisement</string>

9. Open res/menu/menu_main.xml let add these line


<item
android:id="@+id/action_setting_ads"
android:orderInCategory="100"
android:title="@string/title_setting_ads"
app:showAsAction="never"/>

10. Find and replace file TotalDataManager.java and change com.ypyglobal.xradio to


your package name

11. Find and replace file YPYSplashActivity.java and change com.ypyglobal.xradio to


your package name

12.Let find and replace XMultiRadioMainActivity.java ,


XSingleRadioMainActivity.java and change com.ypyglobal.xradio to your package name

13. Let find and replace file YPYIntentReceiver.java, YPYStreamService.java and


change com.ypyglobal.xradio to your package name

14. Replace file XRadioFragmentActivity.java, XRadioGrantActivity.java,


XRadioSplashActivity.java and change com.ypyglobal.xradio to your package name

15. Go to IXRadioConstants.java, find and delete this line


public static final String[] LIST_PERMISSIONS=
{Manifest.permission.WRITE_EXTERNAL_STORAGE};

IF YOU DONT UNDERSTAND, PLEASE SEE MY FILE ON NEWEST CODE TO SEE HOW TO EDIT

Вам также может понравиться