라이브 방 - 배너 광고 제거
This commit is contained in:
parent
9626823f0c
commit
e3679fd1dc
|
@ -64,7 +64,6 @@ android {
|
||||||
resValue 'string', 'admob_live_now_all_list_banner_unit_id', 'ca-app-pub-1299501215847962/7226255534'
|
resValue 'string', 'admob_live_now_all_list_banner_unit_id', 'ca-app-pub-1299501215847962/7226255534'
|
||||||
resValue 'string', 'admob_creator_channel_banner_unit_id', 'ca-app-pub-1299501215847962/4594592451'
|
resValue 'string', 'admob_creator_channel_banner_unit_id', 'ca-app-pub-1299501215847962/4594592451'
|
||||||
resValue 'string', 'admob_message_banner_unit_id', 'ca-app-pub-1299501215847962/1161494343'
|
resValue 'string', 'admob_message_banner_unit_id', 'ca-app-pub-1299501215847962/1161494343'
|
||||||
resValue 'string', 'admob_live_room_banner_unit_id', 'ca-app-pub-1299501215847962/4552330040'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
|
@ -88,7 +87,6 @@ android {
|
||||||
resValue 'string', 'admob_live_now_all_list_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
resValue 'string', 'admob_live_now_all_list_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
||||||
resValue 'string', 'admob_creator_channel_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
resValue 'string', 'admob_creator_channel_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
||||||
resValue 'string', 'admob_message_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
resValue 'string', 'admob_message_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
||||||
resValue 'string', 'admob_live_room_banner_unit_id', 'ca-app-pub-3940256099942544/6300978111'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|
|
@ -32,7 +32,6 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import coil.load
|
import coil.load
|
||||||
import coil.transform.CircleCropTransformation
|
import coil.transform.CircleCropTransformation
|
||||||
import com.github.dhaval2404.imagepicker.ImagePicker
|
import com.github.dhaval2404.imagepicker.ImagePicker
|
||||||
import com.google.android.gms.ads.AdRequest
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.orhanobut.logger.Logger
|
import com.orhanobut.logger.Logger
|
||||||
import io.agora.rtc2.ClientRoleOptions
|
import io.agora.rtc2.ClientRoleOptions
|
||||||
|
@ -176,7 +175,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
|
|
||||||
override fun setupView() {
|
override fun setupView() {
|
||||||
bindData()
|
bindData()
|
||||||
setupAdMob()
|
|
||||||
|
|
||||||
loadingDialog = LoadingDialog(this, layoutInflater)
|
loadingDialog = LoadingDialog(this, layoutInflater)
|
||||||
imm = getSystemService(
|
imm = getSystemService(
|
||||||
|
@ -393,16 +391,6 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
setupSpeakerListAdapter()
|
setupSpeakerListAdapter()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
binding.adView.resume()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPause() {
|
|
||||||
binding.adView.pause()
|
|
||||||
super.onPause()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
hideKeyboard {
|
hideKeyboard {
|
||||||
viewModel.quitRoom(roomId) {
|
viewModel.quitRoom(roomId) {
|
||||||
|
@ -410,14 +398,9 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
agora.deInitAgoraEngine()
|
agora.deInitAgoraEngine()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.adView.destroy()
|
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAdMob() {
|
|
||||||
binding.adView.loadAd(AdRequest.Builder().build())
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showOptionMenu(
|
private fun showOptionMenu(
|
||||||
context: Context,
|
context: Context,
|
||||||
userId: Long,
|
userId: Long,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:ads="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -477,7 +476,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="13.3dp"
|
android:layout_marginBottom="13.3dp"
|
||||||
android:paddingHorizontal="13.3dp"
|
android:paddingHorizontal="13.3dp"
|
||||||
ads:layout_constraintBottom_toTopOf="@+id/ad_view"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
@ -511,14 +510,4 @@
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:src="@drawable/btn_message_send" />
|
android:src="@drawable/btn_message_send" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<com.google.android.gms.ads.AdView
|
|
||||||
android:id="@+id/ad_view"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
ads:adSize="SMART_BANNER"
|
|
||||||
ads:adUnitId="@string/admob_live_room_banner_unit_id"
|
|
||||||
ads:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
Loading…
Reference in New Issue