Prime31 Android Plugins Officially Live!

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

  1. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, do you see anything in the logcat logs? The first thing I would check is that the *Manager is in your scene. Without that, there will be errors in the console and no callbacks will occur.
  2. Matkins

    Matkins

    New Member

    Joined:
    Aug 24, 2009
    Messages:
    141
    The IABAndroidManager is in. Could it possibly be to do with licensing? I get the following message in logcat

    Code (csharp):
    1.  
    2. I/LicenseChecker( 1933): Binding to licensing service.
    3. W/ActivityManager(   96): Permission Denial: Accessing service ComponentInfo{com.android.vending/com.android.vending.licensing.LicensingService} from pid=1933, uid=10073 requires com.android.vending.CHECK_LICENSE
    4.  
  3. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, that could very well be it. I haven't seen that one before so I can't offer any suggestiong to get it cleared up.
  4. legion

    legion

    New Member

    Joined:
    Feb 9, 2011
    Messages:
    174
    Hey Prime31, You really should try to fix a cart system to buy your plugins. As you probably noticed we bought a small fortune of them today :p BUT the last two we couldnt buy due to paypal (i think) stopped the transactions due to buying to much in a row. With a cart system it would just put all in cart press buy done. :)
  5. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Legion, many thanks! Every time we have started making a cart we always get sidetracked back on making actual plugins. It's been on the todo list now for ages. We apologize about the inconvenience of having to purchase everything individually. Perhaps as soon as we get the base of Android plugins up for sale we will get back to the cart...
  6. De-Panther

    De-Panther

    New Member

    Joined:
    Dec 27, 2009
    Messages:
    57
    Prime - thanks for all the info.

    In the next few weeks I'll have time to buy and implement the plugins :)
  7. Matkins

    Matkins

    New Member

    Joined:
    Aug 24, 2009
    Messages:
    141
    Interestingly i did get the purchaseFailedEvent callback just now when there was a loss of network connection. But still no purchaseSucceededEvent callback when trying to re-buy or restore the product on the test account. Anyone know what this would suggest? It seems to suggest that it's nothing to do with Prime31's lovely plugin at least.

    The popup appears and we are notified that the product has already been purchased, we press ok, it returns to the game... and... we are left waiting forever for that callback. It doesn't make any sense. Why would Android Market be happy to take the money and then not send back a response?

    It's like a bad girl friend... takes your money... doesn't call back.

    EDIT: after further testing I am getting purchaseSucceededEvent when buying a product for the first time (app crashed the first time so i never got it). So i'm getting all callbacks except for when restoring transactions. That's the only thing that isn't working... re-buying managed product or restoring transactions (practically the same thing). Does anyone know if that should be working in testing?
    Last edited: Jun 16, 2011
  8. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, when you do you testing have you done what Google suggests: create a separate test Google account, factory reset your phone and use the test account to login after rebooting? I wondering if that has anything to do with it.
  9. Matkins

    Matkins

    New Member

    Joined:
    Aug 24, 2009
    Messages:
    141
    @prime, i guess it could be. I haven't done a factory reset on the device because it's my colleague's personal device. We haven't received our company test device yet, so instead of doing factory reset i just added his account as a test account. Do you really think that could stop the response for restoring transactions, even when all other responses are working? I guess we'll just have to wait and see.
  10. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, I have learned over the years to follow the steps for getting in app billing on iOS and Android to the letter when dealing with the sandbox environment.
  11. Lostlogic

    Lostlogic

    Member

    Joined:
    Sep 6, 2009
    Messages:
    582
    Any chance you can list out what needs to be changed in the generated manifest, on every line? Unfortunately, I clicked your button and it wiped out the one I had (that was working.)
  12. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Lastlogic, if you open the Manifest.xml file in the plugin directory you can see any items that get merged in.
  13. Matkins

    Matkins

    New Member

    Joined:
    Aug 24, 2009
    Messages:
    141
    @prime, taking the assumption that the problem was with the testing environment itself, i decided to publish it and hope for the best. I've now tested the live version and can confirm that everything works as intended. I am very please. Thank you for all your help.
  14. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, good to hear you had a successful release! dont forget to email over the Android market link and plugins used so it can get added to the showcase.
  15. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @matkins, it just dawned upon me why your tests didn't work. Since you weren't using a proper test user your transactions most likely were not recorded on Google's servers so there was nothing to restore.
  16. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    The Abdroid Etcetera Plugin just went live! It includes toasts, alerts, prompts, SMS composer, email composer, photo album picker and more!
  17. ratrodstudio

    ratrodstudio

    Member

    Joined:
    Apr 3, 2009
    Messages:
    211
    Any plans to add Urban Airship support to Android too?
  18. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @ratrod, we intend to have a pretty similar gameplan as our iOS stiff so UA should get in there pretty soon. We just got the initial Etcetera Plugin out yesterday so there are still some things missing from it.
  19. EvilDingo

    EvilDingo

    Member

    Joined:
    May 7, 2011
    Messages:
    171
    Prime31,

    Okay. So I got the other AdMob plugin working here after a few hours of work. But, for some reason, the performance of my game suffered. Also, if I didn't set the ad refresh to be really quick, sometimes they didn't update at all. I was confident I could sort it out, but then I worked out how much my messing around would have cost in development time and realized maybe I should give your plugin a go.

    Bought, downloaded, and had it running in less than 5 minutes. No performance issues. No ad refresh problems.

    You have a new happy customer!
  20. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @EvilDingo, glad to hear it went smoothly for you!
  21. happyhopper

    happyhopper

    New Member

    Joined:
    Feb 16, 2011
    Messages:
    31
    I'm having this troubling issue, After I shipped an update with the AdMob Storekit plugins, That update erases all previous data. It also removes the app from the home screen area.

    It is like the plugin update erased the old app and installed a new one.

    Is anyone else having this issue? Was it a problem with the manifest file?
  22. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Happy, the plugin absolutely does not do anything of the sort. I am not sure of what it could be so I would suggest posting in the main Android forum to get some more eyes on it. My first guess would be something manifest related though so I would focus there.
  23. De-Panther

    De-Panther

    New Member

    Joined:
    Dec 27, 2009
    Messages:
    57
    When you change your apk's keysig, it may do so - the android thik it's not the same app.
    Maybe it also may happen when you doing changes in the manifest
  24. happyhopper

    happyhopper

    New Member

    Joined:
    Feb 16, 2011
    Messages:
    31
    Is the keysig the manifest? I'm not sure where to check that.
  25. FuzzyC

    FuzzyC

    New Member

    Joined:
    Aug 3, 2010
    Messages:
    69
    Hi, might be a stupid question. But where exactly is the "generate androidmanifest.xml" comman located?
  26. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @CLeyden, you can find it in the Prime31 menu up in the normal Unity menu bar.
  27. FuzzyC

    FuzzyC

    New Member

    Joined:
    Aug 3, 2010
    Messages:
    69
    /facepalm Thanks for the speedy reply! =D
  28. De-Panther

    De-Panther

    New Member

    Joined:
    Dec 27, 2009
    Messages:
    57
    Sorry, I ment the keystore and key on the android player settings
  29. FuzzyC

    FuzzyC

    New Member

    Joined:
    Aug 3, 2010
    Messages:
    69
    Any chance of a TapJoy plugin on the horizon?
  30. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @CLeyden, Tapjoy has an official Unity Android plugin so we won't be making one.
  31. deepak

    deepak

    New Member

    Joined:
    Aug 10, 2010
    Messages:
    44
    Hi Prime31,

    we had purchased android social networking plugin which is very easy to use. but i had one doubt regarding dialog box options. Is there a provision to post a message without showing dialog box as it appears now. In the way that messages will be posted in the background of the game without disturbing the game?
  32. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @deepak, I responded to your email. You need to use the Facebook Graph API through the graphRequest method
  33. ssmchan

    ssmchan

    New Member

    Joined:
    Nov 6, 2010
    Messages:
    72
    Dear Prime,

    Good!! We're now starting to develop Android Apps. So your plugin should be useful... I have used your plugin on iPhone and it's great!

    Any promotion price for existing customer? :p Thanks.

    Regards,
    Simon.
  34. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Simon, unfortunately our prices are already rock bottom. We like to keep the prices accessible to everyone!
  35. ssmchan

    ssmchan

    New Member

    Joined:
    Nov 6, 2010
    Messages:
    72
    Dear Prime,

    I know.. I'm just kidding. :p Your plugin is be worth on this price range... :)

    Regards,
    Simon.
  36. kalos

    kalos

    New Member

    Joined:
    Dec 11, 2010
    Messages:
    121
    Hi Prime31

    I'm planning to buy the admob plugin real soon. One question though, am it able to hide ads in particular scenes or at particular time?

    Thanks
  37. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @kalos, you get full control over the banner so you can hide/show at will.
  38. kalos

    kalos

    New Member

    Joined:
    Dec 11, 2010
    Messages:
    121
    @Prime31: Awesome! Thanks :D
  39. UVRadiation

    UVRadiation

    New Member

    Joined:
    Jul 21, 2008
    Messages:
    183
    Hi prime,
    I bought loads of your plugins both for iOS and for Android and I am super happy with em :)
    I recently bought the InAppBilling android plugin and I am having some problems with it, I factory reset my device, opened a new gmail account and added it as a test account on the android market.
    The first problem that I had is that the app crashed on the test scene when trying to start a purchase - it happened because I never started the Market app so I didn't click agree on the tos. this might happen every time the tos will change so this is something that needed to be fixed on the plugin level.
    after I did agree on the TOS, the purchase window did appear but I am not getting Callbacks after I buy a test product, (I am getting other callbacks). I tried clicking on the Buy Real Product button but I am getting some network error dialog.
    any advice?
    Thanks!

    *EDIT :
    I am seeing this in the log:
    D/Prime31 ( 1122): android.test.purchased: RESULT_OK
    I/Prime31 ( 1122): purchase was successfully sent to server
    but nothing in the Unity side
    Last edited: Jul 4, 2011
  40. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @UV, the plugin can check which Market version the user has (in app billing requires a specific version or later to work) but I am not aware of an API to detect if Market T&C were accepted. Honestly it isn't really even worth looking into because they have to go through the Market to get your app anyway.

    From the sounds of the logs the permissions are not set in your manifest file. Be sure to generate manifest file using the menu item before installing.

    PS: don't you love how Google males you wipe your phone just to test? Drives me crazy...
  41. UVRadiation

    UVRadiation

    New Member

    Joined:
    Jul 21, 2008
    Messages:
    183
    I don't know if there is an APi to check it but you can tell something is wrong and return some sort of failure notice and not crash the app. I am not worried about the first time a user gets the app from the market and then use the inapp purchase, I am worried about a situation where the T&C changes and the user needs to agree on them again. I would do a check myself but I cant since it's crashing in the jar side of things.
    I did generate a manifest (love the method btw, I've hooked up my other plugins to use it as well). I'll try to wipe my phone again and generate a new manifest and try my luck again tomorrow, I'll post my results.
    It's just insane they make you wipe your phone for a simple test... I guess I'll go back to my iPhone as my personal phone for now.
  42. ezone

    ezone

    New Member

    Joined:
    Mar 28, 2008
    Messages:
    327
  43. UVRadiation

    UVRadiation

    New Member

    Joined:
    Jul 21, 2008
    Messages:
    183
    @Prime31 , after another wipe and registering a app in the market and listing a new in-app purchase I finally managed to get a Purchased callback from the test user. I wonder why it dosent work with your example id... thanks for the plugins!
  44. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @ezone, that was a quick port. I didn't even get to finish the iOS version yet.

    @UV, to test with the example ID you would need to add that same one to your app via the web interface. Glad to hear your up and running though. I know what a pain it is having to wipe your phone and create test users. Makes me want to find the team of developers at Google that made the in app billing API and do bad things to them.
  45. qamarzaman

    qamarzaman

    New Member

    Joined:
    Jul 1, 2010
    Messages:
    85
    Hello,
    I a trying to integrate the Social Networking Plugin of Prime31, And Openfeint 2.10.1. The problem is that...

    When i use the Social networking plugin or Openfeint alone, they work very well. But when i put them together in a project then a linker error occures

    please see this thread
    please help me in this matter. Conflict in the plugin and openfeint because they both use Facebook API
  46. legion

    legion

    New Member

    Joined:
    Feb 9, 2011
    Messages:
    174
    Use the search function on openfeint support pages ;)

    But here you go http://support.openfeint.com/dev/using-fbconnect-outside-of-openfeint/
  47. Mårten

    Mårten

    New Member

    Joined:
    May 16, 2011
    Messages:
    18
    I've been trying to get AdMob working with the Prime31 plugin for Android. And I actually had it working for a while, with a banner showing. Then suddenly it just didn't appear anymore, and I can't for the life of me see what I've done differently. I'm currently using the example implementation that came with the plugin (AdMobAndroidBanner), and that's what was working before as well.

    Logcat tells me this when I run the game:

    Code (csharp):
    1. I/Prime31 ( 2838): requested adSize enum value: 0
    2.  
    3. D/Prime31 ( 2838): creating ad banner with leftMargin:topMargin: 160:0
    4.  
    5. V/Unity   ( 2838): Non platform assembly: /assets/bin/Data/Managed/Boo.Lang.dll (this message is harmless)
    6.  
    7. I/Ads     ( 2838): To get test ads on this device, call adRequest.addTestDevice("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
    8.  
    9. I/Ads     ( 2838): adRequestUrlHtml: <html><head><script src="http://www.gstatic.com/afma/sdk-core-v40.js"></script><script>AFMA_buildAdURL({"preqs":0,"u_sd":1.5,"slotname":"xxxxxxxxxxxx","u_w":533,"msid":"se.xxxxxxxxxxxxxxx.xxxxxx","js":"afma-sdk-a-v4.1.0","isu":"xxxxxxxxxxxxxxxxxxxxxxxxxx","format":"320x50_mb","net":"wi","app_name":"2.android.se.xxxxxxxxxxxxxxx.xxxxx","hl":"en","u_h":320,"u_audio":3,"u_so":"l"});</script></head><body></body></html>
    10.  
    11. D/dalvikvm(  984): GC_EXPLICIT freed 4K, 50% free 2731K/5379K, external 1625K/2137K, paused 592ms
    12.  
    13. I/Ads     ( 2838): Received ad url: <"url": "http://r.admob.com:80/ad_source.php?preqs=0&u_sd=1.5&slotname=xxxxxxxxxxxx&u_w=533&msid=se.xxxxxxxxxxxxxxxxxxxx.xxxxx&js=afma-sdk-a-v4.1.0&isu=xxxxxxxxxxxxxxxxxxxxx&format=320x50_mb&net=wi&app_name=2.android.se.xxxxxxxxxxxx.xxxx&hl=en&u_h=320&u_audio=3&u_so=l&output=html&region=mobile_app&u_tz=-120&ex=1&client_sdk=1", "afmaNotifyDt": "null">
    14.  
    15. D/dalvikvm( 2838): GC_CONCURRENT freed 707K, 47% free 3557K/6663K, external 2006K/2137K, paused 6ms+3ms
    16.  
    17. D/webviewglue( 2838): nativeDestroy view: 0x76da00
    18.  
    19. D/webviewglue( 2838): nativeDestroy view: 0x739da0
    20.  
    21. I/Ads     ( 2838): onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory.)
    22.  
    23. D/Prime31 ( 2838): onFailedToReceiveAd. errorCode: Ad request successful, but no ad returned due to lack of ad inventory.
    24.  
    25. V/Unity   ( 2838): SendMessage: object AdMobAndroidManager not found!
    I'm really lost at where I should even begin to look, as all the example projects that was working before also seems to have stopped working. Any help is appreciated!
    Last edited: Jul 12, 2011
  48. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Marten, first off, you don't have the AdMobAndroidManager prefab in your scene. You should be putting that in your initial loading scene and it will then persist throughout all your scenes. The other thing I see is this:

    "Ad request successful, but no ad returned due to lack of ad inventory."

    There are no ads to fill the banner. There isn't much you can do about that one. Sometimes ads just aren't available depending on location, device and whatever other metrics the ad companies use to target ads.
  49. Mårten

    Mårten

    New Member

    Joined:
    May 16, 2011
    Messages:
    18
    Ok thanks, that explains those errors. Is there a way to turn on test ads with the plugin?
  50. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Marten, there sure is with a clue right in the log you posted: "I/Ads ( 2838): To get test ads on this device, call adRequest.addTestDevice("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");"

    Just use that value and call the setTestDevices method with it.