Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prime31 Android Plugins Officially Live!

Discussion in 'Android' started by prime31, Jun 6, 2011.

  1. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Just a quick note for anyone out there struggling with implementing Android plugins. We have officially released our first batch of Android plugins with more to follow in the coming days. Check them out here. The first round includes:

    - AdMob
    - Flurry
    - Mobclix (with AdMob suballocation)
    - Facebook

    If you have any requests for future plugins feel free to shoot us an email. We pump them out based on the number of requests received for each one so get your vote in!
     
  2. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    excellent !! :)
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    offtopic: will the existing ios plugins be updated with ios5 features or has development stopped on those? for example there's game center improvements and push changes.
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hippocoder, iOS 5 features will be added for sure once it is released. There are some nice GameCenter additions that I look forward to implementing. As features get added (depending on how long they take to add) the price may change but if you already have the plugin you are totally covered.
     
  5. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    Thanks Prime! Firing up the AdMob plugin now - looking forward to getting Diversion on Android. Cheers!
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ezone, superb! I picked it up yesterday and am loving it so far! Do let us know how the plugin integration goes.
     
  7. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Can you please upload an example of the FB plugin?

    The options I need from the FB plugin:
    Choose login permissions.
    dialogs: feed and stream.share.
    Get access token.

    Thanks
     
  8. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    Great job (as usual) - had our adMob ads running on the device within 5 mins. Keep up the awesome work!!
     
  9. DukeOfDesmo

    DukeOfDesmo

    Joined:
    Oct 29, 2008
    Posts:
    67
    A sturdy and complete Android OpenFient plugin please! (will send an email too :p )

    Hopefully, this would include support for:

    Challenges
    Leader-boards
    Achievements
    OFX (the DLC component)
    Push notifications

    If this used a similar api as your game center plugin, it would make it nice and easy to port from iOS to Android and back.

    Also, a package price would be nice. So that I could just buy them all for one reduced price ;)

    Thanks!
     
    Last edited: Jun 7, 2011
  10. flim

    flim

    Joined:
    Mar 22, 2008
    Posts:
    326
    A plugin for Xperia Play control would be nice.
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Think its pretty impressive that you are covering android and ios.

    One plugin which I think we would all buy outright from you is some form of anti piracy check that works!

    if (prime31.pirate) WalkGangplank(); // !!!


    This is mostly because all cracking is now done via bots rather than people taking the time to crack an app. Popular apps will be cracked in dedicated fashion, but it will slow down / annoy people sufficiently that submitting an update will require them to do a manual crack again rather than use the bot.

    Would this be a simple enough plugin for you to take on?
     
    Last edited: Jun 7, 2011
  12. legion

    legion

    Joined:
    Feb 9, 2011
    Posts:
    174
    Check my other thread on piracy, google has some nice info in the vid i link to. But a pluging would perhaps also be nice, but there is more stuff you should do really (if possible which i dont know)
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @De-panther, I didn't event know there was a stream.share dialog. I will play around with that today and if all is well I will add it to the plugin. I'll see if I can whip up a quick video as well. The others are covered by the plugin.


    @hippo and @Legion, I'll put a piracy check on the list for the Android Etcetera Plugin. It's a bit too lite to stand on it's own.
     
  14. legion

    legion

    Joined:
    Feb 9, 2011
    Posts:
    174
    Prime31 great :)
     
  15. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Thanks!

    There are even more dialogs:
    http://developers.facebook.com/docs/reference/dialogs/
    Look at the bottom of the page.
    If you'll make something like the "FB.ui" on the FB JavaScript SDK of their, it could be the best. That way if and when they'll add another dialog, we could use it, without your need to update the plugin.
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @De-Panther, consider it done. I'll get on this today and get an update out
     
  17. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Quick question... are you looking to add Twitter connectivity to this suite? We're going to be moving over to android and, of course, love your plugins on the iOS side. Just wanted to see if that was on the radar...
     
  18. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, Twitter will most likely end up in there. With the way Twitter has been man handling developers we are gonna wait until the meeting next week to see what happens. It most definitely won't be an Xauth implementation though so it will require visiting Twitter's website for auth.
     
  19. sybixsus2

    sybixsus2

    Joined:
    Feb 16, 2009
    Posts:
    943
    I'd definitely like to see a robust implementation of Open Feint, as Duke of Desmo suggested. Something which was broadly feature-compatible with GameCenter on iOS.

    I'd also like to see an equivalent to your iOS Storekit plugin, using Android In-App Purchases.
     
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @sybixsus2, Android In App Billing is next on the list. Expect it by the end of the week if all goes well.

    As for Open Feint...that is a tough one. They already have an official Unity Android plugin out there. What about their version isn't adequate?
     
  21. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Dtreble, the current version doesn't support being at a different orientation than the app. If we get enough requests for it we will give it a look though. I don't see why it wouldn't be possible with a little Java magic dust but don't quote me on that...
     
  23. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Dtreble, I'll give it a quick look tonight and see if my Java magic powder works.
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Dtreble, so the rotation is no problem but dealing with touches is a bit of a pain on a rotated view with Android. I have something hacked together that almost works but the touches are off by about 20 pixels or so and it definitely isn't ready for prime time. I'll give it another look later and see if I can come up with a production ready solution.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @De-Panther, I just implemented a custom showDialog method but it doesn't appear that stream.share is part of the Android Facebook SDK. Are there any other dialogs that you know of that I can test?
     
  27. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Thanks for trying,

    I just want to be able to post links with the facebook share, like the outcome of this link:
    http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Funity3d.com
    Look at the image I uploaded - it has the "link attachment" icon on FB.
    I need something like that, because it has more visibility on the users feed, instead of the regular post messeges(those with the icon of the app) who has visibility only for other players who already use the app.
    I'll need the two options(post and share)
    On the web api they called "feed" and "stream.share", Don't know how they called on the Android SDK, but if you made the dialog option dynamic, I could just try by myself the options.

    Thanks again
     

    Attached Files:

  28. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
    @Prime31 ha ha awesome, thank you. We got up to the point where the click was off, but we had some filthy code in the onReceiveAd! If you manage it, I'll buy it regardless. I've spent the day counter rotating all the cameras in our game.
     
  29. AshehRS

    AshehRS

    Joined:
    Jul 6, 2009
    Posts:
    109
  30. DukeOfDesmo

    DukeOfDesmo

    Joined:
    Oct 29, 2008
    Posts:
    67
    There is? I have looked through the forums and only found ones created by unity developers... I shall have another look! (A package price for all of your android plugins or some kind of subscription would still be cool though!)

    Edit: OK, just had another look and it seems that it has been created by a few people in the unity community and is being supported by OF. But atm there is zero documentation, support or official feature list. Guess I will have to wait :(
     
    Last edited: Jun 8, 2011
  31. legion

    legion

    Joined:
    Feb 9, 2011
    Posts:
    174
    http://support.openfeint.com/dev/welcome/

    Scroll to the bottom...
     
  32. DukeOfDesmo

    DukeOfDesmo

    Joined:
    Oct 29, 2008
    Posts:
    67
    ...For what? It just links back to this forum.:confused:
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @De-Panther, there is already a post message dialog in the plugin with optional link to image and link that does just that.
     
  34. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The In App Billing Plugin just went live for anyone who needs it. No recompilation needed. Just import the unitypackage and your bank account balance will grow (hopefully!).
     
  36. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    Thanks Prime - excellent timing! I'm going to use this to add an in-app purchase to remove ads on Diversion Android. Cheers!
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ezone, awesome! revel in the fact that you didn't have to deal with the horrendous billing API Google came up with!
     
  38. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    Oh, don't worry, I'm revelling!
     
  39. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    As I asked on the Ratrod's thread:
    http://forum.unity3d.com/threads/91902-Ratrod-Studio-Android-Storekit-Plugin-for-Unity-Android-Pro-and-Basic-Available-Now?p=595917&viewfull=1#post595917

    I want to connect the In-App-Billing to my servers, so the user could buy virtual money

     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @De-Panther, same answer as his really. The plugin won't do it for you but there is nothing stopping you from doing it. If you need any specific data returned in an event on the Unity side for easier processing just let me know and I'll expose it. We are trying to make sure you never have to compile any of our Android plugins yourself to keep things simple and easy to use so any features you want just ask for.
     
  41. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    @prime

    In the IAB plugin, does the restore transactions method work the same way as in the StoreKit plugin... ie, if successful we get a purchaseSucceededEvent callback with the product id, just as if the product was actually just purchased.
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @matkins, it does. Just keep your normal purchase event listeners listening and they should get fired when appropriate.
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    To all the folks who grabbed the Facebook Plugin, it will be renamed the Social Networking Plugin and will gain Twitter support in a couple days. The update will of course be a freebie.
     
  44. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    @prime

    I'm testing on device now. And as soon as i press the buy button in my game the app crashes, immediately closes. I'm not sure how to debug on the device. I guess I just want to know if anyone else has had this experience, and if there's any likely causes relating to the use of the IAB plugin.

    Also any tips on how to debug would be appreciated. Cheers.

    EDIT: Fixed. Crash was caused by trying to set a protected set field (but it was in the same class so should've had write access *shrug* )
     
    Last edited: Jun 14, 2011
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @matkins, use the Android logcat logs. http://developer.android.com/guide/developing/tools/adb.html#logcat You can then filter the noise using a simple grep. For example, all the logs from any of our plugins will have a Prime31 tag:

    logcat | grep Prime31

    If you don't see anything there run logcat directly to see what it has to say.
     
  46. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    @prime

    Cheers for the debug help. Crash was nothing to do with your plugin.
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @matkins, that is music to my ears!
     
  48. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    When I generate the XML Manifest, is it overwriting my existing manifest file?

    Also, the manifest has an application_id field. Where do you find the id?
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Lostlogic, if you have a manifest file already in the Plugins/Android folder it will be overwritten. Just generate the file first with the plugin then modify it to suit your needs.
     
  50. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    @Prime

    Our Android in app purchases are mostly working, our lucky test user got charged, but I'm not getting any callbacks... no call backs at all, for any of the events. Can't see what the problem could be.