Search Unity

Prime31 Android Plugins Officially Live!

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

  1. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    i'll check that. it is signed, but i'm probably not signing it right? Android.. super confusing.
     
  2. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Ok.. so maybe i'm doing something wrong? Maybe not.. i dunno. I went back and made sure i have my keystore setup.. now i JUST use generic stuff except for the Android Market Public key which is the one i got off the android site. When I verify it all is setup in the playerprefs, build, and run i still get this..

    E/Prime31-SEC( 8850): Signature verification failed.
    W/Prime31-SEC( 8850): signature does not match data.

    as part of the log which i'm not sure what exactly that would relate to or better yet how to avoid that. Do i need ot have the app unsigned? or signed a specific way? In looking at the docs i see this line...

    so as always i'm not sure about the "in some cases" portion. is it safe to assume i have to upload the APK? Also it points out to use the developer account instead of test accounts.. is that true as well? Possibly?

    Thanks!
    Bryan
     
  3. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Fixed. I realized i didn't have a manager in the scene.

    :|

    colour me stupid.

    Thanks for your help!
    Bryan
     
  4. De-Panther

    De-Panther

    Joined:
    Dec 27, 2009
    Posts:
    589
    Example of full Feed Dialog on JavaScript with Prime31 Social plugin for android:
    Code (csharp):
    1.  
    2.     var params : System.Collections.Generic.Dictionary.<String,String>;
    3.     params = new System.Collections.Generic.Dictionary.<String,String>();
    4.  
    5.     // insert or change the value for the given key
    6.     params["app_id"] = FACEBOOK_ID;//I don't think it's necessary if you already initialized it
    7.     params["link"]  = "http://your_app_url.com/";//If you want the feed to show on mobile devices, you should link to a URL outside of "apps.facebook.com"
    8.     params["picture"] = "http://your_app_url.com/image.png";
    9.     params["name"] = "The blue header";
    10.     params["caption"] = "Text under blue header";
    11.     params["description"] = "Text under caption";
    12.     params["actions"] = "{\"name\":\"Action Link Name\",\"link\":\"http://your_app_url.com/\"}";//Action link name should be short, like "Play", "Go!", etc...
    13.  
    14.     FacebookAndroid.showDialog( "feed", params );
    15.  
     
  5. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    I'm back! :) So still having some issues w/IAB. I gave up on the full final testing now (so i don't have to do credit card entries every test) and and am using your testProduct function... which seems to work but again i'm not getting the return of purchase successful to fire off. Here's the log..

    Code (csharp):
    1. 09-16 16:39:24.475  1227  1335 W InputManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@457de0f8
    2. 09-16 16:39:25.217  4985  4985 D Finsky  : [1] BuyButtonClickListener.onClick: No limit to bytes over mobile.
    3. 09-16 16:39:25.850  4985  4985 D Finsky  : [1] PurchaseFragment.onStateChange: Finished purchase with ID https://android.clients.google.com/fdfe/purchaseStatus?doc=inapp:com.bigfishgames.android.nawpdroidfree:android.test.purchased&order=transactionId.android.test.purchased
    4. 09-16 16:39:25.999  1227  1850 D Sensors : using sensors (name=sensors)
    5. 09-16 16:39:25.999  1227  1850 D SensorService: android_open numFds = 1
    6. 09-16 16:39:25.999  1227  1850 D SensorService: android_open fd = 0x4b6d499c pfd = 0x4b6d4998
    7. 09-16 16:39:26.022  1130  1224 D AudioHardwareMot: AudioStreamOut::wake: disabling SRC
    8. 09-16 16:39:26.030  1130  1224 D AudioHardwareMot: Output 0x123e0 exiting standby
    9. 09-16 16:39:26.092  5057  5064 D Unity   : Creating OpenGL ES 2.0 context (RGB16 565 24/8)
    10. 09-16 16:39:28.342  5057  5057 I Prime31-BS: handleCommand() action: com.android.vending.billing.GET_PURCHASE_INFORMATION
    11. 09-16 16:39:28.358  4985  4989 D Finsky  : [6] MarketBillingService.getPreferredAccount: com.bigfishgames.android.nawpdroidfree: Account pritchard.bryan@gmail.com from default account.
    12. 09-16 16:39:28.436  4985  4985 D Finsky  : [1] MarketBillingService.sendResponseCode: Sending response RESULT_OK for request 3575568430345770218 to com.bigfishgames.android.nawpdroidfree.
    13. 09-16 16:39:28.452  4985  4985 D Finsky  : [1] PendingNotificationsService.setMarketAlarm: Setting alarm for account=pritchard.bryan@gmail.com, duration=120000
    14. 09-16 16:39:28.460  5057  5057 I Prime31-BS: handleCommand() action: com.android.vending.billing.RESPONSE_CODE
    15. 09-16 16:39:28.460  5057  5057 I Prime31-RS: responseCodeReceived: RESULT_OK
    16. 09-16 16:39:28.467  5057  5057 I Prime31 : android.test.purchased: RESULT_OK
    17. 09-16 16:39:28.467  5057  5057 I Prime31 : purchase was successfully sent to server
    18. 09-16 16:39:28.999  4985  4985 D Finsky  : [1] MarketBillingService.sendResponseCode: Sending response RESULT_OK for request 607708992751070215 to com.bigfishgames.android.nawpdroidfree.
    19. 09-16 16:39:29.014  5057  5057 I Prime31-BS: handleCommand() action: com.android.vending.billing.PURCHASE_STATE_CHANGED
    20. 09-16 16:39:29.038  5057  5057 E Prime31-SEC: Signature verification failed.
    21. 09-16 16:39:29.045  5057  5057 W Prime31-SEC: signature does not match data.
    22. 09-16 16:39:29.053  5057  5057 I Prime31-BS: handleCommand() action: com.android.vending.billing.RESPONSE_CODE
    23.  
    basically my scene has an object that as
    Code (csharp):
    1.         IABAndroidManager.billingSupportedEvent += billingSupportedEvent;
    2.         IABAndroidManager.purchaseSucceededEvent += purchaseSucceededEvent;
    and i have a GO in the scene with IABAndroidManager on it. I can get as far as the purchase but it never gets to the successful event... just goes back to the game w/no results. I use the same key in the "key" variable as i do in the Plater Settings under Public Key (the full Google API key) but nada.

    Am i missing a step?
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, what stands out from that log is the signature verification failure. Double check your info and make sure you properly signed the APK.
     
  7. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Yeah thats what i was thinking to but.. basically i've signed the app with a generic keystore (tester) and a generic password (tester). Using an alias of nawptest.

    And as noted i put the public key in that is my key from the android market.

    Now here's the next question. do i have to upload a NEW build that matches THIS build to the market place? The build # has changed.. perhaps the builds aren't in sync?
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    You need to use a non-debug keystore if I'm not mistaken. With regard to versioning, you will need to check Googles docs for a definitive answer.
     
  9. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    yeah i did that, nothing was set to debug. ok i'll keep stabbing at it.. thanks!
     
  10. MysteryGuest

    MysteryGuest

    Joined:
    Sep 20, 2011
    Posts:
    10
    Hi Prime31,

    I'm developing a mobile application with the SocialNetworking plugin (both on iOS and Android).
    Since I'm completely new to Android development, I could use some help on getting the right permissions set.
    I tried checking the Application.networkReachability variable within Unity, but catlog showed me I need the 'android.permission.ACCESS_NETWORK_STATE' permission for that. So now I'm looking for a way to add the permission but I can't find the AndroidManifest.xml file anywhere.
    Earlier you referred to a menu option in the Prime31 menu:

    But the downloaded Android plugin package (SocialNetworkingAndroid_2011-09-14) does not contain any code that generates this menu. (The iOS version actually does have this menu, though this clearly doesn't have the option for generating the AndroidManifest.xml).
    I read some stuff about creating the Manifest in the Assets/Plugins/Android folder, but this seems to get cleared when building.
    Could you please point me in the right direction how to create an AndroidManifest.xml file with the required permission added...
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @MysteryGuest, the Android plugin should contain a Prime31 menu item as well. Can you shoot me an email to mike (@) prime31.com and just include either a screenshot of the contents of the Editor folder or a zipped copy of it?
     
  12. MysteryGuest

    MysteryGuest

    Joined:
    Sep 20, 2011
    Posts:
    10
    @Prime31:

    Thanks for the quick reply!
    I just created a new Unity project imported the downloaded plugin-package again to be sure I hadn't overwritten any files by other imports to the project.
    The Unity importer only shows files in the Plugins folder and there's no sign of an Editor folder in the package.
    Should I mail my downloadlink to the address above for a check?
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @MysteryGuest, please do send over your download link.
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @MysteryGuest, wait. I lied! You don't need to generate an AndroidManifest for the SocialNetworking Plugin anymore since the last update. You can add the internet permission in the standard Unity player settings.
     
  15. MysteryGuest

    MysteryGuest

    Joined:
    Sep 20, 2011
    Posts:
    10
    @Prime31:
    So no Prime31 menu then... OK.
    Still, the Unity Player settings only has checkboxes for the Internet SD usage permissions. What if I need some other permissions as well?
    Is there a way to find out how the AndroidManifest gets generated internally?
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Mystery, if you need other permissions purist the scope of the plugin and the Unity player settings you will need to consult the Unity docs. There is a section on how to pull it off in there.
     
  17. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @Prime31

    On the mail functions in Etcetera for Android, do we get a return value when they send the email? Is there anyways to know that they sent an email vs. canceling the process?
     
  18. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, there is no return values for sending emails.
     
  19. MysteryGuest

    MysteryGuest

    Joined:
    Sep 20, 2011
    Posts:
    10
    @Prime31:
    I was able to find the AndroidManifest.xml inside Unity's package contents on my Mac with some instructions in another forum post, so I could add my own permissions.
    Thanks again for the support!
     
  20. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    I have an issue w/the WebView functions and rotation. I'm starting here but i don't think its an issue w/how web view is setup.. maybe a unity thing? Anyways i'm using unity 3.4 and whenever i open up a web view to any url the page opens fine. If i rotate the view it will crash. Sometimes on the first rotate but most times on about the 3rd or 4th. Have you seen anything like this before? Is this possibly an issue w/the new rotation stuff unity has and how the web view is interacting w/the viewport?

    i do have a logcat dump if you'd like to see it.. i'd rather email it if possible as its kinda lengthy. :)
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, feel free to email it on over.
     
  22. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    I'm having an issue with the IAB plugin when using the testPurchaseProduct() method. The market opens properly and allows me to purchase the test item but when the purchase is complete my app crashes with the follow log:

    Code (csharp):
    1. 09-23 11:40:30.473: ERROR/Prime31-SEC(8688): Base64 decoding failed.
    2. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688): FATAL EXCEPTION: main
    3. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688): java.lang.RuntimeException: Unable to start service com.prime31.billing.BillingService@47d79d48 with Intent { act=com.android.vending.billing.PURCHASE_STATE_CHANGED cmp=com.quantumsquid.vsu/com.prime31.billing.BillingService (has extras) }: java.lang.IllegalArgumentException: com.prime31.billing.util.Base64DecoderException: single trailing character at offset 8
    4. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3063)
    5. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.ActivityThread.access$3600(ActivityThread.java:125)
    6. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2096)
    7. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.os.Handler.dispatchMessage(Handler.java:99)
    8. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.os.Looper.loop(Looper.java:123)
    9. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.ActivityThread.main(ActivityThread.java:4627)
    10. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at java.lang.reflect.Method.invokeNative(Native Method)
    11. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at java.lang.reflect.Method.invoke(Method.java:521)
    12. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
    13. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    14. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at dalvik.system.NativeStart.main(Native Method)
    15. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688): Caused by: java.lang.IllegalArgumentException: com.prime31.billing.util.Base64DecoderException: single trailing character at offset 8
    16. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.Security.generatePublicKey(Security.java:256)
    17. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.Security.verifyPurchase(Security.java:151)
    18. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.BillingService.purchaseStateChanged(BillingService.java:674)
    19. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.BillingService.handleCommand(BillingService.java:534)
    20. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.BillingService.onStart(BillingService.java:474)
    21. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.Service.onStartCommand(Service.java:420)
    22. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3053)
    23. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     ... 10 more
    24. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688): Caused by: com.prime31.billing.util.Base64DecoderException: single trailing character at offset 8
    25. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.util.Base64.decode(Base64.java:559)
    26. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.util.Base64.decode(Base64.java:474)
    27. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.util.Base64.decode(Base64.java:420)
    28. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     at com.prime31.billing.Security.generatePublicKey(Security.java:240)
    29. 09-23 11:40:30.504: ERROR/AndroidRuntime(8688):     ... 16 more
    Obviously the billing service doesn't start properly but I can't seem to find the reason behind it. Any thoughts?
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, check your public key and also ensure you app is signed with a non-debug keystore not appears to be crashing due to the key not being able to be decoded.
     
  24. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    @prime31, my public key appears to be correct and I've generated a non-debug keystore. Is there another reason it wouldn't be able to decode?

    EDIT: so I re-entered my public key after making sure I wasn't copying newline characters and my app is no longer crashing. However I am not seeing any callback functions getting called.
     
    Last edited: Sep 23, 2011
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, is your app setup on the Market website?
     
  26. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    @prime31 yes my app is set up on my market account and the account on my device is set up as a test user. Also I fixed the crashing but found another issue, see my post above.
     
  27. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    okay, after not crashing a total of one time it appears to be crashing again. Same errors in the log.
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, shoot me an email to mike (at) prime31.com and I'll send over a debug build with a bit more logging so we can see exactly what key is causing the base64 decoder to poop itself.
     
  29. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Getting another crash bug today. This time with the Mobclix plugin when I call displayFullScreenAd().

    I call requestFullScreenAd() first then check if(MobclixAndroid.isFullScreenAdRead()).

    my log shows a nullPointerException:

    I have the proper application ID in the manifest for mobclix and banner ads work fine. Some fullscreen ads get displayed without error, but most of the time it crashes with the null pointer exception.

    I haven't provided an Admob publisher ID since I'm not using Admob at this point. Could this be part of my problem? Should I take that entry out of the manifest?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, that crash looks like it is coming from the Mobclix library. Are you using the latest version of the plugin?
     
  31. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Looks like that did it. I imported the new plugin and generated a new manifest and it appears to work properly now. Thanks.
     
  32. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    after testing some more with mobclix it appears to still be crashing. Also I have noticed that the package I get from my download link only contains the testsupport folder and the manifests; nothing else.
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, what is in the logcat console that makes you think the Mobclix code is causing the crash (is it the exact same error you had before)? Does it only occur with full screen ads? Have you used the Prime31 menu item to generate a manifest file?

    Please email me (questions at prime31.com) your download link. If your download doesn't contain the files that would most likely not allow anything at all to work.
     
  34. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    The most recent log:

    Code (csharp):
    1. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639): FATAL EXCEPTION: main
    2. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.quantumsquid.VeggieSamurai/com.millennialmedia.android.MMAdViewOverlayActivity}: java.lang.NullPointerException
    3. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    4. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    5. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    6. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    7. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.os.Handler.dispatchMessage(Handler.java:99)
    8. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.os.Looper.loop(Looper.java:123)
    9. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread.main(ActivityThread.java:4627)
    10. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at java.lang.reflect.Method.invokeNative(Native Method)
    11. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at java.lang.reflect.Method.invoke(Method.java:521)
    12. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
    13. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    14. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at dalvik.system.NativeStart.main(Native Method)
    15. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639): Caused by: java.lang.NullPointerException
    16. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at com.millennialmedia.android.MMAdViewWebOverlay.<init>(MMAdViewWebOverlay.java:277)
    17. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at com.millennialmedia.android.MMAdViewOverlayActivity.onCreate(MMAdViewOverlayActivity.java:65)
    18. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    19. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    20. 10-03 09:18:11.008: ERROR/AndroidRuntime(22639):     ... 11 more
    This is a different error than I've seen before only in that it happens via the millenial activity. I recently added millenial support through mobclix. Since I added admob and millenial I have noticed crashes happening without displaying fullscreen ads (although I am still requesting them). I have used the menu to generate a new manifest since the last time I imported the plugin package.
     
  35. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    After a little more investigation the mobclix package appears to have everything in it and imports fine into a new project but doesn't seem to import everything into my existing project.
     
  36. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    After manually deleting the mobclix files I was able to reimport the full package. However I am still getting crashes.
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, can you post the AndroidManifest that you are using? The only thing that I could possibly see is that the Millenial Activity is not in there. If it is in fact in the manifest you will need to send your project over to the Mobclix support crew to give it a look. Both the Mobclix code that launches the ad and the Millenial code that displays the ad is all closed source.
     
  38. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Code (csharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest
    3.     xmlns:android="http://schemas.android.com/apk/res/android"
    4.     package="com.unity3d.player"
    5.     android:installLocation="preferExternal"
    6.     android:versionCode="1"
    7.     android:versionName="1.0">
    8.     <supports-screens
    9.         android:smallScreens="true"
    10.         android:normalScreens="true"
    11.         android:largeScreens="true"
    12.         android:xlargeScreens="true"
    13.         android:anyDensity="true"/>
    14.  
    15.     <application
    16.         android:icon="@drawable/app_icon"
    17.         android:label="@string/app_name"
    18.         android:debuggable="true">
    19.         <activity android:name="com.unity3d.player.UnityPlayerActivity"
    20.                   android:label="@string/app_name"
    21.                   android:configChanges="keyboard|keyboardHidden|orientation">
    22.                 <intent-filter>
    23.                     <action android:name="android.intent.action.MAIN" />
    24.                     <category android:name="android.intent.category.LAUNCHER" />
    25.                 </intent-filter>
    26.         </activity>
    27.         <activity android:name="com.unity3d.player.VideoPlayer"
    28.                   android:label="@string/app_name"
    29.                   android:configChanges="keyboard|keyboardHidden|orientation">
    30.         </activity>
    31.  
    32.  
    33.             <!-- ACTIVITIES -->
    34.         <activity android:name="com.mobclix.android.sdk.MobclixBrowserActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
    35.         <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/>
    36.         <activity android:name="com.millennialmedia.android.MMAdViewOverlayActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
    37.         <activity android:name="com.millennialmedia.android.VideoPlayer" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:configChanges="keyboard|keyboardHidden|orientation"/>
    38.         <activity android:name="com.openfeint.internal.ui.IntroFlow"
    39.                   android:label="IntroFlow"
    40.                   android:configChanges="orientation|keyboardHidden"
    41.                   android:theme="@android:style/Theme.NoTitleBar"
    42.                   android:screenOrientation="landscape"/>
    43.  
    44.         <activity android:name="com.openfeint.api.ui.Dashboard"
    45.                   android:label="Dashboard"
    46.                   android:configChanges="orientation|keyboardHidden"
    47.                   android:theme="@android:style/Theme.NoTitleBar"
    48.                   android:screenOrientation="landscape"/>
    49.  
    50.         <activity android:name="com.openfeint.internal.ui.Settings"
    51.                   android:label="Settings"
    52.                   android:configChanges="orientation|keyboardHidden"
    53.                   android:theme="@android:style/Theme.NoTitleBar"
    54.                   android:screenOrientation="landscape"/>
    55.  
    56.         <activity android:name="com.openfeint.internal.ui.NativeBrowser"
    57.           android:label="NativeBrowser"
    58.           android:configChanges="orientation|keyboardHidden"
    59.           android:theme="@android:style/Theme.NoTitleBar"
    60.                   android:screenOrientation="landscape"/>
    61.  
    62.             <!-- META-DATA -->
    63.         <meta-data android:name="ADMOB_PUBLISHER_ID" android:value=""/>
    64.         <meta-data android:name="com.mobclix.APPLICATION_ID" android:value="insert-your-application-key"/>
    65.         <meta-data android:name="com.mobclix.LOG_LEVEL" android:value="DEBUG"/>
    66.  
    67.         </application>
    68.  
    69.         <!-- PERMISSIONS -->
    70.         <uses-feature android:glEsVersion="0x00010001" />
    71.   <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="9" />
    72.     <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    73.     <uses-permission android:name="android.permission.GET_TASKS"></uses-permission>
    74.     <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
    75.     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
    76.     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
    77.    
    78. </manifest>
    79.  
     
  39. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    since I reimported the package I have only been seeing a different crash (I'm not sure if millenial still has problems, but I haven't seen it since).

    the crash I'm seeing the most has a problem with the mobclix browser activity:

    Code (csharp):
    1.  
    2. 10-03 10:10:36.148: ERROR/AndroidRuntime(23779): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.quantumsquid.VeggieSamurai/com.mobclix.android.sdk.MobclixBrowserActivity}: java.lang.NullPointerException
    3.  
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, everything looks good in the manifest. Due to the OF stuff in there it's hard to point the finger 100% at the Mobclix crew though. Can you make a simple, empty project with just the plugin and see if it still has the crash? If it does, then it would be a good plan to open a bug report with Mobclix (and email me the project as well so I can try to extract a bit more information for them).
     
  41. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    I just noticed that since I reimported the mobclix manifest I forgot to re-enter my application ID whic his certainly a problem.
     
  42. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    after inputting my IDs and regererating the manifest I'm not seeing any ads (and getting a lot of adDidFailEvents), but no crashes. I may only be seeing no crashes because none of the ads are loading however.
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, that is normal when ad inventory is not available. Usually just letting it go for a few minutes will get some ads for you.
     
  44. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Ads have returned but the mobclix browser activity nullpointerexception continues when fullscreen ads are displayed.

    A simple project seems to run just fine.
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ben, I am wondering if OF is somehow conflicting with the launching of the Activity. If you remove OF does everything work properly?
     
  46. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    I removed some of the OF stuff and it was still crashing but I've found another way around it. The crash seems to only occur on the first display of a full screen ad. If I request one mid-game then display it I have no problems. I think what was happening is that my first request for a full screen ad may have executed before the mobclix script was initialized. Even though isFullScreenAdReady() returned true there was a null reference somewhere. Either way I'm not experiencing crashes anymore.

    *Edit: I guess I spoke too soon. I still see crashes but not as many.
     
    Last edited: Oct 3, 2011
  47. ben_QuantumSquid

    ben_QuantumSquid

    Joined:
    Aug 3, 2011
    Posts:
    25
    Ensuring that I'm not calling requestFullScreenAd() unless one is not available seems to have fixed my crashes.
     
  48. DanTreble

    DanTreble

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

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @DTreble, and here I expected a remark about how you have to factory reset your phone and sign in to it with a test user just to test...
     
  50. NiklasKarlsson

    NiklasKarlsson

    Joined:
    Jun 8, 2011
    Posts:
    4
    Hi,

    I am using the EtceteraAndroid plugin and more specifically the mail function, but i cant get this to work. The function crashes my game. Is there any requirements for using this?

    // Niklas

    EDIT
    This is solved. Turns out my Unity refused to output a new apk so the crash was probably something else.
     
    Last edited: Oct 6, 2011