Commit 415f2262 authored by Schoumi's avatar Schoumi

Remove Ads

parent 3f873326
Pipeline #63 passed with stage
in 17 seconds
......@@ -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'
......
......@@ -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();
......
......@@ -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"
......
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