Search Unity

Prime31 Android Plugins Officially Live!

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

  1. arcreative

    arcreative

    Joined:
    Mar 30, 2012
    Posts:
    8
    You can see AppIcon on LeftUpper side.

    I want to hide the AppIcon.
    How can I do it ?

     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @acreative, download the latest version of the plugin which adds a close image for that location.
     
  3. BuzzJive_Legacy

    BuzzJive_Legacy

    Joined:
    Oct 11, 2010
    Posts:
    26
    Is there a SocialNetworkingAndroid facebook logout callback event that I'm somehow missing? iOS has one (facebookDidLogoutEvent), but I don't see it in android.
     
  4. JoeyPepperoni

    JoeyPepperoni

    Joined:
    Dec 15, 2011
    Posts:
    7
    We are trying to implement the Flurry + AppCircle plugin and we get the following message when trying to authenticate. Any idea what is happening?

     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @buzz, There is no logout event on Android. It is a synchronous operation (unlike on iOS) so no event is required.


    @Joey, are you using the latest version of the plugin? Have you modified/replaced any of the included Flurry jars? We aren't able to reproduce the issue on our end.
     
  6. JoeyPepperoni

    JoeyPepperoni

    Joined:
    Dec 15, 2011
    Posts:
    7
    Quick Reply. Thanks!! We are using the iOS plugin dated March 16th 2012. That's the one my URL links to. We haven't changed any of the SDK files. Although we're considering updating them to see if that works.

     
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @joey, this is the Android forum. If your question is regarding iOS please post in the appropriate forum.
     
  8. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    Prime31, I've just released my game Celestial on the android market which uses you in app billign plugin. I'm selling some Unmanaged goods and a few people have run in to an issue where the purchase begins and syays "processing..." but then the purchase failed event fires. They contacted me and I've can see that they're purchase actually went through. At this point, since its an unmanaged item, there's no way for me to check if the purchase went through.

    I'm sure I'm not the first developer to have this problem. Any idea's on how to handle this scenario?

    Thanks in advance.
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @todd, we haven't heard of anyone getting a failed event and still having a purchase go through. Do you have any more information such as logs, device model, Android OS version, Are devices modded/rooted, etc?
     
  10. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    I know that one of them has a Samsung Epic 4G. I'll have to talk to him later "he's my brother" and get more details. Thanks.
     
  11. Maysoon88

    Maysoon88

    Joined:
    Apr 10, 2012
    Posts:
    2
    Hi,

    I need to add alert boxes to my android unity application.. is there any plugin to do so? like Etcetera for IOS?!

    Thanks,
     
  12. Gaddy

    Gaddy

    Joined:
    Nov 12, 2009
    Posts:
    5
    Hi,
    I've a problem with the android facebook plugin. The authentification screen doesn't work when my phone is already connected to facebook with the official facebook app. It shows an error screen (screenshort here) with the message "An error has occured. Please try again later".
    Then IsSessionValid() return true but all graph api fail with this message : "Error validating access token: User *********** has not authorized application ****************."
    if i disconnect the facebook app everything is fine, the login and authentification screens appears and work fine.
    If you have any explanation that would help me so much!
    Thank you!
    Nicolas
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @mysoon, we have an Android Etcetera Plugin that has alert boxes and lots of other goodies.


    @gaddy, we can't seem to reproduce the error you are seeing and we have no way of helping you debug it. You will need to open a bug report with the Facebook team to get any info for that issue.
     
  14. ovakin

    ovakin

    Joined:
    Dec 18, 2011
    Posts:
    37
    hi there,
    I've got the Mobclix plugin with Admob support, I followed the doc on your website and the video, created a new project, import the package, added the mobclix app ID and generated manifest file.
    But I can't get ads to display, I don't know what the problem is. I'm using Unity3D 3.5.0.f5 on Window 7 64 bit. Testing on the Kindle Fire.
    I created an onscreen text to display value of MobclixAndroid.isFullScreenAdReady(); , it's "false".
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ovakin, are you listening to the relevant events (adViewFailedToReceiveAdEvent and adViewDidReceiveAdEvent)? What is the error being returned by the event? It will let you know why an ad isn't displayed. The same goes for interstitials: first you request an interstitial then you wait for the event to fire letting you know when it loads.
     
  16. ovakin

    ovakin

    Joined:
    Dec 18, 2011
    Posts:
    37
    I got 2 errors when click Play in the Editor:

    and
    I'll try to use a debug console script to see what's going on with MobclixAndroidEventListener
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ovakin, plugins are native code and can only run on an actual Android device.
     
  18. ovakin

    ovakin

    Joined:
    Dec 18, 2011
    Posts:
    37
    ok, so when running on device I got this error logged when request ad:

    fullScreenAdDidFailEvent : -503; Advertisement is not available at this time

    Is this a problem with my mobclix account set up? Do I have to upload the app on Google Play first?
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ovakin, it is entirely normal for there to be periods with no ad fill. Ensure that you sign up for as many ad vendors as possible in the Mobclix web portal to increase your fill rate.
     
  20. ovakin

    ovakin

    Joined:
    Dec 18, 2011
    Posts:
    37
    Thank you for the support Prime31, I'll do that.
     
  21. Maysoon88

    Maysoon88

    Joined:
    Apr 10, 2012
    Posts:
    2
    I knew that after posting my question, but I am not familiar with Urban Airship! I set up my account but still don't know what does it mean to take the information from Urban Airship web portal!! :S aren't there more straight forward documentation to do that :(

    Thanks,
     
  22. Gaddy

    Gaddy

    Joined:
    Nov 12, 2009
    Posts:
    5
    Thank you ; finally it looks like it was an issue with my app's hash key. The error now occurs only when i try to re-login (without logout first) just after removing the app's authorisation in facebook options.

    I have another question : could you confirm the SSO is deactivated on the android plug-in (i've seen this answer in a previous post) and so the user is forced to write in login/password once, even if he is already loggued in his official facebook app ? Because with the ios plugin it words well, no need to enter the login/password
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @maysoon, you aren't being very specific so it is unclear what about UA is difficult. Did you read our documentation and UAs? It is quite clear what needs to be done if you read through the docs.


    @gaddy, SSO is not supported in the Android version of the plugin.
     
  24. ovakin

    ovakin

    Joined:
    Dec 18, 2011
    Posts:
    37
    Hi, Prime31 thank to you my game now have ads displayed. Just one question though, I want ads to only visible in menu screen, not gameplay screen, so at start I use
    then when I don't want it there I use
    do my ad impressions counted consistently when they're visible? Are there better practices ?
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ovakin, hiding the ad banner does pause it so you can either use hide or destroy it completely when not needed.
     
  26. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Hi. I have a very strange behaviour with the new update of the socialnetwork plugin. When trying to move the new prefabs of the managers and the eventlisteners into my scene unity hangs up. Is the new plugin only for unity 3.5? I'm working with unity 3.4.1 and maybe that could be the problem.
     
  27. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pahe, old versions of Unity are not compatible with the new prefabs. Just delete and recreate the prefabs. They are very simple being just an empty GameObject with one script attached.
     
  28. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Ok, thanks for help. Works fine now. Somehow my old app causes some strange problems to newer prefabs.

    I have another strange problem: when my app switches to the facebook or twitter screen, a strange flicker effect occurs. It seems like the device renders parts of my game onto the login screen. Has anyone else a similar problem?

    Edit: Ok, have found out. It's a problem of the background screen of my android device. If I change this, then I have no flicker effect o_O
     
    Last edited: Apr 13, 2012
  29. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    @Prime31. I'm logging the events that occurs when users access my In app purchases and I'm seeing a lot of users that are getting "false" from the billingSupportedEvent. Have there been any issues with this, the number of users getting just seems high to me. Thanks.
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @toddw, that response comes directly from the Google Play Store. There have been no reported issues and the value from Google Play is quite directly returned to your app.
     
  31. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    Ok, just had to check. It just seems odd that people would repeatedly attempt to make purchases when I'm displaying a message to them stating that billing is not supported on their device. Thanks for the feedback.
     
  32. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @Prime31

    Morning Prime... quick IAP issue. we've integrated it into a new game we're working on and we're getting this error when we open up the market...

    Code (csharp):
    1.  
    2. 04-17 13:28:04.327: E/Volley(10427): [14] BasicNetwork.performRequest: Unexpected response code 500 for [url]https://android.clients.google.com/fdfe/purchase[/url]
    3.  
    4. 04-17 13:28:04.327: W/Finsky(10427): [1] CheckoutPurchase.onErrorResponse: DisplayErrorMessage[This version of the application is not configured for billing.]
    5.  
    6. 04-17 13:28:04.327: E/Finsky(10427): [1] CheckoutPurchase.setError: type=UNKNOWN, code=-1, message=This version of the application is not configured for billing.
    7.  
    IS that an issue w/how its setup on the market or something internal to the app? We've not seen this message before and the app is setup like previous apps we've shipped.

    Cheers
    Bryan
     
  33. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Hi, I have a question to the Flurry AppCircle plugin. I'm trying to set up a reward server and in the Flurry documentation is mentioned:

    Code (csharp):
    1.  
    2. AppCircle appCircle = FlurryAgent.getAppCircle();
    3. Offer offer = appCircle.getOffer("USE_AN_UNIQUE_HOOK_NAME");
    4. String myUrl = offer.getUrl() + "c_userName=" + fUserName;
    5.  
    But I couldn't figure out how I could the URL from the FlurryOffer by the plugin. Or do I have to setup the the cookie and just accept the offer with "aceptOffer("myHookname")" like:

    Code (csharp):
    1.  
    2. FlurryAndroid.clearUserCookies(); // first clear all cookies an user has assigned to as we want to fill a new fresh cookie
    3. FlurryAndroid.addUserCookie("gameid", "myGame");
    4. FlurryAndroid.addUserCookie("payload ", "myPayload");
    5. var offer = FlurryAndroid.getOffer( "myTestOfferWithPayload" );
    6. FlurryAndroid.acceptOffer(offer.id);
    7.  
    Thanks for help!
     
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, from te looks of the error it would appear Play doesn't think your app was configured for in app billing. Double chek your settings on the Play website and ensure your bundle ID matches.


    @pahe, there is a getOffer method that will let you retrieve the raw data for a single offer. It is identical to the getOffer call in the snippet you posted.
     
  35. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    But this getOffer method doesn't give me an URL, doesn't it? The offer exposes only:

    Code (csharp):
    1.  
    2. class FlurryOffer
    3. {
    4.     public long id;
    5.     public string name;
    6.     public float price;
    7.     public string description;
    8.    
    9.     public int imageWidth;
    10.     public int imageHeight;
    11.     public string imagePath;
    12. }
    13.  
    Do I have to retrive the URL by one of these members? Maybe via the imagePath value?
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pahe, are you trying to use the Offer to make your own UI for offers? If so, you can use the getOffer method to display the offer and then set any cookies required for your server callback. If you don't plan on making your own UI you should not use the getOffer method. Fetching an offer's raw data takes it out of the queue for display by Flurry's UI.
     
  37. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Ok, I don't want to make my own UI. Im refering to this documentation from flurry: http://support.flurry.com/index.php?title=AppCircle_Rewards where the getOffer method gives back the url I need to generate my url I send to flurry with my custom parameters. The only thing which I need now is this url from the offer. Or do I get something wrong?
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pahe, if you don't want to make your own UI just use cookies: http://cl.ly/Fu2j
     
  39. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    @prime31

    I've been getting a few crash reports that occur when the user has "automatic update" turned on, which causes the app to while the game is running and they attempt to make a purchase through the in-app billing plugin. Here's the stack trace:


    java.lang.RuntimeException: Unable to start service com.prime31.billing.BillingService@40519ea8 with Intent { act=com.android.vending.billing.PURCHASE_STATE_CHANGED cmp=com.LucidVisionGames.Celestial/com.prime31.billing.BillingService (has extras) }: java.lang.NullPointerException
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2056)
    at android.app.ActivityThread.access$2800(ActivityThread.java:117)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:998)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3687)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.NullPointerException
    at com.prime31.IABPlugin.unpersist(IABPlugin.java:313)
    at com.prime31.IABPlugin.getPublicKey(IABPlugin.java:212)
    at com.prime31.billing.Security.verifyPurchase(Security.java:150)
    at com.prime31.billing.BillingService.purchaseStateChanged(BillingService.java:669)
    at com.prime31.billing.BillingService.handleCommand(BillingService.java:529)
    at com.prime31.billing.BillingService.onStart(BillingService.java:469)
    at android.app.Service.onStartCommand(Service.java:428)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2043)
    ... 10 more

    Is there any way that you or I can check if the app is updating to prevent this?

    Thanks
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @todd, it looks like from the log that the BillingService is not able to start at that time. Do you have the billing service running when this occurs (I am guessing not)? Does it still occur if the billing service is running?
     
  41. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    I don't allow the user to make any purchases unless the billing service is running. So it is likely that the billing service initializes, at which point I set a flag indicating that the service has initialized and to allow the user to make purchases, then the update begins installing which i'm uessing kills the billing service connection, then the user attempts to make a purchase and boom.

    A potential solution would be to toggle the initiialzed flag back to false assuming the disconnection from the billing service sends a billingEnded event but as far as I know that is not an option.
     
    Last edited: Apr 18, 2012
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
  43. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    Thanks for looking in to that.

    Yup, I'm still here. Thanks for the invite, I'll come out to one of the next meets when time permits.
     
  44. MonoSapiens

    MonoSapiens

    Joined:
    Apr 12, 2012
    Posts:
    79
    Hi Prime31,

    i just bought the Admob plugin for Android. The problem is that the banner is always on top and I can only change it's horizontal position. How could I align the banner at the bottom right, for instance?
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @monosapiens, the createBanner method accepts a top and left margin so you can place the ad wherever you want.
     
  46. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Ok thank you for help. I was confused by the flurry support :) They have set up the url now for me, so it should now work with only setting up the cookie and accepting the offer. :)
     
  47. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    @prime31

    I was just looking into the In-App billing plugin for the Amazon app store and noticed you have the MoVend plugin available which handles both android and amazon. As you know from soem of my previous posts, I am seeing a lot of failed transactions with the Android billing functionality. Some of which have resulted in the customer getting charged but the purchase complete event never firing (which is very bad)

    I was wondering:
    - if you know wether or not MoVend uses Androids server and billing functionality, or if it hosts it's own?
    - And if so, does it have a better transaction success rate?
    - And can consumeable products be restored or are they not tracked just like Android?


    Thanks!
     
    Last edited: Apr 22, 2012
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @todd,

    1, MoVend uses standard Play billing as well as serveral other payment processors (AliPay, Visa, MasterCard, PayPal, Cherry Credits, etc)
    2. you will want to check with the MoVend crew for the details of transaction success rate.
    3. MoVend has a different model for consumables. For each consumable you have to "finish" it. Once it is finished it is just like any other consumable and cannot be restored
     
  49. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    I've emailed them regarding the success rate, although I'm sure they aren't going to tell me that it's low. ...
    That is a better model for consumables given the potential for a transaction failure.

    Thanks for the clarification!
     
  50. toddw

    toddw

    Joined:
    May 9, 2010
    Posts:
    130
    @prime31

    I've decided to go ahead with the MoVend plugin, however I'm not seeing an explanation in the documentation of what the values or arg1 and arg2 will be in the purchased, cancelled and failed events.

    Can you tell me which one of these contains the productid and whats the potential values that will be sent in these arguments?