donpablo's Recent Forum Activity

  • thanks i will try this

  • WHY TO POST IF NO ONE HELP!?!?!?!?

  • I have recive a mail from admob (google) new cookie law for EU!

    But how to add this code in our games?

    Where to paste and how we dont have a "MainActivity" whern we expoet to intel sdk.

    The code is for android:

    // This code works on Android API level 1 (Android 1.0) and up.
    // Tested on the latest (at the moment) API level 19 (Android 4.4 KitKat).
    // In the main activity of your app:
    
    public class MainActivity extends Activity 
    
      (...)
    
      @Override
      public void onStart() {
        super.onStart();
        final SharedPreferences settings =
            getSharedPreferences("localPreferences", MODE_PRIVATE);
        if (settings.getBoolean("isFirstRun", true)) {
          new AlertDialog.Builder(this)
            .setTitle("Cookies")
            .setMessage("Your message for visitors here")
            .setNeutralButton("Close message", new OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) 
                settings.edit().putBoolean("isFirstRun", false).commit();
              }
            }).show();
        }
      }
    }[/code:3tcp4004]
    
    And for Ios
    
    [code:3tcp4004]// This code will work in iOS 2 and up
    // (spoiler: you're not going to need anything below iOS 6).
    // Tested in iOS 7 
    // In your app's UIApplicationDelegate:
    
    [ul]
    	[li](BOOL)application:(UIApplication *)application[/li]
    [/ul]    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      (...)
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      if (![defaults boolForKey:@"termsAccepted"]) 
        NSString *message =
          @"Your message for visitors here";
        UIAlertView *alert =
          [[UIAlertView alloc] initWithTitle:@"Cookies"
                                     message:message
                                    delegate:self
                           cancelButtonTitle:nil
                           otherButtonTitles:@"Close message", nil];
        [alert show];
      }
    }
    
    [/code:3tcp4004]
    I think it is a lot of people having trouble with this.
    And yes me too .
    Thank's
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Please help me with that file that i must paste the code in it.

    Thanks.

  • What to tipe in constrcut 2 admob

    Or what file to edit with new EU user consent policy of traking for admob.

    I recive this mail.

    And the email is

    "

    Dear Publisher,

    We want to let you know about a new policy about obtaining EU end-users’ consent that reflects regulatory and best practice guidance. It clarifies your duty to obtain end-user consent when you use products like Google AdSense, DoubleClick for Publishers, and DoubleClick Ad Exchange.

    Please review our new EU user consent policy as soon as possible. This requires that you obtain EU end users’ consent to the storing and accessing of cookies and other information, and to the data collection, sharing, and usage that takes place when you use Google products. It does not affect any provisions on data ownership in your contract.

    Please ensure that you comply with this policy as soon as possible, and not later than 30th September 2015.

    If your site or app does not have a compliant consent mechanism, you should implement one now. To make this process easier for you, we have compiled some helpful resources at cookiechoices.org.

    This policy change is being made in response to best practice and regulatory requirements issued by the European data protection authorities. These requirements are reflected in changes recently made on Google’s own websites.

    Thank you in advance for your understanding and cooperation.

    Regards,

    The Google Policy Team"

    Code fore android

    // This code works on Android API level 1 (Android 1.0) and up.
    // Tested on the latest (at the moment) API level 19 (Android 4.4 KitKat).
    // In the main activity of your app:
    
    public class MainActivity extends Activity 
    
      (...)
    
      @Override
      public void onStart() {
        super.onStart();
        final SharedPreferences settings =
            getSharedPreferences("localPreferences", MODE_PRIVATE);
        if (settings.getBoolean("isFirstRun", true)) {
          new AlertDialog.Builder(this)
            .setTitle("Cookies")
            .setMessage("Your message for visitors here")
            .setNeutralButton("Close message", new OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) 
                settings.edit().putBoolean("isFirstRun", false).commit();
              }
            }).show();
        }
      }
    }[/code:21uj9zva]
    
    For ios
    
    [code:21uj9zva]// This code will work in iOS 2 and up
    // (spoiler: you're not going to need anything below iOS 6).
    // Tested in iOS 7 
    // In your app's UIApplicationDelegate:
    
    [ul]
    	[li](BOOL)application:(UIApplication *)application[/li]
    [/ul]    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      (...)
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      if (![defaults boolForKey:@"termsAccepted"]) 
        NSString *message =
          @"Your message for visitors here";
        UIAlertView *alert =
          [[UIAlertView alloc] initWithTitle:@"Cookies"
                                     message:message
                                    delegate:self
                           cancelButtonTitle:nil
                           otherButtonTitles:@"Close message", nil];
        [alert show];
      }
    }
    
    // Elsewhere in the file:
    
    [ul]
    	[li](void)alertView:(UIAlertView *)alertView[/li]
    [/ul]    clickedButtonAtIndex:(NSInteger)buttonIndex 
      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
      [defaults setBool:YES forKey:@"termsAccepted"];
      [defaults synchronize];
    }[/code:21uj9zva]
donpablo's avatar

donpablo

Member since 27 Jul, 2015

None one is following donpablo yet!

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies