Importing admob sdk into processing

edited January 9 in Android Mode

I've been trying to get ads working on my processing app with multiple guides found on here, but I can't seem to get the library imported properly. I have the following imports in my sketch

import android.os.Bundle;
import android.view.Gravity;
import android.view.Window;
import android.widget.RelativeLayout;
import com.google.ads.*;

but I only get "The import com.google cannot be resolved". I've understood that I need to copy the needed library somewhere for processing to use, but haven't gotten any combination to work. I'm working on the processing environment, do I need to set up Eclipse for this?

So in short i just need to know where to find the right .jar and where to place it

Tagged:

Answers

  • where is your google ads jar?

  • edited January 9

    For now it is just in the sdk since I do not know where to put it to work.

    C:\Users\Sayid\AppData\Local\Android\sdk\extras\google\m2repository\com\google\android\gms\play-services-ads

    this should be the right one? there's many versions that have .aar packages here

  • that's not the jar.

    in general a jar called myname.jar should be under your sketchbook folder with a path like

    libraries/myname/library/myname.jar

    for instance, the twitter4j library i just installed yesterday is

    /home/koogy/sketchbook3/libraries/twitter4j406/library/twitter4j406.jar

    where

    /home/koogy/sketchbook3 is my sketchbook directory and

    twitter4j406.jar is what i renamed the jar (removing the various non alphanumeric characters in the original name)

  • Thank you! I downloaded the now obsolete GoogleAdMobAdsSdk-6.4.1.jar and have my sketchbook at

    C:\Users\Sayid\Documents\Processing\

    so I renamed the sdk and put it in

    C:\Users\Sayid\Documents\Processing\libraries\admob_ads_sdk\library\admob_ads_sdk.jar

    and now the import is working!

    One more thing is: This googleadmob sdk is now obsolete and the newer version should be in the play-service package, where do I find it there?

  • edited January 10 Answer ✓

    I usually try searching for the name of the package and 'maven'.

    But i'd've thought Google would document their stuff well enough so it'd be easy to find.

  • Sayid, I've run across the same issue you had about locating the jar file. Most recent I've been able to find was a play services jar from revision 29. Have you reached your current success with integrating admob by staying with the obsolete google admob sdk or were you able to locate/create a new jar within the current play-service package? Searching for "play services maven" didn't lead to any jar files for me. Thank you!

Sign In or Register to comment.