Browse Source

Remove Ads

tags/release-v3.0
Schoumi 2 years ago
parent
commit
415f2262b2
3 changed files with 0 additions and 33 deletions
  1. +0
    -2
      app/build.gradle
  2. +0
    -21
      app/src/main/java/fr/mobdev/blooddonation/activity/MainActivity.java
  3. +0
    -10
      app/src/main/res/layout/main_activity.xml

+ 0
- 2
app/build.gradle View File

@@ -19,8 +19,6 @@ android {
}

dependencies {
compile 'com.google.android.gms:play-services-ads:11.0.4'

compile 'com.github.car2go.AnyMaps:anymaps-base:6.0.0'
compile 'com.github.car2go.AnyMaps:anymaps-osm:6.0.0'


+ 0
- 21
app/src/main/java/fr/mobdev/blooddonation/activity/MainActivity.java View File

@@ -18,9 +18,6 @@

package fr.mobdev.blooddonation.activity;

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

import fr.mobdev.blooddonation.Database;
import fr.mobdev.blooddonation.R;
import fr.mobdev.blooddonation.dialog.InformationDialog;
@@ -152,7 +149,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
FragmentTransaction transaction = manager.beginTransaction();
transaction.replace(R.id.fragment_container,maps);
transaction.commit();
setupPub();
setupToolbar();
}

@@ -280,8 +276,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
del.setVisible(false);
MenuItem help = optionMenu.findItem(R.id.action_help);
help.setVisible(false);
AdView adView = (AdView) findViewById(R.id.adView);
adView.setVisibility(View.GONE);

if(frag instanceof DonationFragment) {
actionBar.setTitle(R.string.donations);
@@ -298,7 +292,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
} else if(frag instanceof MapsFragment) {
actionBar.setTitle(R.string.app_name);
notif.setVisible(true);
adView.setVisibility(View.VISIBLE);
} else if(frag instanceof InformationFragment) {
actionBar.setTitle(R.string.info_title);
help.setVisible(true);
@@ -318,20 +311,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
super.onSaveInstanceState(savedInstanceState);
}

private void setupPub() {
AdView adView = (AdView) this.findViewById(R.id.adView);

AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("565162226E7F8255329F3F5F72B05F0B")
.addKeyword("Health").addKeyword("Blood").addKeyword("Sang")
.addKeyword("Santé").addKeyword("Donnation").addKeyword("Don")
.addKeyword("Medication").addKeyword("Medicament").build();

adView.loadAd(adRequest);
}


@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
int id = item.getItemId();

+ 0
- 10
app/src/main/res/layout/main_activity.xml View File

@@ -42,16 +42,6 @@
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">


<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-7913861416640945/5404600510" />

<FrameLayout
android:id="@+id/fragment_container"
android:layout_above="@+id/adView"

Loading…
Cancel
Save