Search Unity

Prime31 Android Plugins Officially Live!

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

  1. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @clay, the PHP script is just meant to be a "quick and dirty" tester. For a production ready script you will want to go through Google's documentation and handle all possible error states that they return.
     
  2. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi Prime31,

    I've successfully managed to set up Google Cloud Messaging and Push.IO for Android. I can send test messages to my test devices, however I'm noticing that the notifications are being displayed with default text as shown in here. Is this due to the fact that I'm using a trial account? Could you please indicate what I am missing?

    $Screenshot_2014-01-15-13-43-08.png

    Thanks,
    Clayton
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @clay, when you send your push notification you will want to include the following keys in the payload: title, subtitle, tickerText and message. If the keys are not sent in the payload then you will get the defaults.
     
  4. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    I'm using the Push.IO service. On their platform, to send a message you just enter the required message and that's it, no other parameters (there is the extra json parameters - http://docs.push.io/PushIO_API/). Should those fields be set through those JSON parameters?

    Thanks for your assistance,
    Clayton
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @clay, that is correct. You want to send them as part of the JSON data payload. For example code (so that you can see how it is all put together) see this gist: https://gist.github.com/prime31/5675017
     
  6. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Thanks mate! :)
     
  7. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    Hi prime31,

    I've tried to formulate a JSON data payload to be sent with the notification based on Push.IO documentation. This is what I came up with, but it still doesn't work;

    {
    "payload":{
    "message":"HelloWorld",
    "payload_gcm":{
    "extra":[
    {
    "message":"HelloWorld",
    "title":"HelloWorld",
    "subtitle":"HelloWorld",
    "tickerText":"HelloWorld"
    }
    ]
    }
    }
    }


    Could you please indicate what I'm doing wrong?

    Thanks for you time,
    Clayton
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @clay, without seeing Push.IO's actual code that sends the data I can't say for sure. You will probably want to check with them. Google's push servers take a 'data' JSON parameter. The top level of that object must contain the message, title, etc fields.
     
  9. claytoncurmi

    claytoncurmi

    Joined:
    Jul 6, 2010
    Posts:
    168
    I'm also in contact with them, but thought that you might have the actual JSON you used to test the plugin with. According to their documentation, all key value pairs in the extra attribute are appended to the data field for GCM. If you can provide me with any other info, it would be greatly appreciated. Until then I'll keep on trying. Thanks
     
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @clay, the exact JSON used to test is available in the previous link to the Gist that I posted. That script is a fully working example of how to send a push notification.
     
  11. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    @prime31 Hi,
    We are using your In App Billing Plugin in Android. Initially when we were using android.test.purchased as sku and testing it in sandbox mode, the 'purchase succeeds' event used to fire.

    Now the app has gone live and we are using a real sku, and the transaction is taking place(purchase is successful from Google's side and user even gets a confirmation mail) but the 'purchase succeeds' event is not firing.

    Please help us with this issue.
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @rushil, there is no difference in the API between when your app is released or not. It uses the exact same code and it uses the same servers on Google's side. When you ask a question like this at the very least you need to provide all log output and steps to reproduce. With absolutely no solid information to work with there is nothing at all we can do to assist.
     
  13. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    @prime31

    I am implementing Google Play Game Services for Android. After I installed it into my game, the game wouldn't even make it to the splash screen anymore.

    I created a clean Unity Project with only the Google Play plug-in imported into the project. I made the Google Play demo scene the start-up scene and set up minimal settings for bundle ID.The app still won't get to the launch scene.

    If I remove the following Prime 31 info from the manifest, the app will launch fine, but of course won't work as the activity is now missing.

    <activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="portrait"
    android:launchMode="singleTask"
    android:label="@string/app_name"
    android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    </activity>


    Can you help me with what I might be doing wrong?

    Thanks!
     
    Last edited: Dec 18, 2013
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bigtoe, firstly, I assume you went through all the required setup on Google's website as detailed here: https://developers.google.com/games/services/console/enabling Without everything properly completed Play Game Services will not work. You should look at the standard Android logs to see what could be amiss as Google will dump all relevant data there as usual.
     
  15. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    @prime31

    I set up my Google dash OK. I had leaderboards and achievements working with a different plug-in but decided to switch to Prime 31 so there wouldn't be a hassle with recompiling plug-ins for different Activities and different plug-ins.

    Below is the log that shows where I believe I am running into problems ...Sorry, it's rather long. It seems that it can't find resources it needs but I had added the Google Play service to the SDK which I would think add them to the project.

    Let me know if you see anything glaring from this log... Thanks in advance.

    -------------Log----------------
    12-18 15:42:47.041: I/Prime31(23329): found Activity proxy class: class com.prime31.PlayGameServicesPlugin
    12-18 15:42:47.046: I/dalvikvm(23329): Could not find method android.view.View.getDisplay, referenced from method com.google.android.gms.internal.ba$b.b
    12-18 15:42:47.046: W/dalvikvm(23329): VFY: unable to resolve virtual method 482: Landroid/view/View;.getDisplay ()Landroid/view/Display;
    12-18 15:42:47.046: D/dalvikvm(23329): VFY: replacing opcode 0x6e at 0x0009
    12-18 15:42:47.046: I/dalvikvm(23329): Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener, referenced from method com.google.android.gms.internal.ba$b.a
    12-18 15:42:47.046: W/dalvikvm(23329): VFY: unable to resolve virtual method 509: Landroid/view/ViewTreeObserver;.removeOnGlobalLayoutListener (Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
    12-18 15:42:47.046: D/dalvikvm(23329): VFY: replacing opcode 0x6e at 0x0037
    12-18 15:42:47.046: W/PopupManager(23329): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.
    12-18 15:42:47.046: I/Prime31(23329): found content view which will be used for popups: android.widget.FrameLayout@414f7020
    12-18 15:42:47.071: I/AudioPolicyManager(1750): stopOutput() output 1, stream 1, session 111
    12-18 15:42:47.076: I/SurfaceFlinger(1747): id=551 Removed idx=1 Map Size=7
    12-18 15:42:47.076: I/SurfaceFlinger(1747): id=550 Removed idx=1 Map Size=6
    12-18 15:42:47.076: I/SurfaceFlinger(1747): id=551 Removed idx=-2 Map Size=6
    12-18 15:42:47.076: I/SurfaceFlinger(1747): id=550 Removed idx=-2 Map Size=6
    12-18 15:42:47.096: I/AudioFlinger(1750): stop output streamType (0, 1) for 1
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x003f
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x004c
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 72 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0057
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 68 (common_google_play_services_enable_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0062
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 82 (common_google_play_services_update_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x006d
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 79 (common_google_play_services_unsupported_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x007f
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 76 (common_google_play_services_network_error_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0091
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x00a3
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x00b5
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 74 (common_google_play_services_invalid_account_title) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x00c7
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x00da
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 69 (common_google_play_services_install_button) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x000f
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 66 (common_google_play_services_enable_button) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0016
    12-18 15:42:47.251: W/dalvikvm(23329): VFY: unable to resolve static field 80 (common_google_play_services_update_button) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.251: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x001d
    12-18 15:42:47.256: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.256: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0007
    12-18 15:42:47.256: W/dalvikvm(23329): VFY: unable to resolve static field 71 (common_google_play_services_install_text_tablet) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.256: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0018
    12-18 15:42:47.256: W/dalvikvm(23329): VFY: unable to resolve static field 70 (common_google_play_services_install_text_phone) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.256: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0038
    12-18 15:42:47.256: W/dalvikvm(23329): VFY: unable to resolve static field 67 (common_google_play_services_enable_text) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.256: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x003f
    12-18 15:42:47.261: W/dalvikvm(23329): VFY: unable to resolve static field 81 (common_google_play_services_update_text) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.261: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0046
    12-18 15:42:47.261: W/dalvikvm(23329): VFY: unable to resolve static field 78 (common_google_play_services_unsupported_text) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.261: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0066
    12-18 15:42:47.261: W/dalvikvm(23329): VFY: unable to resolve static field 75 (common_google_play_services_network_error_text) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.261: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x006d
    12-18 15:42:47.261: W/dalvikvm(23329): VFY: unable to resolve static field 73 (common_google_play_services_invalid_account_text) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.261: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x0074
    12-18 15:42:47.261: W/dalvikvm(23329): VFY: unable to resolve static field 77 (common_google_play_services_unknown_issue) in Lcom/google/android/gms/R$string;
    12-18 15:42:47.261: D/dalvikvm(23329): VFY: replacing opcode 0x60 at 0x000c
    12-18 15:42:47.266: E/GooglePlayServicesUtil(23329): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
     
  16. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    @prime31

    The Social Combo and Google Play Services plugs conflict with resources.

    1 ) I started a clean project with only the Social Combo imported. I updated to the latest version via the plug-in manager.

    2) I built the project to the device with the social demo scene and it worked.

    3) I then imported the latest version of the Google Play Services (For Android) plug-in.

    4) When I build the project it quits and I receive the prompt..."Failed to Repackage Resources. See Console for details"

    The text below is from the console...

    Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
    /Users/myusername/Documents/Resource Libraries/Android Development/sdk/build-tools/android-4.4/aapt package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "/Users/myusername/Documents/Resource Libraries/Android Development/sdk/platforms/android-19/android.jar" -F bin/resources.ap_

    stderr[
    res/layout/com_facebook_placepickerfragment_list_row.xml:33: error: Error: No resource found that matches the given name (at 'layout_width' with value '@dimen/com_facebook_picker_place_image_size').
    res/layout/com_facebook_placepickerfragment_list_row.xml:33: error: Error: No resource found that matches the given name (at 'layout_height' with value '@dimen/com_facebook_picker_place_image_size').
    res/layout/com_facebook_search_bar_layout.xml:3: error: Error: No resource found that matches the given name (at 'background' with value '@color/com_facebook_picker_search_bar_background').
    res/layout/com_facebook_search_bar_layout.xml:15: error: Error: No resource found that matches the given name (at 'textColorHint' with value '@color/com_facebook_picker_search_bar_text').
    res/layout/com_facebook_search_bar_layout.xml:15: error: Error: No resource found that matches the given name (at 'background' with value '@color/com_facebook_picker_search_bar_background').
    ]
    stdout[
    Configurations:
    (default)
    hdpi ...

    I can send the whole log if you need it. I am assuming I need to edit/merge some resource file to accommodate both plugs.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bigtoe, that is a known issue unfortunately. Due to the way Unity creates the final apk multiple plugins that all require use of the Android R class (for accessing stuff in the res folder) will conflict. A possible workaround that you could try is to delete the Plugins/Android/res folder then reimport just the Social Networking Plugin. I believe (but an not 100% sure) that the Play SDK can get by without resource access. Another possible fix could be deleting any Facebook resource files that have a conflict (almost all of them are not actually required).
     
  18. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    @prime31

    Well, Deleting the resource folder and reimporting the social plug-in has at least sort of resolved that build issue

    But unfortunately it still leaves me with my first issue where the app won't run with Google Play Services installed. ( Refer to 3 posts back)

    12-18 18:14:41.885: E/GooglePlayServicesUtil(29346): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

    Any clue why this may be happening?

    Thanks
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bigtoe, unfortunately, it sounds like you won't be able to work around it that way. You can try the second suggestion that I had in my previous post and see if that works.
     
  20. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    Is there anyway to get the progress indicator to be isolated without the black rectangular background? I am looking for just the spinning circle that appears in situations like logging into Google Play Services.

    Also using....
    EtceteraAndroid.showProgressDialog("","");

    Still has a black background and the spinning circle isn't centered.


    Thanks in advance
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @big, the progress dialog is a built in control that will look slightly different depending on the modifications made to Android OS by each device manufacturer. It is not configurable.
     
  22. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    Hi Prime,

    We're currently having the following exception when building for Android:

    UNEXPECTED TOP-LEVEL EXCEPTION:
    java.lang.IllegalArgumentException: already added: Lcom/prime31/BuildConfig;
    at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
    at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
    ....

    We traced it to that both the latest Facebook and Tapjoy plugins have the class com.prime31.BuildConfig in there. Any ideas?

    Thanks,
    Tommy
     
  23. BigToe

    BigToe

    Joined:
    Nov 1, 2010
    Posts:
    208
    @serioustommy

    I may be completely off target here, but....

    My guess is that you have two or more jars that have the same classes defined in them. Maybe one of the prime jars got moved from its install folder? Or you might be using another plug-in other than prime that has a conflicting jar.

    In one of my jar conflicts I had the "Android-Support-v4" jar and different plug-in had added in their own "Support-v4" jar and the classes were conflicting.

    in my other jar conflict I had two plugs that were accessing the billing class, so I had to remove that class from one of the jars.

    I would do a search of your assets folder to find all the jars being used by your project and copy them to a separate folder for examination. First make sure there aren't any obvious duplicates. If there are just remove one.

    If there aren't any obvious duplicates, then you would need to change the .jar files to .zip, open them and see if you can find duplicate classes to remove.

    Good luck
     
  24. serioustommy

    serioustommy

    Joined:
    Jun 12, 2012
    Posts:
    126
    Thank BigToe. However everything is in their default locations. And once I deleted the Tapjoy jar everything builds fine. So it does seem like the 2 plugins clash.
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @serious, @BigToe is spot on with the duplicate class diagnoses. It looks like the latest Android build tools generate a file automatically. An update just went out to the Tapjoy Plugin to remedy the issue. Note that you will probably want to delete the TapjoyPlugin.jar file before importing the update.
     
  26. brazil

    brazil

    Joined:
    Nov 3, 2013
    Posts:
    1
    i use Etcetera , and i want to attach more than 1 image to the email the plugin just attach 1 file , i want to attach 7 images , how ??
     
  27. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Hi Mike

    I’m having some issues with the Android InAppBilling plugin. If I suspend the app with the homebutton during a purchase (when Google/Play windows are visible) and then return, the Google/Play purchase window is gone and I don’t get failed or succeeded events. I’ve tried to do a workaround by calling GoogleIAB.queryInventory in OnApplicationPause but then the GoogleIABManager.queryInventorySucceededEvent isn’t fired. I’ve also tried calling it after a second using Invoke in case your plugin needs to initialize something when the application is resumed but still no event. This does not happen when I suspend the app using the “recents button”.

    Have you got any clue what this could be?
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @break, without seeing logs I can't even begin to make any kind of educated guess. Please post all relevant logs showing the issue.
     
  29. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
  30. dariuszpietrala

    dariuszpietrala

    Joined:
    Oct 5, 2012
    Posts:
    148
    @prime31 are there any plans on realesing the GPS Multiplayer or adding it to GPS plugin. I need to know, because if not I will have to buy a VPS and make my own system, but that means that I won't be able to have "Play with friend" feature :(
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @darius, the turn based multiplayer is already in the works. Real time multiplayer will be started once turn based is all done.
     
  32. AlexS-Digiworks

    AlexS-Digiworks

    Joined:
    Oct 9, 2012
    Posts:
    7
    @prime31 Hello ! I'm currently experiencing a problem using two or your plugins in my app, in addition with the Facebook Plugin by Facebook.

    I'm using the Flurry Plugin and the Google In App Billing Plugin.

    Building of the app goes without problem except for a certain warning triggered by the Facebook plugin :

    I looked in the generated manifest to see that the main activity was in fact called "com.prime31.UnityPlayerNativeActivity" .

    It appears that, to work properly, the facebook sdk requires that the main activity of the app is called "com.facebook.unity.FBUnityPlayerActivity" or "extends" it.

    Do you know how I can make both you plugins and their work together ?
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @alexs, the Facebook SDK overrides the main Unity Activity in a way that no other plugin can work with it that also requires an Activity override. We provide a solution for any plugin vendors to use that plays nice with every other plugin (it is the same solution our plugins use). The details are available here: https://gist.github.com/prime31/0908e6100d7e228f1add
     
  34. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Greetings, @prime31

    I've got this message after attempting to post a picture with the Social plugin. However, this won't stop the TwitterManager.requestDidFinishEvent from firing. I've not updated the plugin, so I'm using the version from Nov.28 (or something like that), and in previous tests this was working fine.

    01-15 17:45:15.150: I/Unity(11476): "Something went wrong deserializing the json. We got a null return. Here is the json we tried to deserialize: "

    And when I attempt it through the test scene, I get this exception.

    01-15 18:07:12.345: I/Unity(12575): IsolatedStorageException: Could not find file "/mnt/sdcard/Android/data/com.test.ajakindle/files/someScreenshot.png".
    01-15 18:07:12.345: I/Unity(12575): at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
    01-15 18:07:12.345: I/Unity(12575): at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
    01-15 18:07:12.345: I/Unity(12575): at System.IO.File.OpenRead (System.String path) [0x00000] in <filename unknown>:0
    01-15 18:07:12.345: I/Unity(12575): at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <filename unknown>:0
    01-15 18:07:12.345: I/Unity(12575): at TwitterUIManager.OnGUI () [0x00000] in <filename unknown>:0
    01-15 18:07:12.345: I/Unity(12575):
    01-15 18:07:12.345: I/Unity(12575): (Filename: Line: -1)

    Anything I'm missing?

    Thanks in advance.
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, judging from the error message it would appear that you are trying to upload someScreenshot.png which doesn't exist on disk. Before you can post a screenshot you have to make sure the file is on disk and the write has fully completed.
     
  36. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Thanks for your reply, prime31.

    That would be the case for the test scene, since the screenshot is loaded by the Facebook test scene. But what about the json error? I've got it in the test scene as well, after loading the image on disk.

    Thanks in advance.
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, I do not understand what you asking. Please provide full log output and steps to reproduce using the demo scene.
     
  38. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Thanks for your reply, prime31.

    Previously, I've pointed out that, when attempting to share a picture via Twitter, I've got the message below. However, TwitterManager.requestDidFinishEvent is fired, but the image won't be posted.

    01-16 09:24:52.277: I/Prime31(15070): initializing Twitter service
    01-16 09:24:52.285: I/Prime31(15070): initialized Twitter service.
    01-16 09:24:55.574: D/dalvikvm(15070): GC_CONCURRENT freed 457K, 7% free 8392K/8967K, paused 3ms+2ms
    01-16 09:25:01.972: E/NativeActivity(15070): channel '4262ef78 com.test.testapp/com.burstly.plugins.BurstlyPrime31PluginActivity (client)' ~ Failed to receive dispatch signal. status=-11
    01-16 09:25:02.050: E/NativeActivity(15070): channel '4262ef78 com.test.testapp/com.burstly.plugins.BurstlyPrime31PluginActivity (client)' ~ Failed to receive dispatch signal. status=-11
    01-16 09:25:02.066: I/Prime31(15070): spawning new thread to fetch reqeust token
    01-16 09:25:02.066: I/Prime31-OAS(15070): request token endpoint: https://api.twitter.com/oauth/request_token
    01-16 09:25:02.386: D/dalvikvm(15070): GC_CONCURRENT freed 513K, 7% free 8470K/9095K, paused 3ms+4ms
    01-16 09:25:03.144: I/Prime31-OAS(15070): request token response code: 200
    01-16 09:25:03.167: D/dalvikvm(15070): GC_FOR_ALLOC freed 333K, 8% free 8443K/9095K, paused 26ms
    01-16 09:25:03.167: I/dalvikvm-heap(15070): Grow heap (frag case) to 8.425MB for 131088-byte allocation
    01-16 09:25:03.191: D/dalvikvm(15070): GC_FOR_ALLOC freed <1K, 8% free 8570K/9287K, paused 23ms
    01-16 09:25:03.199: I/Prime31-OAS(15070): request token body: oauth_token=******&oauth_token_secret=*****&oauth_callback_confirmed=true
    01-16 09:25:03.199: I/Prime31(15070): got reqeust token. showing login dialog
    01-16 09:25:03.199: I/Prime31(15070): showing login dialog
    01-16 09:25:03.222: I/Unity(15070): Successfully logged in to Twitter: *****
    01-16 09:25:03.222: I/Unity(15070):
    01-16 09:25:03.222: I/Unity(15070): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 53)
    01-16 09:25:08.597: E/NativeActivity(15070): channel '4262ef78 com.test.testapp/com.burstly.plugins.BurstlyPrime31PluginActivity (client)' ~ Failed to receive dispatch signal. status=-11
    01-16 09:25:08.628: E/NativeActivity(15070): channel '4262ef78 com.test.testapp/com.burstly.plugins.BurstlyPrime31PluginActivity (client)' ~ Failed to receive dispatch signal. status=-11
    01-16 09:25:08.808: D/dalvikvm(15070): GC_CONCURRENT freed 567K, 8% free 8580K/9287K, paused 2ms+5ms
    01-16 09:25:09.871: D/dalvikvm(15070): GC_FOR_ALLOC freed 88K, 8% free 8617K/9287K, paused 29ms
    01-16 09:25:09.871: I/dalvikvm-heap(15070): Grow heap (frag case) to 8.595MB for 131088-byte allocation
    01-16 09:25:09.894: D/dalvikvm(15070): GC_FOR_ALLOC freed 0K, 8% free 8745K/9479K, paused 22ms
    01-16 09:25:09.949: I/Unity(15070): "Something went wrong deserializing the json. We got a null return. Here is the json we tried to deserialize: "
    01-16 09:25:09.949: I/Unity(15070):
    01-16 09:25:09.949: I/Unity(15070): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 53)

    That line in bold is what troubling me; since no changes have been made to the code I'm using to post to Twitter.

    Using the demo scene, I initialized the service, logged in to Twitter and posted update with picture. Got the same message. Other functions work as expected. I replaced in TwitterManagerUI the token and secret token to initialize the service with mine.

    Thanks in advance.
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, it appears that you are getting an empty string back instead of the expected JSON packet. Can you try adding a Debug.Log of the TwitterManager.requestDidFinish method to dump the exact data returned from the Twitter API? You may also want to try switching to the alternate JSON parser until Unity 3.4 drops which has a fix for a really odd IDictionary bug. You can do that by adding Prime31.Json.useSimpleJson = true in your Awake or Start method.
     
  40. DARK_ETERNAL

    DARK_ETERNAL

    Joined:
    May 9, 2012
    Posts:
    41
    Thanks for your reply, prime31.

    I did what you suggested. Indeed, I was receiving a null string from Twitter API. After changing the JSON parser, I've got the same response. However, I'm using Unity 4.3.1, instead of Unity 3.4. Tested using the example scene.

    As I said before, I'm using the SocialNetworking plugin from Nov 28/2013.

    Any other suggestions? Would I be forced to update, instead?

    Thanks in advance.
     
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dark, I'm on the road for two weeks and only have 2 Android devices with me (both of which get the proper JSON return). Once I get back to the office I'll see if I can repro on the rest of my test devices.
     
  42. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    I have the same problem!
    And I found nowhere a answer to this.
     
  43. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Hi Prime

    Do you know if there's a way of knowing if a "low battery popup" has been thrown
     
  44. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @break, none of our plugins expose anything related to battery levels.
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @belal, that would be the expected result for that case. You have to consume the item (via the consumeProduct method) before you can purchase it again.
     
  46. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    One more try since Prime31 is Ignoring this question.
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @elias, images are returned exactly as the camera returns them with no modification besides using EXIF data as provided by iOS. All EXIF data is maintained so you can access it from the file.
     
  48. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    Hi Prime31

    I am using Social networking Plugin for android , and using your Demo Scene which comes with package.When i attempt to share a picture via Twitter;
    I am getting the following error :-

    "Something went wrong deserializing the json. We got a null return. Here is the json we tried to deserialize: "

    Please help us resolve this issue.
     
    Last edited: Jan 20, 2014
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @rush, please include the full log output, device model and OS version. Also ensure that you have properly setup your Twitter application on the Twitter web portal.
     
  50. rushil133

    rushil133

    Joined:
    Nov 21, 2012
    Posts:
    19
    @DARK_ETERNAL
    hey even i am having same problem with sharing a picture via Twitter; so do you find any solution to this issuse or u made any
    progress in resolving this issuse.Can you share your finding regarding this issuse with me??