Unity Community


Page 1 of 3 123 LastLast
Results 1 to 20 of 46
  1. Super Moderator
    Location
    Vilnius, LT
    Posts
    662

    Mobclix plugin that works with Unity 3.2

    And just to complement Open Feint and Ad Mob plugins for Unity Android, here's the basic implementation of Mobclix plugin.

    Please try it out and share your experience.

    We provide it for free and we'd be really grateful for any contribution that makes sense.

    Regards,
    Unity Android team
    Attached Files
    I know about iOS, Android, Flash and something else
    personal blog: drinkandcode.com
    twitter: iWozik


  2. Posts
    307
    Thank you thank you thank you

    Downloading now...


  3. Location
    Baltimore MD USA
    Posts
    72

    Thanks!

    Thanks much for the pluggin.
    I have it working in my app displaying the 300x250 test ad, but cant seem to get it to display the 300x50 test ads.
    I have them enabled in test mode in mobclix for the app.
    Is there something else I have to do to display the 320x50?
    Thanks for your help.
    Last edited by killsage; 02-17-2011 at 08:29 PM.
    Half Fast Games

    GobbleGator / Tiki 10 Pin / Bella Boo


  4. Posts
    25
    I tried to run the MobclixTest script with the editor set to android, but I get a message saying:

    JNI: Unable to find method id for 'getAd'
    UnityEngine.AndroidJavaObject:Call(String, Object[])

    Am I correct in assuming that you have to run it on an actual phone to get ads?

    EDIT: turns out I was correct
    Last edited by sinxtanx; 02-18-2011 at 01:24 AM.


  5. Location
    Skövde, Sweden
    Posts
    174
    Thanks a lot for this as we are most likely going to use MobClix.
    Magnus Söderberg
    CEO - Triolith Entertainment

  6. Super Moderator
    Location
    Vilnius, LT
    Posts
    662
    killsage, here at Unity we just wanted to make the bootup easier, so we don't support/maintain these plugins we made.
    The sources are provided, so it's the community who should chime in and adapt these for custom needs.
    I know about iOS, Android, Flash and something else
    personal blog: drinkandcode.com
    twitter: iWozik

  7. TMK TMK is offline

    Location
    Norway
    Posts
    82
    Quote Originally Posted by killsage View Post
    Thanks much for the pluggin.
    I have it working in my app displaying the 300x250 test ad, but cant seem to get it to display the 300x50 test ads.
    I have them enabled in test mode in mobclix for the app.
    Is there something else I have to do to display the 320x50?
    Thanks for your help.
    I had the same problem, but solved it by doing this:

    1.) Open up "Plugins/Android/src/MobclixTestActivity.java", and change the following 2 lines:

    Code:  
    1. public static MobclixIABRectangleMAdView adView;
    2.  
    3. ...
    4.  
    5. adView = new MobclixIABRectangleMAdView(this);

    to this:

    Code:  
    1. public static MobclixMMABannerXLAdView adView;
    2.  
    3. ...
    4.  
    5. adView = new MobclixMMABannerXLAdView(this);

    The "new LayoutParams(300, 250)" code doesn't seem to affect it, but you can change that to "new LayoutParams(320, 50)" too.

    2.) This is using a Mac, might be different on Windows, but using Terminal, go to the "Plugins/Android/" folder, and run:

    ant build-jar

    This re-builds the compiled .class and .jar files.

    Note: You have to update the file "local.properties" to point to where you installed the Android SDK, or ant will fail.

    3.) Now build the Android app again and try it on your device.

    I haven't found out how to position the ad though (especially when running landscape mode), or how to make it rotate when you rotate the phone.
    Last edited by TMK; 02-21-2011 at 11:18 PM.


  8. Posts
    307
    Thanks for the info TMK, really useful

    Regards,
    Curious


  9. Location
    Baltimore MD USA
    Posts
    72
    TMK.
    Thanks so much! That was exactly it. Works like a charm.
    Half Fast Games

    GobbleGator / Tiki 10 Pin / Bella Boo

  10. TMK TMK is offline

    Location
    Norway
    Posts
    82
    Great to hear that! Now we just have to figure out how to move the ad around (and how to rotate it when you rotate the phone)


  11. Posts
    98
    It took me a while to figure out the changes for windows. Maybe no one else has tried or everyone is smarter than me.

    Windows users I suggest the following steps on top of TMK's steps:

    1) Create a clean unity project called CleanMobclix and install the above package in there as well as in your game, and run it once to make sure you see the 320x250 ad you should see by default. (Make sure you're connected to the internet or you won't see anything).

    2) In your CleanMobclix project - Open up "Plugins/Android/build.properties" and change external.libs.absolute.dir to point to something like this (wherever you installed Unity to):
    Code:  
    1. external.libs.absolute.dir=/Program Files (x86)/Unity/Editor/Data/PlaybackEngines/androidplayer/bin

    3) Again in CleanMobclix project - Open up "Plugins/Android/local.properties" and change sdk.dir to point to something like this (wherever you installed your Android sdk)
    Code:  
    1. sdk.dir=/android-sdk-windows

    and then follow TMK's steps here:

    Quote Originally Posted by TMK View Post
    I had the same problem, but solved it by doing this:

    1.) Open up "Plugins/Android/src/MobclixTestActivity.java", and change the following 2 lines:

    Code:  
    1. public static MobclixIABRectangleMAdView adView;
    2.  
    3. ...
    4.  
    5. adView = new MobclixIABRectangleMAdView(this);

    to this:

    Code:  
    1. public static MobclixMMABannerXLAdView adView;
    2.  
    3. ...
    4.  
    5. adView = new MobclixMMABannerXLAdView(this);

    The "new LayoutParams(300, 250)" code doesn't seem to affect it, but you can change that to "new LayoutParams(320, 50)" too.

    2.) This is using a Mac, might be different on Windows, but using Terminal, go to the "Plugins/Android/" folder, and run:

    ant build-jar

    This re-builds the compiled .class and .jar files.

    Note: You have to update the file "local.properties" to point to where you installed the Android SDK, or ant will fail.

    3.) Now build the Android app again and try it on your device.

    I haven't found out how to position the ad though (especially when running landscape mode), or how to make it rotate when you rotate the phone.
    4) Finally copy the MobclixActivity.jar from your CleanMobclix project to your actual game and you should see the smaller ads.

    I recommend the extra steps just in case anything goes wrong... as long as you keep a backup of the original MobclixActivity.jar that came with the package you can get back to a non-broken state.

    ...And this is all assuming you've installed the JDK and ANT and added them to your PATH.
    Last edited by JoshOClock; 03-15-2011 at 01:13 PM. Reason: Fixed bad info for local.properties


  12. Location
    India
    Posts
    9
    It gives me 12 error while executing build-jar command...Can anyone help me on this?

    Please see below log for reference.

    Name:  Screen shot 2011-03-07 at 4.59.13 PM.png
Views: 3544
Size:  270.7 KB
    Thanks & Regards,
    Prakash Hirani

  13. TMK TMK is offline

    Location
    Norway
    Posts
    82
    Quote Originally Posted by Prakash View Post
    It gives me 12 error while executing build-jar command...Can anyone help me on this?

    Please see below log for reference.
    Have you edited the file "local.properties" to point to where you installed the Android SDK? I don't remember exactly what kind of error message I got when I hadn't done that, but it was something similar to what you are getting...


  14. Location
    India
    Posts
    9
    Now its working nd I am able to see ads from Mobclix, but how can I set the ads to landscape left orientation?
    Thanks & Regards,
    Prakash Hirani


  15. Location
    Atlanta
    Posts
    45
    Thanks JoshOClock - but step 3 of your instructions should read Plugins/Android/local.properties. Appreciate the info!


  16. Posts
    34
    I'm getting this error when I try to rebuild the package using the instructions for getting the 320x50 ads.

    I'm following the Windows instructions.

    BUILD FAILED
    F:\SoundMaker\Assets\Plugins\Android\build.xml:46: taskdef class com.android.ant
    .SetupTask cannot be found
    using the classloader AntClassLoader[]

    I'm pretty sure I've got everything pointed to the right place, but I can't get it to find that class.


  17. Location
    Skövde, Sweden
    Posts
    174
    Got a question about this. How do we get the application id? And any other id's we need?
    As i understand it you seem to have to upload the app first and get some sort of id from google, then
    add that id to mobclix as an app, do you get the id after that so you can add it to your app?

    I'm confused
    Magnus Söderberg
    CEO - Triolith Entertainment


  18. Posts
    34
    Ugh... when you run the build off of the F: drive, I guess you need to specify that the sdk is on the c: drive, huh?

    Feeling a bit of an idiot now.


  19. Posts
    98
    Quote Originally Posted by Legion View Post
    Got a question about this. How do we get the application id? And any other id's we need?
    As i understand it you seem to have to upload the app first and get some sort of id from google, then
    add that id to mobclix as an app, do you get the id after that so you can add it to your app?

    I'm confused
    Just register on Mobclix.com and then 'Add an Application' fill it out and you'll see your ID in the list. It doesn't have anything to do with Google ID or anything. It's a value your app sends to mobclix for revenue tracking. And can be used for iOS or Android.


  20. Posts
    98
    READ THIS IF YOU'RE USING THIS PACKAGE!!!
    READ THIS IF YOU'RE USING THIS PACKAGE!!!

    Make sure you download the latest SDK and drop the mobclix.jar it comes with over the one that comes with the the unitypackage at the top of this thread.

    The one in the unitypackage requests 'root' as mobclix was using it to do some testing. People won't DL your game if you have that... and likely give you '1 star' to warn others as it appears suspicous.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •