Commit cf4cc1ca authored by jyx's avatar jyx

添加喜马拉雅SDK

parent 8b5dd9be
...@@ -250,11 +250,18 @@ dependencies { ...@@ -250,11 +250,18 @@ dependencies {
implementation(name: 'okgo-2.1', ext: 'aar') implementation(name: 'okgo-2.1', ext: 'aar')
implementation(name: 'scenemodule-2.1', ext: 'aar') implementation(name: 'scenemodule-2.1', ext: 'aar')
implementation(name: 'scenead-2.1', ext: 'aar') implementation(name: 'scenead-2.1', ext: 'aar')
implementation 'com.just.agentweb:agentweb:4.1.2' implementation 'com.just.agentweb:agentweb:4.1.2'
// implementation 'com.squareup.okio:okio:1.13.0' // implementation 'com.squareup.okio:okio:1.13.0'
// implementation 'com.squareup.retrofit2:converter-gson:2.3.0' // implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// 喜马拉雅
// v4包
implementation 'com.android.support:support-v4:28.0.0'
implementation files('libs/TingPhoneOpenSDK_7.4.1.jar')
implementation files('libs/XmDownload_2.0.jar')
implementation files('libs/XmlyOAuth2SDK_V2.0.jar')
// testImplementation 'junit:junit:4.13' // testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2' // androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' // androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
......
...@@ -109,11 +109,7 @@ ...@@ -109,11 +109,7 @@
android:name=".ui.activitys.SplashYlhActivity" android:name=".ui.activitys.SplashYlhActivity"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/NormalSplash"> android:theme="@style/NormalSplash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </activity>
<activity <activity
android:name=".ui.activitys.MainActivity" android:name=".ui.activitys.MainActivity"
...@@ -193,6 +189,15 @@ ...@@ -193,6 +189,15 @@
<activity <activity
android:name=".ui.activitys.DhGameActivity" android:name=".ui.activitys.DhGameActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.XmlyActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service <service
android:name=".service.UpdateService" android:name=".service.UpdateService"
...@@ -203,6 +208,13 @@ ...@@ -203,6 +208,13 @@
android:enabled="true" android:enabled="true"
android:exported="false" /> android:exported="false" />
<!-- 喜马拉雅播放器 -->
<service
android:name="com.ximalaya.ting.android.opensdk.player.service.XmPlayerService"
android:exported="true"
android:process=":player" />
<!-- JPUSH 用户自定义的广播接收器 --> <!-- JPUSH 用户自定义的广播接收器 -->
<receiver <receiver
android:name="com.mints.goodmoney.service.JpushReceiver" android:name="com.mints.goodmoney.service.JpushReceiver"
......
...@@ -7,7 +7,6 @@ import android.content.Intent ...@@ -7,7 +7,6 @@ import android.content.Intent
import cn.jpush.android.api.BasicPushNotificationBuilder import cn.jpush.android.api.BasicPushNotificationBuilder
import cn.jpush.android.api.JPushInterface import cn.jpush.android.api.JPushInterface
import com.mints.goodmoney.manager.BxmManager.initBxm import com.mints.goodmoney.manager.BxmManager.initBxm
import com.mints.goodmoney.manager.ZhangyueManager
import com.mints.library.utils.CommonUtils import com.mints.library.utils.CommonUtils
import com.mob.MobSDK import com.mob.MobSDK
import com.orhanobut.logger.AndroidLogAdapter import com.orhanobut.logger.AndroidLogAdapter
...@@ -17,6 +16,9 @@ import com.orhanobut.logger.PrettyFormatStrategy ...@@ -17,6 +16,9 @@ import com.orhanobut.logger.PrettyFormatStrategy
import com.tendcloud.tenddata.TCAgent import com.tendcloud.tenddata.TCAgent
import com.umeng.analytics.MobclickAgent import com.umeng.analytics.MobclickAgent
import com.umeng.commonsdk.UMConfigure import com.umeng.commonsdk.UMConfigure
import com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk
import com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
/** /**
* 子线程初始化SDK * 子线程初始化SDK
...@@ -77,6 +79,15 @@ class InitAppService : IntentService("InitializeService") { ...@@ -77,6 +79,15 @@ class InitAppService : IntentService("InitializeService") {
// 变现猫 // 变现猫
initBxm(this.application) initBxm(this.application)
// 喜马拉雅
val mXimalaya = CommonRequest.getInstanse()
val mAppSecret = "db3cb9e3ec5943f4987e78ddc5aec728"
val mAppKey = "ff71a11162f20808f9f349452dd9e141"
mXimalaya.setAppkey(mAppKey)
mXimalaya.setPackid("com.mints.goodmoney")
mXimalaya.init(this, mAppSecret)
ConstantsOpenSdk.isDebug = true
} }
/** /**
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<com.mints.goodmoney.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/btn1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="获取分类数据" />
<Button
android:id="@+id/btn2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="获取专辑数据" />
<Button
android:id="@+id/btn3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="获取专辑内容" />
<Button
android:id="@+id/btn4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="播放专辑内容" />
</LinearLayout>
</com.mints.goodmoney.ui.widgets.ElasticScrollView>
</LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment