Here are some plugins for Unity that I have written and use myself. From time to time I will be adding more plugins so please subscribe or follow me on twitter.
All the plugins come with a ‘if it doesn’t work as you expected, you get your money back’ guarantee. If you are not completely happy with the plugin, let me know and I will refund your money.
The Unity3d plugins available include Admob and Mobclix ad banner integration, in-app purchasing and coming soon, a social plugin adding facebook integration.
There are some simple tutorial videos on my youtube channel now, so please check them out!
Pingback: Unity AdMob and MobClix Plugins for Android - Plato EvolvedPlato Evolved
Amazing! Integrated AdMob in 10 mins or so. Nice time-saver.
Glad you found the plugin useful, thanks for the feedback.
Is a great plugin because it shows ads…I have done exactly what is written in the “readme” file so I have NOT changed this line “<activity android:name="com.platoevolved.admobunity.AdMobUnityActivity"…". Only one question: why in my admount statistics impression are update while the click are never update?? Thank u so much!!!
That’s correct you should NOT change the activity name line. However you should change the package line (as per readme) to match your application. Also double check that your admob_pub_id matches exactly the one specified for your app on the Admob website. If these match then the clicks should register in Admob against your app, careful testing this since if too many clicks come from you Admob may get upset.
can I change in android folder “GoogleAdMobAdsSdk-6.0.0″ with last version downlodable “GoogleAdMobAdsSdk-6.0.1″ ?
Tnx for quick reply!!
When you have time can you answer to previous question and this question: Do u will continue to update this plugin?
If yes how we can downolad new version?
Thank you so much!!
I will be releasing an update to the Admob plugin next week and will recompile with the latest Admob SDK. It will also include the option for different banner sizes. I will post on my main page when it is available.
I have added ios admob integration. When I build in unity I have noticed that tha plugin is compatible only with arm7 ios devices but on iphone this make the game much slower…It’s normal?
The plugin library is actually built with armv6 support but this doesn’t seem to work in a lot of cases. Apple (and Google) seem to be dropping all support for armv6 going forward (xcode in mountain lion!?), so supporting these older devices is only going to get more difficult. Arm7 making a game slower is apparently because it defaults to opengl 2, there are ways around this, google is your friend…
I have purchase android admob plugin and ios admob plugin. They are AMAZING plugin!!! On android works perfect but on ios I really need your help to make the game faster on arm7.please help me..also send me a private message!! Thank you a congrats for your works!!!
I bought the In-App -Billing purchase and I wonder if buying the Facebook Androi connect will work plumb the project.
Please need this answer soon because I want to get your facebook plugin + Android
Tanks
Regards Leandro Binotto
Yes it should work fine, you will need to do some manifest merging, but apart from that it should be pretty straightforward!
Using The AdMob plugin have I also to do stuff with eclipse or I just use the plugin in unity and then build normally my application? Thanks in advance for the answer!
No you don’t need to do anything in eclipse. There is a readme.txt included with the plugin that explains the (rather simple) steps you need to get it all working. Basically all you need to do is edit a couple of lines in the AndroidManifest.xml file using a text editor and you are good to go. Here is the readme.txt if you want more details.
Can I use both admob and mobclix plugins in the same app ?
Sorry, no, not at the moment. However I may support this in a future update, please subscribe to the site if you would like to be informed about updates to the plugins.
Thanks! Awesome plugin!
Glad you like it. Thanks for your purchase and feedback.
I have a small question, in the Bundle identifier on the XML do i need to edit:
“<activity android:name="com.platoevolved.admobunity.AdMobUnityActivity" to my personal identifier also?
Or JUST edit the first line "package"?
No, don’t edit that line, that needs to stay ‘as is’. JUST edit the first line and you should be fine. Thanks for your purchase, let me know if you have any problems getting it to work.
Works PERFECT!!!
Hi, again
I manage to get my ADS display correctly, and using some code of your Demo.cs i managed to turn on and off whenever i want to.
But can you please tell how to change the default visibility?
I want the ADS always off until i call them to be visible.
Since i am using unity FREE, the ADS are always displayed in the “powered by unity” scene. And i can’t control that.
I really need to turn them off by default.
Please help me.
Very quick to get this plugin up and running. Will there be an option to Reload() or RefreshAd() in the future?
Glad you got up and running quickly with the plugin. Yes, RefreshAd() is on my ‘ToDo’ list (José requested this also), I will let you know when it’s done.
I would really appreciate refreshAd() as well. Thanks!
I just bought your AdMob plugin, but I don’t see any download links? I didn’t have to have an account to purchase it, so I wasn’t logged in into anything at the time. I expected a link sent to my email, but all I got was a receipt.
Ah, nevermind! It took a few minutes longer than I expected =)
I’ll get back with a response for future shoppers soon.
Hola !
Quiero comprar el In App para android plugin, pero no tengo la licencia pro de unity, solo tengo la que sirve para compilar para android.
Con la licencia normal sirve ?
Y por ultimo tengo que hacer algo con eclipse o me puedo manejar solo con unity ??
Desde ya muchas gracias!
Saludos!
Hola,
Lo siento si esta traducción es un poco duro (estoy usando el traductor de google!).
Usted sólo necesita “Unity Android para los plugins para trabajar. Usted no necesita la versión Pro.
Usted no necesita Eclipse, aquí están las instrucciones de instalación, es muy sencillo!
Hola!
Es realmente muy rapido, muchas gracias!
Pero me surgió un problema, cuando lo cargo en la consola del desarrollador la apk.
Me da el siguiente problema:
“Google Play requiere que se establezca el código de la versión en un número entero positivo de 32 bits en AndroidManifest.xml.”
cambie en AndroidManifest: <?xml version="1.0" y lo puse asi <?xml version="1" pero en este caso, Unity no compila.
Que puedo hacer ?
Hola,
Me volvería a ir al archivo de manifiesto original en el archivo del paquete de plug-in, no hacer cambios y probablemente encontrará que trabaja muy bien, ni siquiera estoy seguro de que con la versión más reciente de la Unidad, incluso se tenga que cambiar ese archivo en absoluto, así que vale la pena probar.
Tenga en cuenta que nunca debe cambiar Xml version = “1.0″.
La versión que se está hablando es el siguiente:
android: versionCode = “1″
Pero como he dicho antes, ir con el archivo original desde el plugin y que debe estar bien.
Tenga en cuenta que estoy de vacaciones la próxima semana, por lo que esta puede ser la última parte de apoyo, por un tiempo, me disculpo.
Si usted no puede conseguir el plugin para trabajar yo te daré un reembolso completo cuando vuelva (en las próximas semanas).
¡Buena suerte!
And in English (just in case):
Hi,
I would go back to the original manifest file in the plugin package file, make NO changes and you will probably find that it works just fine, I’m not even sure that with the latest version of Unity, you even need to change that file at all, so worth trying.
Note that you should NEVER change
The version it is talking about is:
android:versionCode=”1″
But like I said above, go with the original file from the plugin and you should be fine.
Note that I am on holiday next week, so this may be the last bit of support, for a while, I apologise.
If you can’t get the plugin to work I will give you a full refund when I get back (in a weeks time).
Good luck!
Sorry message got a bit scrambled, here is the correction:
Note that you should NEVER change: xml version=”1.0″.
Mensaje no tiene un poco revueltos, debería haber leído:
Tenga en cuenta que nunca debe cambiar xml version = “1.0″.
Hola,
Tengo dos consultas.
1-Compre los dos plugins, in app y admob, se pueden usar los dos en un mismo proyecto ?
2-Se pueden cambiar los tamaños de los anuncios ?
Gracias,
Yes you can use both in app and admob in the same project (I do this in my own game).
You will need to merge both AndroidManifest.xml files, I can send you an example file and help with this.
At the moment you can’t resize the ads but I am working on supporting this in the next version which should be available in the next couple of days.
Rough Translation:
Sí, puedes usar tanto in app y AdMob en el mismo proyecto (lo hago en mi propio juego).
Usted tendrá que combinar los dos archivos AndroidManifest.xml, puedo enviarle un archivo de ejemplo y ayudar con esto.
Por el momento no se puede cambiar el tamaño de los anuncios, pero estoy trabajando en el apoyo a esto en la próxima versión que debería estar disponible en el próximo par de días.
Que bueno que se pueda!
Muchas gracias!
Ahora voy a intentar.
Saludos!
Hola PlatoEnveloped!
Al parecer in app purchase funciona perfecto.
Me compré a mi mismo un producto y anda bien pero no puedo hacer que el producto aparesca en mi juego.
Hice lo siguiente:
foreach(PurchaseInfo pinfo in AndroidPurchases.Instance.PurchaseInfos)
{
if(pinfo.productId == “1″){
Acá debería sumar el producto
}
Pero no funciona.
Como puedo hacer?
Gracias
Saludos!
Just got the admob plugin up and running and it works PERFECTLY! Thanks a ton, Plato! You’re a hero in the world of plugins
One quick question…
Is there anyway to refresh the ads rather than just hide/show them. I feel like I would be able to make more money/impressions if there were a refresh feature on there. Right now, I only get one ad that lasts the entirety of the game until the game is completely restarted. Thanks again for your help!
“Glad you got up and running quickly with the plugin. Yes, RefreshAd() is on my ‘ToDo’ list (José requested this also), I will let you know when it’s done.”
He is working on it.
Hi Alex,
Thanks for the great feedback, much appreciated. Sorry for the brevity of the reply, currently on the isle of man watching motorbikes go too fast! A refresh feature is on my list of additions, I will let you know when it is done, next week with a bit of luck.
P.E.
Awesome! I’m releasing a game very soon and that fits right into my time frame. I’ll polish everything up until then. That refresh feature will complete this plugin. Once I grab that I’ll rant and rave about the awesome ease of use and reliability of your product! Thanks again!
Just noticed that on the Admob ‘App Settings’ page (on http://www.admob.com), you can set a refresh rate. I will still add a RefreshAd() function for added flexibility but getting it to refresh on the server side will probably suffice for a lot of people.
Ha! Look at that! Don’t know how I missed that with all the playing around I did. I have a set refresh rate now. Thanks! Bumping some threads and spreading the word of your plugins
Your work is greatly appreciated.
is there a way to show or hide the ads in using JS.
Yes, the syntax is just slightly different:
var jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer”);(“currentActivity”);
var jo = jc.GetStatic.
jo.CallStatic(“ShowAds”);
Note the additional period after GetStatic. Hopefully this is enough to point you in the right direction.
hi, trying to show/hide ads from java script.
im getting unexpected token ”
if i remove the period after getstatic, im getting cannot infer generic arguments for method………
kindly provide a JS version of the demo script if you can….
Sorry for the delay in replying, had a day off! Here is some Java code, not my language of choice but knocked this up in a couple of minutes and it tested fine…
I get an error “failed to compile java code to DEX”.
I simply created a new project, imported the package, changed package name and added my admob id…
Any idea what this could be?
Hi, thanks for your purchase. I would create another new project, import the package and amend nothing, check it builds without errors, then just change one thing at a time (by following the ReadMe.txt). My guess is you have probably figured it out by the time I’ve written this anyway!
thanks for your help, like your plugins
and well, have you in mind to create the same pluging but for facebook ?
i really like to buy something like that but with your plugins easy insllation and use
nice job
Glad you like my plugins, thanks for the great feedback. I definitely want to expand the number of plugins I have. Currently I’m finishing an Admob plugin on the iOS side but since Unity supports iAd now, not sure if there is a big demand. Much prefer doing plugins for Android, so I will take a look at the facebook sdk and see what is involved…
Would be nice to have a visual of the in app purchase plugin. No demo version, no movie, no explanation of how it would be used. I’m very interested in the in app purchase plugin, but how can I know if yours fits me ?
Do you refund ?
Yes, you make some good points here. I’ve been wanting to do a video tutorial on each of my plugins and think that now might be a good time to start! Should have something later this week with a bit of luck. I will always refund anyone who can’t get the plugins to work or aren’t happy in any way, I will make this clearer on the website. Demo versions are a bit tricky to handle, I think with the tutorials and the refund policy they won’t be necessary.
Video tutorial would be good enough
When trying to call your plugin I get the following:
JNI: Unable to find method id for ‘StartInAppBilling’ (static)
UnityEngine.AndroidJavaObject:CallStatic(String, Object[])
AndroidPurchases:StartInAppBilling() (at Assets/Plugins/Demo/AndroidPurchases.cs:128)
AndroidPurchases:RestoreTransactions() (at Assets/Plugins/Demo/AndroidPurchases.cs:182)
AndroidPurchases:Load() (at Assets/Plugins/Demo/AndroidPurchases.cs:86)
ControllerMode:Start() (at Assets/Scripts/ControllerMode.cs:11)
Any idea?
Yes, you have to deploy to an android device for the plugin to work. It won’t work within the Unity Editor (although there is some code to spoof working, for easier testing). Video tutorial coming…
I tried deploying to android, but it still gives me errors. I have got a logcat log that I could send you if I know where to
A video would be really nice. I bought the plugin, but it is not completely clear to me what exactly I need to do or what to expect.
I’ve never seen the in app billing at work, so I’m not even sure where I’m aiming for.
Hola,
El plugin anda perfecto!!
Le quiero hacer una consulta,
Se pueden agregar mas banners ?
Desde ya muchas gracias!
Saludos!
Hi,
Just bought the Mobclix Plugin. Got errors. Basically it cannot find and of the api’s. Got error message like this;
I/Unity (19426): (Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/Export/Generated/UnityEngineDebug.cpp Line: 34)
I/Unity (19426):
E/Unity (19426): getMethodID(“SetPosition”, “(Ljava/lang/String;Ljava/lang/String;)V”) FAILED!
I/Unity (19426): JNI: Unable to find method id for ‘SetPosition’ (static)
I/Unity (19426): UnityEngine.Debug:Internal_Log(Int32, String, Object)
I/Unity (19426): UnityEngine.Debug:Log(Object)
I/Unity (19426): UnityEngine._AndroidJNIHelper:GetMethodID(IntPtr, String, Object[], Boolean)
Basically it could not find any of the APIs. I’m running unity 3.4.2 and 2.3.3 api 10
Hi,
You need to deploy to an actual android device for the banners to work. The banners won’t work in the Unity Editor. Read the included ReadMe.txt in the plugin package, follow it religously, and you should be fine.
Yeah,
Actually that’s what I did. It is being deployed on an actual device. A Samsung S Advance. And I did read the readme file and follow it step by step. Though I had to modify the Android Manifest to allow unity to compile bcoz for some reason it had a repackaged failed problem.
Anyways, I suspect the problem is in my modified android manifest file. I’ve tested natively in eclispe runnning a pure android (non unity) mobclixdemo and it seems to work just fine on the device. I’ll give further details of my findings here.
Figured it out. The problem is the manifest file or specifically my modfied manifest file. The default manifest file failed to be repackaged in my current version of unity, even after changing the package name. I did a cut and paste with the Unity default manifest and but ignored changing the package name. But now we the modified manifest fle and the right package name, works like a charm. My first unity and/or android app. Thanks. so far seems like a good plugin.
Excellent! Glad you got it all working. I found that the latest version of Unity seems to merge the package name in automatically so you actually only need to amend the Mobclix application id (see demo video).
However you got it all working so that’s the main thing. Good luck with your game.
Ok. Got a new problem. It seems that if I push and run it through unity to the device, the ad shows up but once I run it standalone. The ad doesn’t show up anymore with the getmethodid failed (seen in adb logcat). This happens even with the demo app. Any clues?
Nevermind got the LAUNCHER intent declared twice. Gotta really learn this manifest thing. Sorry to bother you
No problem, the main thing is to keep at it, don’t give up, you only ever learn from mistakes (which means I should have learnt quite a bit by now!)
How do you get Unity admob iOS to work in landscape mode? I mean how do you rotate admob 90 degrees to display properly in landscape mode.
Great plugin btw.
Yes, sorry about that, there was a bug in the first version that is now fixed. Hopefully you got the link I sent you to the new version, the ads should now match the current orientation of the game view.
Thank you very much. It works perfectly.
I just saw your in app purchase (amazing how easy it works) and am willing to buy it next week, just got a few questions
can I use it in all my games or I have to buy a license per game?
which type of payment do you accept? (I’m thinking of paypal but not sure how you work it)
basically thats it since I can’t find a terms of service I ask it here
Thank you and great work
Hi, thanks for your interest. Purchasing the plugin through my store (it accepts paypal) enables unlimited use of the plugin within your games. However you aren’t allowed to resell the plugin or claim it as your own (pretty standard stuff). I don’t have any explicitly stated terms of service since only indie game developers would want my plugin and they are all awesome.
could you give me a user manual first, because my android developer skill as poor as my english.
Sure here is a link to the Admob Android Plugin Readme, let me know if you need manuals for the other plugins.
thanks a lot, i need the manual for In-App Purchasing Unity Plugin for Android. could you give me the link and help me to use the plugin.
briefly,I need the manual or Readme for In-App Purchasing Unity Plugin for Android.
No problem, here is a link to the In-App PurchasingReadMe and a youtube video that goes through the whole process.
Awesome! thank you very much! I will buy it As quickly as possible。
Help me!I hava JDK and javahome = C:\Program Files (x86)\Java\jre6; BUT,
Unable to run ‘jarsigner’; do you have the JDK installed?
System.ComponentModel.Win32Exception: ApplicationName=’jarsigner.exe’, CommandLine=’-digestalg SHA1 -sigalg SHA1withDSA -keystore
Not sure at what point you are hitting this error? It may be that you need to add the JDK path to the PATH variable, see this link. Also it looks like it may have been a problem with an earlier version of Unity (3.1?), make sure you are at least up to Unity 3.4.
Unity 3.5.0f5, jdk 1.7 and PATH variable no problem But also have 3 Errors,Unable to run Unable to run ‘jarsigner’,keytool error:and Error building Player: UnityException: APK Signing Failed!
If you remove the plugin can you sign and deploy the app? It sounds like a generic Unity signing error that some people seem to be mentioning in the Unity forums, it may be worth logging a bug report with Unity. Some people have mentioned reinstalling the JDK as a solution…
Hi!
I bought your plugin (admob for android) and now is working, but I want to know how can I put the ads below the game, not above…
Now the ads are showing above the game, and they covers my GUI.
Thank You!
Hi, the easiest way to move the ad banner to the bottom is to edit the AndroidManifest.xml file (Plugins\Android folder). You want to change the following line:
android:name=”adposition_y” android:value=”top”
to
android:name=”adposition_y” android:value=”bottom”
Simple as that!
Hi!
Maybe I made a mistake in my question…
What I said is that my ad is covering my game… I have the value “bottom” but what I want is have a “linear layout”… I mean my game, and then the ads… (Now I have like 2 layers: The game in the background and the ads in front at the bottom).
Thank You!
And sorry for my english, Im spanish
I see what you mean, essentially you want 2 windows, 1 for the game, another for the ad banner, so the ad banner would ‘squeeze’ the game window up instead of being on another layer.
Sorry, I don’t support such functionality in my plugin. One solution would be to hide the ad banner while ‘in game’ and only show ads when paused or at a menu (I do this in my game).
Thank you, it works perfectly
I need one more thing… My ads are showing in the “Unity” splash screen, and i need to set the ads off, until I call on in my game…
How can I make this?
Thank you!
Good, glad that worked. I have added an option in the latest version (v1.01) to hide the ad banner at startup. I’m just squashing the final few bugs and it should hopefully be available later today.
i need the manual for In-App Purchasing Unity Plugin for Android. could you give me the link and help me to use the plugin.
I have added links now, on this page, to the ReadMe and the youtube tutorial video, hopefully this should help you get started.
Hi, I am considering putting in-app purchases on one of my games. Can your plug-in be used for virtual currency? (In-game ‘platinum’ that can be used to earn in game items?)
Thanks!
Adam
My plugin essentially implements the standard google in-app billing API specified here. You can use the plugin to sell a user virtual currency but it would up to you to implement the handling of this currency within your game. Hope that makes sense.
Thanks for the link. I read about “unmanaged” purchases, and now it is clear to me. I also noticed in your blog that you offered to help someone create a manifest for both the admob and in-app purchase plug-in. (used in the same app) Do you have any link to this?
Thanks again!
Adam
Correction: I would like to integrate MOBCLIX and in-app purchase.
Thanks!
Adam
Are you gonna update the iOS Admob plugin? I want it now!
PS: Best plugin (And developer) ever!
Thanks for the great feedback! Yes I will look at updating the iOS Admob plugin next week.
lot of coments XD.
just an idea….
Could be nice if you make separate pages for the the comments of the plugins.
I am still using your ad mob plugins and is great
and i am thinking on buy later the facebookm pluging
Glad you are still using the admob plugin, sent you the update so hopefully you will find the new features handy. Yes you are right, I should get a bit more organised, each plugin does deserve its own page with hints, links to videos, comments etc, been meaning to do it for a while now… The facebook plugin is pretty cool, yet to add it to my own game (so much to do!) but starting to get good feedback on it.
hi~ i bought In-App Purchasing Unity Plugin for Android. i know AndroidPurchases.PurchaseItem(purchasableitem)
can pruchase. how did i know wether it success?
Worth checking out the youtube tutorial video here.
At 7m35s in the video, the OnPurchaseResponse message is the indication that the purchase was successful, this comes from the callback inside the UnityGameObjectReceiver.cs
thanks you!
Awesome plugin! I’d highly recommend to any developers wondering which admob plugin to get.
Thanks for the super easy plugin!
Just got the MobClix plugin; haven’t been able to get even a peep out of this thing.
Unity 3.5.5, Android 2.3 and 4.0
I’ve tried it in a brand new scene, followed the readme.txt to the letter. In log-cat I see the following lines indicating that _something_ is happening:
Displayed com.grahamjans.demo/com.platoevolved.mobclixunity.Mobclix
And
createSurface Window{41f440d8 com.grahamjans.demo/com.platoevolved.mobclixunity.MobclixUnityActivity paused=false}: DRAW NOW PENDING.
But in the actual app, I see absolutely no ad box.
Thoughts on next steps for debugging this?
Sorry you are having problems with the Mobclix plugin. First thing to try is importing the plugin into a completely new unity project and not touching a thing, just deploy to an android phone and hopefully you should see the test ad. See the youtube video for a more thorough walkthru.
If this works (which hopefully it should since there’s not much that can go wrong), it should give you a place to start looking for conflicts with your game (usually other plugins). If you still can’t get it to work, let me know and I will try to help further or issue a refund.
Salve
come faccio ad integrare l’androidmanifest.xml del vostro plugin adMob per unity e android con un altro plugin che ha il seguente testo??
Sorry, the rest of the text didn’t come through, presumably you tried to include some xml but wordpress hates xml! I will send you an email and you can attach the manifest in the reply.
Just got the social unity android plugin and my screenshots are blank ( just a solid colour of what ever colour the Main Camera background is set to)..
This is from the included demo.
I did change the line in the AndroidManifest.xml
From:
to
And build my android apps in unity for :
Minimum API level 6 ~ Android version 2.0.1 Eclair
ArmV6 with VFP
OpenGL ES 1.x
Also I bought the plugin from this website and not the unity asset store so how will updates be delivered.
Thanks.
EDIT:
I noticed the line from the AndroidManifest xml file didnt show in my comment.
I change the line:
uses-sdk android:minSdkVersion=”8″ android:targetSdkVersion=”16″
to
uses-sdk android:minSdkVersion=”6″ android:targetSdkVersion=”16″
Are you seeing the GUI buttons when running in the Unity editor? Might be worth commenting out the code in Start(), if that doesn’t work, try deleting the AndroidManifest.xml, at that point you are back to a standard Unity app so should work(!)(and would point to a faulty manifest file). I recommend Unity 3.4 or above, earlier versions could cause you problems.
), if you need the new version just email with proof of purchase and I will send you the newer version.
Any updates to the plugins I will write a post about (so subscribe
I did give a long and detailed reply but maybe it got spam filtered as it had numerous links to various unity forum posts in it.
I can see the GUI buttons when running in the Unity editor, I am using unity 3.5
I tried commenting out the code in Start() and tried deleting AndroidManifest.xml and these made no difference, I still get a blank (solid colour) image sent to facebook.
Some say this is a fault with unity for Android, others say you need to wait for the end of the frame being drawn before creating the screenshot.
Can you fix this?
Thanks.
Hello.
I got the email and that fixed it 100%.
Dont forget to update the package!
Thanks for a great plugin.
Hello! Does the In-App Billing for Android plugin also include java source code ? Thanks!
Hi Andrew, no the source code isn’t included, you just get a working in-app billing solution for a ridiculously low price!
Hi,
I have a question. I tried the admob plugin and after changing the xml file with the admob id and the coordinates of the banners, it works for me.
But I have multiple levels on my game and for each level I need to change the position of the banner and I don’t know how to do this. I tried the gui in the demo scene and it worked but how can I implement it in my game?
I tried to create a game object and put the script in it but when I play the game the gui appears. How can I change the position (and the other options) of the banner with the gui?
Sorry for my english.
Hi Luigi,
You simply would call (obviously change strings to position you want) AdMobUnityPlugin.SetPosition(“middle”,”top”) in the Start() method of a script attached to a gameobject specific to that level.
Hello again
I can see that you updated the admob plugin for android with the “hideonstart”. Did you add a “refresh banner” also? That would be awosome
Hi José, good to hear from you. Yes the new version of the admob plugin includes a refresh option. Note that you can set the ads to refresh every n seconds from the admob.com site (manage settings->app settings). Probably better than doing the refresh in code all the time. I have emailed you the new version.
Hi,
I saw ur facebook plugina nd liked it very much. I am considering purchasing it but i want to that is it possible to add something like “if the user like my page in facebook he will unlock something in the game” Actually this is my first game and i want a like function along with the post function in order to promote our game.
Thanks looking for your reply
P.S Also do u have any bundle offer where i get a discount if i purchase lots of plugin together. Something like that would be nice
Anyways.. thanks a lot for the videos and plugins. I was considering getting prime31 but ur seems pretty easy to me. I am new to coding stuffs so simple works best for me..
Thanks for the comment, the Graph API (which my plugin enables with Unity) does support ‘likes’, see this link.
However I haven’t tested this yet but will put it on my ToDo list and maybe include a demo of it in my next release, I would actually like to add this to my game so it is high on my priority list.
A bundle is a great idea and I’ve been working towards a release, hopefully within the next few days (so if you can wait a few more days, it may be worthwhile
), the bundle will include the Admob, In-App Billing and Social Plugins. Haven’t decided on a price yet but there will be a decent saving involved and you also don’t have to worry about merging manifest files, they will all work together out of the box (the box is virtual, actually it doesn’t exist)!
Hi,
does this plugin support full screen ads?
No, however the Android Admob plugin now supports all the sizes that the Admob sdk supports see here.
Tnx on reply… Will you add this feature anytime soon or will I be able to upgrade plugin for my needs?
I will post to this website when I release new versions of a plugin, usually it’s a case of emailing me with the original order details (as proof of purchase) and I send the new version by email. Can’t make any promises at this stage about new versions but if you subscribe to the website you will be one of the first to know!
Hey! I love your Android plugins and got them up and running really quickly.
I was wondering if there is a way for the Android IAP plugin to overlay the purchase dialog over the game screen instead of going to a separate black screen like it currently does?
I was also wondering if you have any plans to create a Twitter integration plugin?
Thanks again for your plugins. They’re really useful, and the price is great.
Thanks for the great feedback, much appreciated. Not sure I can do anything about the separate black screen but I will keep it in mind next time I’m digging around in the code. Twitter integration is something I plan on adding to the social plugin at some point but I’m afraid I can’t specify a timeframe yet. You will get it for free when I do eventually add it though
Thanks for the speedy reply. I’ll be keeping an eye out for the Twitter addition!
AddMob sdk version 6.2 came out two days ago , is this plugin working whit it still?
Yes it still works fine, they didn’t break backwards compatibility.The official line from Google is ‘Once most users and apps transition to iOS 6, we plan to phase out usage of UDID’. Which means realistically they will support UDID for a few more months. I will update the plugin before they phase out the UDID.
Hello, I have the plugin AdMob prime 31. There will be trouble if the same project be buying YOUR plugin?
You will need to merge manifests, see here. Otherwise you will probably be ok…
hi,i have submit my app demo to Google Play, but how can i test In-app Billing , follow your video i saw you only click Buy Button and not need input credit card, I want to do what???
You need to set up a test account see here and here.
You still have to put in your credit card details, however you can refund the money (to yourself).
Hello, I have bought your plugin for iOS in game purchases, but i have problem when I’m trying to compile my game I got error message:
Undefined symbols for architecture armv7:
“_OBJC_CLASS_$_SKProductsRequest”, referenced from:
objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
“_OBJC_CLASS_$_SKPaymentQueue”, referenced from:
objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
“_OBJC_CLASS_$_SKMutablePayment”, referenced from:
objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
ld: symbol(s) not found for architecture armv7
Can you say me from tthis what I’m doing wrong?
How should I fix it?
Thanks..
Make sure you are deploying to an actual iOS device (iphone, ipad etc), the emulator won’t work. If you are doing this, try importing into a new blank project and checking if it compiles ok. You may need to set ‘Target Platform’ in Unity to ‘armv7′.
Failing all that, let me know your Unity and Xcode version numbers (should be fine on Unity 3.5.x and Xcode 4.5.x) earlier versions of Unity had problems…
Hello I have solved this. There was a problem with linked libraries. There wasn’t included framework for StoreKit. But now I have a different problem. In editor, everything run just well. If I use IOSPurchases.Load() Pop up window for LogIn appears, but there is a message:”:Ignoring restoreCompletedTransactions because already restoring transactions”.
When I log In it looks ok, but there is empty list in IOSPurchases.PurchableItems and if I try to make a purchase message like
2012-11-09 13:59:00.302 …[2215:332] Transaction error: Cannot connect to the iTunes store. Can you give me some help what I’m doing wrong? I just run IOSPurchases.Load() when I got into scene and I just try to call IOS.PurchaseItem(name) when user click on button and IOSPurchases.HasPurchased(name) is false.
hi.i’m back. now ,i have another Android plug and it also have a “AndroidManifest.xml”, how can i merge your plug’s AndroidManifest.xml ?
I’ve written a post here on how to merge manifests. Hope it helps!
“public void OnPurchaseResponse(string message)” this method can receive “error or cancel message” from GooglePlay? my code need get GooglePlay return message’state, how can i do it?
when i enter into pay interface and cancel at once, wo can’t get any message from OnPurchaseResponse . please help me
When a user cancels from the checkout page, the ‘OnRequestPurchaseResponse’ gets called (on the UnityGameObjectReceiver) and the message string will be ‘RESULT_USER_CANCELED’. I just write to the log in the demo so you can see what is happening but you can put code to handle this situation (if you need to) in the ‘OnRequestPurchaseResponse’ method. Hope that helps!
Hello,
I purchased your admob plugin. When I import your admob plugin to my project and than build it. On my Android device it will ignore landscape mode. Whole application GUI is than stretched. It seems that there is problem with loading application. During application loading is splash screen Portrait but whole game is landscape. I am using the latest version of your plugin.
When I delete plugin folder than it works perfectly again.
Hi, you need to amend the AndroidManifest.xml file (the one you amended with your Admob ID), change android:screenOrientation=”portrait” to android:screenOrientation=”landscape”.
It worked perfectly. Do you have any example how to combine two AndroidManifest.xml? I want to have Admob and InApp purchase. They will have ads and when they pay $1 ads will be turned off and they gain small bonus.
Thanks for any help.
Yes check this link for examples of combining manifest files. As for ad removal something like:
if(!AndroidPurchases.HasPurchased(“adremoval”)) AdMobUnityPlugin.ShowAds();
Setting start_hidden to true in the manifest file.
The best support ever… it worked thanks
I cannot click on that ads using your plugin…. do you know how to solve this problem?
Yes, at least one of the plugins needs to set itself up as the main launcher activity otherwise it can’t respond to clicks, I will add this caveat to the merge manifest post, so check that out for more details.
I understand what you mean but I don´t know how to do that
.
So when you will have new info please let me know…
After i buy your plugin . Where i can get update version when old version don’t work ?
There are currently no known issues with any of the plugins, they should all work. Could you let me know which plugin you have and the problems you are having?
Hi I couldn t find iOS plugins, did you remove them?.. Only Android plugins are available
Hit some orientation problems with the Admob iOS plugin so thought it was best to pull the iOS plugins for the moment. Hopefully I will get some time to fix them but can’t currently give a time frame…
hey i have both your app today and i import it to my unity project the test work find when i change the manifest filed to my id no adds shows up it just shows my background what ever the camera sees.
If you have multiple plugins you will need to merge manifest files (there is a post on my website on how to do this). I would import just one, say the Admob plugin, get this working then import the next (which will overwrite the other’s manifest file) get that working then do the merge so that they both work.
ok i have a complete new project i made with unity i import the AdMobAndroidplugin_01 and change the manifest file to my developing ID and i still see no ads.
What Android device are you deploying to?
android but never mind it too like 5 min for adds to show up thanks a lot i works grates buddy
Hi.
I did buy this, but I can not get it to work.
The documents on this app is very poor and do not show much.
I can not get the hash key and the video you made are not how it look for me.
I can not see any hash key at all. It just say that its miss configure.
Can you fix this and also show how to set it up in facebook.
My facebook place do not look like the one in the video
Sorry you are having problems getting the facebook plugin working. Since the plugin supports the facebook graph API most of the documentation is done by facebook. They have excellent documentation on setting up your app on facebook here. They also have an alternative way of getting the hash key well documented here (but my way on the video is easier
).
No problem.
I did solve it after some time.
It was easy.. I just wrote something in the hashk ey field and then it did work like you show.
Then I use that key I got from the app and put it at facebook instead for the hash key I did write.
Now I shall read about how to use it.
First I just want to be able to push a button to post a screenshot with a comment(link to my app) on the persons wall.
Does this work with Unity 4.0?
Not officially yet since I haven’t personally tested them. However I know that some of the plugins are being successfully used in Unity 4.0 (Android In-App Purchasing for certain). So if you want to take a chance (since the plugins are cheap!), I will issue a refund if you don’t have any luck.
Took my chances and what do you know, it works in Unity4! Thanks!
The admobs android plug-in works great. I had an issue at first with Bluestacks, the ads were not showing up. But it worked when I put it on an actual device.
Hello,
in app billing plugin throw this error…
java.lang.RuntimeException: Unable to start service com.platoevolved.inappbilling.BillingService@411eb7b0 with Intent { act=com.android.vending.billing.PURCHASE_STATE_CHANGED cmp=com.Jan_Slegl.NinjaRunner/com.platoevolved.inappbilling.BillingService (has extras) }: java.lang.NullPointerException
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2376)
at android.app.ActivityThread.access$1900(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.platoevolved.inappbilling.Base64.decode(Base64.java:419)
at com.platoevolved.inappbilling.Security.generatePublicKey(Security.java:201)
at com.platoevolved.inappbilling.Security.verifyPurchase(Security.java:126)
at com.platoevolved.inappbilling.BillingService.purchaseStateChanged(BillingService.java:497)
at com.platoevolved.inappbilling.BillingService.handleCommand(BillingService.java:387)
at com.platoevolved.inappbilling.BillingService.onStart(BillingService.java:364)
at android.app.Service.onStartCommand(Service.java:438)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2359)
Might be worth moving AndroidPurchases.StopInAppBilling() to OnApplicationQuit(), it may be that the service is getting shut down too soon.
Thank you, I have it but not in every scene….
BTW that LVL code for publishing? I cannot find it in publishing for Android, where is it?
Hi there,
I’ve installed the Admob plugin for Android, changed the Admob ID field to my user ID and got ads to show on real devices which is brilliant.
I am however having a problem with the test ads and cant get them to display, to stop creating false impressions. Do you have any idea why the test ads wouldn’t be showing? I’m leaving the ID field set to the default field. I noticed in the Mobclix tutorial vid the default ID field is different, could it be something to do with that? Or is there something else I need to change in the manifest? I’m also testing on real devices. Any assistance would be greatly appreciated.
Thanks!
Yes you can force the plugin into test mode using an undocumented method ‘SetTestMode’ which takes a test_device_id string. I will do a post on it tomorrow on my website (after I’ve double checked it works and reminded myself how to get the device_id!).
Nice plugin! Please add support for multiple Ad formats. Or even better support for auto-width ad format so both on mobile and tablet user will see ad across the full display width.
I have found AdMob SDK supports SMART_BANNER for wide-screen ads (by SDKv6). Are you going to support that?
Hi, glad you like the plugin, smart banners are supported, see demo code for details, refresh rate can be set on the admob site (Manage Settings), hope that helps.
Hi,
First of, great plugins you have!
I have recently purchased this plugin and I am stumbling on a little problem with this one. I get the following error: “you must have ad activity declared in androidmanifest.xml with configchanges”.
Sounds like you may be using my Admob plugin with another plugin that has overwritten the manifest file. You will need to merge them. Here is a post all about how to do that. Good luck, let me know how you get on.
Hey Plato!
First off, still loving this plugin. Quick question for you though…
I haven’t checked up on this website in a long time and I noticed you have made a few updates since last year. I was wondering if those updates are free if I already paid for the original one or if I would have to pay again for the update? (I’ll probably be snagging the in app purchase plugin soon anyway.)
Thanks!
~Alex
Sorry, one more question…
I’m definitely going to be buying your in app purchase plugin in soon. If I’m using it to handle virtual currency (let’s say 5000 beans for $1.00), how will I handle the different responses using JS? I figured out your admob plugin with JS very easily because I used to be great at C#. “Used” to be, haha. I’m assuming the purchase part would be pretty obvious, like in your video, but what about refunds? Is it possible that a user could get a refund in which case I would have to subtract virtual currency from their saved data/key?
In the meantime, all developers should download Plato’s admob plugin. It’s more than worth the money!
Sorry for the delay, this one slipped by me. The Google Play API (v2) doesn’t support refunds (see here). I am going to do a post on handling ‘UnManaged’ items (like beans!) later today, hopefully there will be enough of a C# example to avoid the need for you to translate it all into JS! It’s actually potentially only adding one line of code. Thanks for the kind words, much appreciated.
Hi Alex,
Thanks for the comment, I have emailed you v1.01 of the Android Admob plugin.
Kind Regards,
Morgan
Thanks, Morgan!
Will be tagging you in a post when I announce the game online
Hello,
Great plugins (I use Admob and InAppBilling for Androids): simple and get things done.
A question: is there a way to retrieve product and price list from google play using the InAppBilling PlugIn?
Glad you like the plugins! The current version of the InAppBilling plugin supports v2 of the Google Play IAB API. That doesn’t support retrieving product details and prices. However their new API (v3) does. Hopefully I will get a new version out of my plugin that supports these new features within the next few weeks (I’m shooting for end of Feb).
Hello,
I just purchased your Android IAP plugin for Unity.
It works pretty well for what i’m expecting to do (buying a premium package to remove ads and unlock full game feature) but i dont manage to get the buy result for buying some usable things like gold, potions and weapon pack.
i thought i could use UpdatePurchase() after a payment, but it does not seem to be called. So where can i plug the result of the store action after coming back to the app ?
Thanks in advance for your help.
Thecle
I’ve had this question quite a few times recently so I think it’s about time I did a post on it, as I understand your question, you are asking how to handle ‘UnManaged’ items that can be purchased multiple times. You are correct in thinking that you should use ‘UpdatePurchase’ which will get called as long as you have a ‘UnityGameObjectReceiver’ in your scene with the script attached that receives a callback from the plugin and in turn calls ‘UpdatePurchase’ (maybe I will explain this better in a post!?). Essentially you want to check for your productid (maybe ‘coins_100′) and then increment your coins variable (by 100?), I will hopefully get a post up later today, subscribe to be the first know!
Thank you a lot for your answer.
Does the mobclix plugin work with open allocation? I read that you needed to implement the open allocation networks separately. I’m not sure what that means.
If not, which mobclix services do you recommend signing up for?
BTW, the installation for this plugin was incredibly easy. Nice work!
No unfortunately the plugin doesn’t support open allocation, it hasn’t been a popularly requested feature (you are the first!) and probably won’t ever get added at this stage I’m afraid. Moblclix’ own list of Ad Networks should be sufficient, I can’t really give any recommendations here since I personally switched to Admob quite quickly… good luck, if you find something that works well maybe you can post back here to help other Mobclix plugin users.
Thanks for the response. I just started reading about mobclix payment issues and will probably be buying your admob plugin to experiment with that option as well.
I noticed that the mobclix ad on my test phone has been the same for a day. Do I have to implement manual refreshes of the ad or is that handled by the network?
Hi,
I was integrating the InAppBillingPurchaseUtility for iOS in my Unity project and noticed that there is not method to get product information like prices, description etc. from the plugin. It seems necessary since without it, once I change the price of a product in iTunesConnect account, to reflect it in the app I have to upload the game as a new upload, although there may not be any new feature update/bug fixes inside the game. This can be annoying to a gamer. Is there any plan to add this feature along with other StoreKit functions in the plugin very soon?
There’s a ‘RequestProducts’ method in IOSPurchases that will return that sort of information via ‘OnProductsRequest’ (in UnityGameObjectReceiver). You will just need to parse the message string that is returned.
Thanks! Will be great if you include these plugin message formats in the readme file.
Amazing plugins, the only one I am missing is AdMob iOS plugin.
Will it be implemented some day?
Thanks + Regards, Jan
Thanks, I’ve had a few requests recently for the iOS Admob plugin so looks like I should make a concerted effort to get it working. I’ll take a look at it over the next few days and see if I can sort out the issues I was having with it (mostly orientation bugs). I will post my progress to this website…
Does the facebook android plugin also work on iOS? I’m guessing it’s going to be the same source so no reason why not but thought I should ask.
No the ‘Social (Facebook) Unity PLugin for Android’ is just for Android only. The plugin ‘backend’ code for iOS would be completely different (written in Objective-C as opposed to Java!). I haven’t written one for iOS yet but it may happen…
Wow this rocks. How come you don’t have this on the asset store?
Is there any way we can do Interstitial ads with this plug in?
Sorry the plugin doesn’t currently support interstitial ads, maybe in a future release but no promises. Unity wouldn’t allow it on the asset store
. You will notice that there are no commercial ad solutions on the asset store.
Is it possible to access friend lists with this plugin? Would this just be done with the Generic request?
Yes that’s correct, as long as the facebook graph api supports it (on Android), you should be able to do it with a GenericRequest with this plugin. See friendlist for the details, along with this post, should give you want you need.
Hello! I know this is somewhat off topic but I was wondering which blog platform are you using
for this website? I’m getting fed up of WordPress because I’ve had issues with hackers
and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.
No problem. I just use standard WordPress for this site but use the Akismet plugin which seems to do a good job of stopping spam. Good luck!
Hi PlatoEvolved! We’re currently able to successfully buy an item in the Google Play store using this in-app purchasing plugin for Android, but after that the HasPurchased boolean still returns false for that item. Trying to buy the item again is impossible as Google Play states ‘you already own this item’.
We’ve tried this with two non-developer accounts (the second wasn’t used for development and we only tried this once, so it is unlikely that the repurchase API limit is involved).
The adb logcat states:
E/Volley (15086): [14] BasicNetwork.performRequest: Unexpected response code 429 for https://android.clients.google.com/vending/api/ApiRequest
E/Finsky (15086): [1] NotifyingErrorListener.onErrorResponse: Server error on InAppPurchaseInformationRequest: com.android.volley.ServerError
D/Finsky (15086): [1] MarketBillingService.sendResponseCode: Sending response RESULT_SERVICE_UNAVAILABLE for request [long number] to xx.xxxx.appname.
Do you have any idea what might cause the plugin to buy the item, but refuse any connection afterwards? Thanks!
The Google Play Store refuses a connection if you try to connect to it too many times in a row. This is usually caused by having one of the plugin methods in your game loop, hence it gets called 50ish fps and Google refuses any more connections. Follow the template set by the Demo scene as closely as possible and maybe try buying your productid’s with the demo scene ‘as is’, this should work fine. Here is a link to an explanation of Unmanaged/Managed products that should also help.
Hi Platoevolved!
Thanks for your reply. One day later, we were able to connect to the play store again. For testing, we implemented the demo scene. However, the item we’re trying to buy is still listed amongst ‘items for sale’, and not in ‘items you own’. But if you click the item, the Play Store responds that the item is already owned. Do you have an idea what might cause this?
Again, on two devices, the output is:
ONSTORETRANSACTIONRESPONSE: Result_OK
ONBILLINGSUPPORTED: True
But item does not get listed amongst items you own, even though it is purchased and owned according to the Play Store.
Thanks!
If your code wasn’t working properly when the original purchase was made (for instance if the the UnityGameObjectReceiver wasn’t set up so no callbacks could be processed), then Google will consider the product ‘purchased’ but the application will not have processed the callback and added the product to its local list of purchased items. Simply correct the code (use the demo as a template) and do a ‘RestoreTransactions’. That will reprocess all products, and add any purchased items to the local database (via the UnityGameObjectReceiver OnPurchaseResponse callback, exactly like the original purchase should have done).
Hi! Thanks for your suggestions…however, there was something wrong with the private key listed in the script. No idea why this key was changed, but we pasted it again and we were able to solve the
Signature verification failed – signature does not match data
errors that appeared after the RESULT_SERVICE_UNAVAILABLE error was solved!
Everything is working now! Thanks!
BTW. Do you have any idea why in-app products for China are disabled (strikethrough in the dev. console)?
Hi, I just bought your complete android package and am trying to get the admob feature working without much luck. I have started a new project, imported the package and then immediately did a build with the demo.
I have all the buttons but no ad is displaying either in bluestacks or my Galaxy S2. Any ideas on what my problem might be?
Just a few things to check: is your game set up on admob, triple check that the publisherid is correct in the manifest file, are you using a custom rom (they tend to block ads), try getting up the test ads (see here)
That’s about it, maybe check the manifest file is in the correct folder (Plugins\Android), let me know how you get on. Might be worth using Eclipse to see the debug log info getting thrown out of the phone, this is usually very helpful.
Ok.. I have 2 questions. I’ve been using your AdMob plugin for a while and it displays just fine. It also reflects in my AdMob account but I did not change the package name in the first line. Is it still necessary that I should do this ?
Also, I want to use your social plugin on the same game. If I import it, the manifest replaces the AdMob’s own. Since I am not to change the activity name, how do I get both AdMob and the Social Plugin running in the same game ?
And, thanks for making these great plugins.
Ok. I have two questions:
1. I bought your AdMob Plugin and I have been using it for a while now. It works fine and reads results in my AdMob account but I did not change the first line of the manifest file to my own package name. Is it necessary that I still do this ?
2. Also, I just bought your social plugin but I’m having issues running it and the AdMob plugin in the same game since I am not to change the activity name and they have different ones. How do I use both in one game. I’m not very familiar with these things. Am I to create a new activity for each plugin in the manifest file?
Please, help me out.
And, thanks for making such awesome plugins. I’m a fan of your stuffs.
Thanks, glad you like the plugins! I have a post on merging manifest files here. Hopefully that should help you out.
The package name doesn’t need to be changed in the manifest file since the latest versions of Unity seem to overwrite it with the one specified in your project settings, so you should be fine.
Hello again
I am planing my new game and i was wondering if your AdMob plugin supports some kind of advanced positioning. Meaning: i need to make some sort of animation with the ADS, like moving it (slowly) from a hiding position to its natural top display for instance.
Is it possible? or fading in or out BTW?
While implementing RESTORE PURCHASE button for Apple guideline, I am not able (using UnityGameObjectReceiver methods) implement process: ClickTheButton – ShowConnecting – OnCancelShowFailed/OnSuccessShowOk. How to do that? Thanks
Hi Plato, thanks for your in app billing for Android, unity. Muddling through but not quite getting there yet, bluestacks errors off with latest unity build 4.1.2
When uploading to playstore getting error: “You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode.”
I was able to upload apk’s it last week ok (earlier Unity release, but also earlier play store I think as well), Now can’t find anywhere to turn off debug mode.
Any ideas greatly appreciated.
ah, oops, problem solved, needed to create a new key then select it.
In publisher settings (for android): create new key tickbox, then browse to it, and finally select it from dropdown in key alias. This process brings up a seperate box where need to fill in Alias, password etc.
Put this password back into publisher settings under key, publisher, password.
now onto the next problem, item not available for purchase. … forgot to make the inapp product “active” in the playstore. so solved this too!
ps, your instruction video is great but definitely needs updating to keep up with all the changes.
appreciate you making this product available.
Glad you got it all sorted in the end. Yes I’ll probably update the video for the v3 API changes (when I’ve tested and released them, still probably a few weeks away).
Hi Platoevolved,
Do you have a sample of the inapp billing Demo.cs using java?
or any ideas how I can implement it into a unity game that uses lots of java?
thanks
All good, the java version seems to work too.
Note 1: java file needs to be in a different folder than plugins so the compilation works (lots of info in other places on this topic: mixing java and C# in same project)
Note 2: This is a very cut down version from PlatoEvolved’s more elegant one.
Note 3: still need to make the relevant changes in the AndroidPurchases file.
Note 4: this file replaces the “Demo.cs” file in the Demo scene.
Note 5: When running in the editor, you get errors, because it can’t connect to store, but seems to work ok on android. (Plato’s original version has catches for this)
Note 6: may need to test for changes or something to recognise the change after the purchase, I have not fully tested this.
#pragma strict
public var upgradeavailablenumber : String = “0″; //used to track any purchases elsewhere in game
function Start () {
AndroidPurchases.Load();
}
function OnDestroy(){
AndroidPurchases.StopInAppBilling();
}
function OnGUI(){
GUILayout.Label(“Upgrades for sale:”);
if(GUILayout.Button(“purchase Upgrade item x”)){
AndroidPurchases.PurchaseItem(“upgradetestX”);
}
for(var pinfo : PurchaseInfo in AndroidPurchases.Instance.PurchaseInfos){
if (pinfo.productId == “upgradetestX”){
upgradeavailablenumber = “1″;
//or whatever you want to do if this item purchased
}
}
GUILayout.Label(“Upgrade purchased is: ” + upgradeavailablenumber );
}
function Update () {
if (Input.GetKeyDown(KeyCode.Escape))
Application.Quit();
}
Hope this helps someone with some ideas.
Hi PlatoEvolved, help please,
So the build and functionality seemed to work ok for an android build using the java script, but fails when I change back to do a web build in Unity.
It fails with
“error CS0246: The type or namespace name `AndroidJavaClass’ could not be found. Are you missing a using directive or an assembly reference?”
on lines 123, 132, 172, 188 of AndroidPurchases.cs
I am a bit keen not to have to strip out all the code related to the android purchases. In my java code I already have lots of ” #if UNITY_ANDROID ” sections which work well for most things.
Any ideas greatly appreciated.
Kingsley
Hi Kingsley,
Yes I hit a similar problem in my own game. I ended up writing a new class called Purchases that had all the switching in for the different platforms ie:
public static bool HasPurchased(){
#if UNITY_ANDROID
return AndroidPurchases.HasPurchased();
#endif
#if UNITY_IPHONE
return IOSPurchases.HasPurchased();
#endif
}
So I can then just use Purchases.HasPurchased() and keeps my main code cleaner.
You may still need to surround the whole AndroidPurchases class with a #if UNITY_ANDROID #endif for the web build as well.
thankyou, wrapping offending bits of code with #if UNITY_ANDROID fixed it.
Hi,
I’m trying to use the Facebook plugin on Android. I would like to use the GenericRequest() method.
I’m getting an error message “(#100) missing message or attachment” which seems to be related to access token.
When I use the example graph call, it works, but this call doesn’t need the access token.
How can I retrieve the user access token from the plugin, in order to be able to fully use the GenericRequest? If I can get it, I can pass it as an parameter to GenericRequest.
Thanks by advance
In general you shouldn’t need to include the accesstoken in the graph path if you are logged in. So for instance instead of a graph path of ‘me/friends?access_token=BAAetetc’ you should just use ‘me/friends’ to get the friends list. However I may be able to expose the access token if necessary…
Thanks, it won’t be necessary. The problem was in parameter JSON formatting.
Hi, I’m currently using your plugins for AdMob, Facebook and Android in-app billing. Have to say great work, these got my product up and running quickly!
I’ve gotten to the point where I need to display the prices of purchasable items from the play store in the appropriate currencies. I couldn’t see any way of implementing this with the current plugin. It should be a trivial task, simply using getSkuDetails() as seen here: https://developer.android.com/google/play/billing/billing_integrate.html#QueryDetails
Any chance of getting this added? Simply exposing a static function in UnityAndroidInterface.class would be enough for me to take it from there.
Thanks in advance
Hi Mark, glad you like the plugins. Unfortunately v2 of the Google API doesn’t support getting the sku details, this is supported in the the new v3 api but I haven’t implemented this api yet. There’s some major changes in v3 and I’m looking at what’s involved but I’m afraid I can’t give a definitive timeframe yet.
Hello,
I am going to purchase the bundle for android, cuz they are quite easy use and hv much more instruction than others!( thumbs up!!!), but first i would like to know whether the social plugin can create a candy crush like function( ask for hearts ), please can you let me know and give a kindly advise.
Thx
Yan
Hi Plato Evolved,
I have purchased the plugins bundle,
however, when i implentment the facebook plugin, following the every steps from your youtube channel, it shows “failed to receive access token”, how can i solve this…….Could anyone give a hand ?
Hi, there is a few things you need to check: Make sure your app isn’t set to sandbox mode on facebook, make sure it is set up as native android app, double check that the key hashes are correct. Also worth using Eclipse to check the adb log. Let me know how you get on.
Hi, Thz so much for your reply.
I have crash on the setup before, so i deleted the app on facebook, create a new one, uncheck sandbox, follow the steps, **New things happen**, I dont even need to enter the key hashes, i can log in with my testing accounts. Please advice.
Thx
Yan
Hi,
i open demo_Admob and unity show message – JNI: Unable to find method id for ‘SetBanner’ (static)
Hi, thanks for purchasing the plugin. You have to deploy to an actual device for the Ads to show up. The included ReadMe is the best place to start.
Thanks for your email help.
Setting
“private static bool forcedialogauth”
from false to true fixes that problem for me ( log on without SSO ).
Preliminary tests with AdMob, Inn-App and now also Facebook plugin are working (still some problems understanding why that SSO is messing things but…). I can highly recommend this Android Bundle. For that price I don’t think you can find anything better.