From f989052ff36b7f36f308adaaf7348feac3c9f7c8 Mon Sep 17 00:00:00 2001 From: andycheng Date: Wed, 24 May 2017 14:13:18 +0800 Subject: [PATCH] fix online version issue --- app/app.iml | 58 +++++++++---------- app/build.gradle | 16 ++--- .../buddhavoice2/view/VoiceListener.java | 16 ++--- build.gradle | 2 +- 4 files changed, 47 insertions(+), 45 deletions(-) diff --git a/app/app.iml b/app/app.iml index 53a1d22..6ca17dc 100644 --- a/app/app.iml +++ b/app/app.iml @@ -97,51 +97,51 @@ - - - + - + - - - - + + + + - - - - - - + + + + + + + - + + + - - + - - - + + + - - + + - - - + - + + + + + + - - - \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 88e8bab..da5bfae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.oddsoft.buddhavoice2" minSdkVersion 16 targetSdkVersion 21 - versionCode 38 - versionName '2.5.4.032617BV' + versionCode 39 + versionName '2.5.5.052417BV' } buildTypes { release { @@ -26,12 +26,12 @@ android { dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:25.3.0' - compile 'com.android.support:design:25.3.0' - compile 'com.google.android.gms:play-services-analytics:10.2.0' - compile 'com.google.firebase:firebase-core:10.2.0' - compile 'com.google.firebase:firebase-ads:10.2.0' - releaseCompile 'com.google.firebase:firebase-crash:10.2.0' + compile 'com.android.support:appcompat-v7:25.3.1' + compile 'com.android.support:design:25.3.1' + compile 'com.google.android.gms:play-services-analytics:10.2.6' + compile 'com.google.firebase:firebase-core:10.2.6' + compile 'com.google.firebase:firebase-ads:10.2.6' + releaseCompile 'com.google.firebase:firebase-crash:10.2.6' compile('com.mikepenz:aboutlibraries:5.9.4@aar') { transitive = true } diff --git a/app/src/main/java/com/oddsoft/buddhavoice2/view/VoiceListener.java b/app/src/main/java/com/oddsoft/buddhavoice2/view/VoiceListener.java index a1c5d4d..c423624 100755 --- a/app/src/main/java/com/oddsoft/buddhavoice2/view/VoiceListener.java +++ b/app/src/main/java/com/oddsoft/buddhavoice2/view/VoiceListener.java @@ -227,32 +227,32 @@ private void playMusic(int itemnumber, String itemname) { switch (itemnumber) { case 0: - mp3 = "Prajnaparamita.mp3"; + mp3 = "glscjg724kuvc3w/Prajnaparamita.mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/Prajnaparamita.mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/Prajnaparamita.mp3"; break; case 1: - mp3 = "XJ0502.mp3"; + mp3 = "lbd1h01nlsw6n48/XJ0502.mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/XJ0502.mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/XJ0502.mp3"; break; case 2: - mp3 = "great1.mp3"; + mp3 = "7u8gschi6wksmow/great1.mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/great1.mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/great1.mp3"; break; case 3: - mp3 = "great2.mp3"; + mp3 = "2q1341am5zrrn8r/great2.mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/great2.mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/great2.mp3"; break; case 4: - mp3 = "Menla_Mantra.mp3"; + mp3 = "mfdpfxhunba2rf7/Menla_Mantra.mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/Menla_Mantra.mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/Menla_Mantra.mp3"; break; case 5: - mp3 = "LJM093-02-Nian.Mp3"; + mp3 = "2znpghtgtct87i5/LJM093-02-Nian.Mp3?dl=0"; // PATH="http://sites.google.com/site/androidbuddhavoice/LJM093-02-Nian.Mp3?attredirects=0&d=1"; // PATH="http://dl.dropbox.com/u/128583/LJM093-02-Nian.Mp3"; break; @@ -260,7 +260,8 @@ private void playMusic(int itemnumber, String itemname) { //if (onlinePreference.equals("google")) // PATH = "http://sites.google.com/site/androidbuddhavoice/" + mp3 + "?attredirects=0&d=1"; //if (onlinePreference.equals("dropbox")) - PATH = "https://dl.dropboxusercontent.com/s/7u8gschi6wksmow/" + mp3; + PATH = "https://dl.dropboxusercontent.com/s/" + mp3; + //PATH="http://sites.google.com/site/androidbuddhavoice/"+mp3+"?attredirects=0&d=1"; //PATH = "http://www.filefactory.com/stream/23fccglfek8d/great1.mp3"; } stopMusic(); @@ -283,6 +284,7 @@ private void startMusic(int resourceID) { public void run() { try { //play music + Log.d(TAG, "PATH=" +PATH); mp.setDataSource(PATH); mp.prepare(); mp.setLooping(true); diff --git a/build.gradle b/build.gradle index b905bb1..adef908 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:2.3.2' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong