Search Unity

NATIVE PLUGINS for Unity: iOS, Android [Need Prime31 / Easy Mobile / Stans Assets replacement??]

Discussion in 'Assets and Asset Store' started by Voxel-Busters, Apr 4, 2015.

?

Do you want to see Windows Mobile support in CPNP? FYI, current market share is less than 3%.

Poll closed Aug 26, 2022.
  1. Ooh la la, Love to see that!

    12 vote(s)
    52.2%
  2. I don't give a damn!

    6 vote(s)
    26.1%
  3. Are you crazy! Who makes games for Windows Mobile.

    5 vote(s)
    21.7%
  1. Crillst

    Crillst

    Joined:
    Dec 29, 2013
    Posts:
    69
    Im writing an in app purchase, if the user buys the non consumable he or she will no longer have to see ads.
    It works very well on iOS, but i have som trouble getting it to work on google play store.

    When i click the buy button i get an error "The item you requested is not available for purchase".
    however i can see it's got a status Active in google play developer console. and i'ts got the same id as in ios store; no_ads.

    I'm not very familiar with the android platform. Do you need to use test users if the app is not published in play store yet? (as you do with ios?)

    Has anyone else had this problem. Or do you have a suggestion of something i should test to get it to work?

    Edit: I do succeed in getting the correct price for the product from google play
     
    Last edited: Nov 29, 2015
  2. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    @Crillst I would get that message when the apk bundle version was different than the one published to the play store. So if you are testing a new version make sure not to increment the bundle version until your final build.
     
  3. Crillst

    Crillst

    Joined:
    Dec 29, 2013
    Posts:
    69
    Ah i see, maybe that can be the problem. I've uploaded new versions where the bundle version is updated as well. Although only for alfa testing. How can i get it to work with a new bundle version? is it only when i release it to production?
     
    jprocha101 likes this.
  4. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    @Crillst I haven't tried it but my guess would be that as long as you have the bundle version as an alpha or beta version in the developers console then your testers should be able to purchase the items. As long as the version is on the play store than the product id should route them to the correct product.

    You can add the testers in the beta and alpha tabs in the APK section. It sounds like the product ids are tied to the latest bundle version. As long as your testers download the new version from the play store then product should be available.
     
    Last edited: Dec 2, 2015
  5. Crillst

    Crillst

    Joined:
    Dec 29, 2013
    Posts:
    69
    This is what solved my problem. It was working all along probably :) But everytime i tested on my android device i was building a new apk file and uploaded it from unity. And that apk had a new bundle version.

    But when i tried installing the apk from google play store (the one in alpha-testing) it worked very well.
    Thanks for your help, @jprocha101
     
    jprocha101 likes this.
  6. jprocha101

    jprocha101

    Joined:
    Apr 8, 2015
    Posts:
    134
    That's wonderful! Glad I could help.
     
  7. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I have updated to the newest version of the plugin and I'm no longer able to use game services on Android. When game services are called from android, I get the following printed in the console: http://i.imgur.com/Rrp1R2y.png

    Any ideas?)
     
  8. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I got rid of the error above by reimporting everything.

    @Voxel Busters Is there a way to add a custom notification sound to a remote notification? Also, can you allow more settings for the android notification? Like big view when you pull down the notification bar, and also buttons and custom intent actions.

    I'm also facing this issue with the updated plugin on iOS. Although it happens only in 1 of my apps where I don't have achievements(there's just leaderboard), while in other it works fine with game center. EDIT: it works if make achievement in game center then just delete it.
     
    Last edited: Dec 7, 2015
  9. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Hey,
    I'm searching the web for a long time for a suitable social plugin that can give me the infomation if user actually "shared" or just left the window without sharing. Can this plugin return me such information?
    Thank you.
     
  10. rakuzas

    rakuzas

    Joined:
    Jul 23, 2015
    Posts:
    9
    Just download your Lite Asset to try.. Then.. I got this error..

    Code (CSharp):
    1. Error: System.ArgumentException: An element with the same key already exists in the dictionary.
    2.   at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0
    3.   at us.UnityScriptCompilerFactory.FromCommandLineOptions (us.CommandLineOptions options) [0x00000] in <filename unknown>:0
    4.   at us.UsModule.compile (us.CommandLineOptions options) [0x00000] in <filename unknown>:0
    5.   at us.UsModule.runWithCommandLine (System.String[] commandLine) [0x00000] in <filename unknown>:0
    6.   at us.UsModule.Main (System.String[] argv) [0x00000] in <filename unknown>:0
    FYI : I'm using Google Play Services in my asset to Save, Load and Login my player.. Thank you..
     
    Last edited: Dec 8, 2015
  11. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hi @rakuzas

    Coming to your problem, this exception is thrown when same Define Symbol exists in PlayerSettings as well as in rsp file. So just deleting all the .rsp files placed under Assets folder and restarting Unity will fix your issue.
     
  12. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Unfortunately, there's no way to find out sharing status on Android platform. So we have not supported this functionality in our plugin.
     
  13. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Let me straight away get into answering your queries:

    • Yes its possible to add custom notification sound. Please check this tutorial post for more info on it. Big view notifications are currently not supported in our plugin. But we are considering to add it in the next version.

    • Yes, its a known issue which occurs only if application doesn't use Achievements. Anyways we have resolved it already. Please drop a mail to support requesting for the fix and we would be happy to share it with you.
     
  14. Solid_Metal

    Solid_Metal

    Joined:
    Mar 25, 2015
    Posts:
    45
    @Voxel Busters how to setting/customize the android permission?, it put permission for something that i not needed at all
    i try to edit the scripting define symbol on player setting, but it always reset back everytime i compiling
    already found a thread with the same exact question on your forum, but didn't help at all

    please help D:
    i'm using 5.2.2

    for now i manually deleting the NPandroidmanifestgenerator and your manifest file
     
    Last edited: Dec 10, 2015
  15. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hi @Solid_Metal, please goto NPSettings->Application settings. And select the features that you want to use within your app, deselect the rest. Next step, save all these changes by clicking Save button. Thats it! You just created manifest file with only those permission which are required by the features you chose to use. Even the Define Symbols are updated, by retaining only the macro symbols which are necessary based on your selection.

    Hope this answer helps you.

    Cheers!
     
    Solid_Metal likes this.
  16. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    Actually, facebook SDK has that feature built-in, i was talking about twitter and g+...
     
  17. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Okie got it! Use Tweet methods provided by the Twitter feature. Its completion handler will provide you the required information.

    In previous post, I assumed that you were asking about status received after sharing items using Sharing feature. Here its not possible to know the share result on Android platforms.
     
  18. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Cross Platform Native Plugins Roadmap:

    December release:
    • New Addon Service: Soomla Grow inbuilt support.
    • Feature enhancements, bug fixes.

    January release:
    • New Platform: Amazon support.
    • New Feature: Cloud storage.
    • New Addon Service: One Signal inbuilt support.
    • PlayMaker support.

    CPNP_Promo.png
     
    Solid_Metal and jprocha101 like this.
  19. CitrusMedia

    CitrusMedia

    Joined:
    Mar 3, 2015
    Posts:
    3
    Hello,
    I really love your Plugin! Amazing job!

    I have a simple question: How can I attach a PDF File from an web link to an Email with NPBinding.Sharing.SendMailWithAttachment ?

    Thanks for your help!
     
  20. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hey,

    Thank you very much for your kind words.

    And coming to your query, please use HTML text in your mail body for linking web files within your Email. Following code example shows how it is done:

    Code (CSharp):
    1. string _mailBody = "Please refer to this <a href =\"url \">pdf file</a>."
    2.  
    3. MailShareComposer_composer = newMailShareComposer();
    4. _composer.Body = _mailBody;
    5. _composer.IsHTMLBody = true;
    6.  
    7. // Show share view
    8. NPBinding.Sharing.ShowView(_composer, FinishedSharing);
     
    CitrusMedia likes this.
  21. ThaderGamesSL

    ThaderGamesSL

    Joined:
    Jul 29, 2015
    Posts:
    3
    We are super excited about the Amazon support, we would like to have it as soon as possible since we are delaying our release on Amazon just waiting for it. If you need beta testers contact us. Keep the good work!

    Thanks.
     
    Voxel-Busters likes this.
  22. zkaiser

    zkaiser

    Joined:
    Feb 22, 2014
    Posts:
    12
    Hi all,

    I need to play a video imported in Unity (local video). Is it posibble with your plugin? I have seen in the code that PlayVideoFromURL says: "This can be an URL pointing to local/remote file". Has local file be placed in specific folder?? or do I have to call it in some special way??

    Thanks
     
  23. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hi @zkaiser,

    Yes, its possible to play videos at remote path as well as local.

    In order to play video locally, first place the file under streaming assets folder. Then provide this path info, to the API PlayVideoFromURL for playing video at given path. You might already noticed that, here we are expecting a struct type parameter URL and its definition provides 2 static methods i.e., one for creating Remote URL path (URLWithString) other is for creating local URL path (FileURLWithPath).

    Hope this helps you. Incase if you face any trouble, then please drop a mail to our support team.
     
  24. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    Is it possible to have the url of some app and clicking on it opens play store/app store directly? I know this is possible for android if make custom java plugin but what about cross platform universal solution so it works for ios too? Can it be done with this plugin?

    Edit: actually I just noticed it's possible to do it with regular Application.OpenURL function.
     
    Last edited: Dec 17, 2015
  25. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Please use Utility.OpenStoreLink method for opening store page from your application.
     
    Simon_says likes this.
  26. CitrusMedia

    CitrusMedia

    Joined:
    Mar 3, 2015
    Posts:
    3
    Amazing Support connected to an amazing Plugin! A MUST HAVE for every Unity Developer.

    Thanks a lot, I completed an amazing Game with your Plugin. Merry XMAS!
     
  27. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Cheers! Happy coding :)

    Merry xmas :)
     
  28. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    Is it possible to show a "loading" preview screen while opening game services? Sometimes it takes time to open them on android and it's even worse on ios, and a semi transparent loading screen with interaction disabled would be good here. Even on iphone 6s and fast connection it takes a few seconds for the login popup to show for game center, after it has been called from a button in game. Same for android(nexus 6p, on older devices it takes even longer).

    Also, is there an alternative for a toast message on iOS?
     
  29. jimmy_doodle

    jimmy_doodle

    Joined:
    Nov 8, 2015
    Posts:
    22
    Is the new year discount also in the assets store?
     
  30. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Yes, even we have noticed that sometimes Game Service's auth handler take awful amount of time to validate credentials. And like you said, adding loading spinner would be a good solution. Having said that, we have left this option open to developer, so that he has full control over customising controls as per his preference.

    And if you are interested in using native spinners, then please check Handheld class documentation. It provides all the necessary methods that are required to control activity spinners.
     
    Simon_says likes this.
  31. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Yes, CPNP - Ultra Pack is now available @ Unity Asset Store with discount of 25% off. New price is $33.99! Ultra pack supports all the native features on both iOS and Android platform. And soon Amazon platform support will also be included.
     
    jimmy_doodle likes this.
  32. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hi Developers,

    We have been getting few mails, asking if CPNP can be used from JavaScript classes. So we thought it would be good to have have a blog post on this subject. So here you have it! We just posted a blog about Using CPNP along with JS. Please go through it and let us know your thoughts.

    Happy Coding!

    Regards
    VB Team
     
  33. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I have also sent you an email regarding this but didn't got answer yet, seems like this only works for local notifications unless I'm doing something wrong.

    I have checked it, but it's quite outdated. Android spinner doesn't turn up in the center of the screen and also interaction is not disabled. Can only enable/disable spinner, can't customize it. Is it possible that you make your own native spinners with better controls over customizations?

    And can you make some alternative for toast on iOS? You might just even integrate some of the done 3rd party code like this one https://github.com/scalessec/Toast
     
  34. AlanGameDev

    AlanGameDev

    Joined:
    Jun 30, 2012
    Posts:
    437
    Hello there. I'm working in a game and I think your plugin could have what we need, except that I'm not sure if it has Facebook scores (leaderboards). Could you confirm that please?

    Also, here is a list of what we need just in case:
    • Sharing on Facebook and Twitter
    • Inviting friends on Facebook
    • Facebook "Like" verification
    • Single Apple Store and Google Play IAP to unlock full version of the game and disable ads
    • Leaderboards on Game Center, Google Play and Facebook (scores)
    Thank you
     
  35. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Okie, thanks for the info. We haven't used it till date, so we weren't aware of its limitation. Anyways we will consider adding it in future updates. Also, we will look into providing alternative solution for Toast on iOS platform.
     
  36. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Hello!

    Thanks for showing interest in our product.

    FB features like Like, Invite friends, Scores are not supported by our plugin. Actually it doesn't include FB SDK, as official SDK for Unity is already available. So I recommend you look into it once and save some bucks.

    Rest of features mentioned above are supported by our plugin on both iOS and Android.
     
  37. AlanGameDev

    AlanGameDev

    Joined:
    Jun 30, 2012
    Posts:
    437
    Thank you for the quick reply. I'm aware that the official Facebook SDK is available, but it doesn't really have a leaderboards feature, so you have to do it from scratch, what's not very straightforward and takes a lot of time. I'm going to consider that though. There's another plugin only for Facebook leaderboards and invitation, perhaps it will be a good complement to your plugin.
     
    Voxel-Busters likes this.
  38. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    By the way what all features do you see missing in official SDK. Based on your input, we will try to add few extension methods to the official SDK.

    Looking forward to hearing from you.
     
    AlanGameDev likes this.
  39. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    My project fails to compile when building for WSA(phone 8.1 or universal 10) because of your plugin scripts. Is that intended or?
     
  40. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Sorry we weren't aware of it. Last time we checked everything was working fine. So can you please share the logs with our support team. We will look into it and get it rectified asap.
     
    Simon_says likes this.
  41. AlanGameDev

    AlanGameDev

    Joined:
    Jun 30, 2012
    Posts:
    437
    I think a simple and straightforward way to implement a "Facebook" leaderboard (scores) and optionally also check if a page was "liked" and perhaps also allow the user to "invite" friends. Maybe you could take a look on the competition :p. I personally don't need anything fancy, but if you could make it easily testable would be great. From experience, testing is a huge problem when developing for mobile using these popular 3rd party services. Most platforms just suck or simply don't allow proper testing, so you have to develop blindingly and pray it's going to work, what's totally unacceptable for me because I'm an advocate of test-driven development. So, if you could provide ways to somehow test independently from 3rd party services, then it would be a huge plus. It seems you provide easy ways to test the other features of your plugin, and that's something that really attracted my attention, obviously you can never trust much in tests performed independently, because you can never 'simulate' the real shebang reliably, but neither the official testbeds --when they exist-- can achieve that. The hard part is assuming that everything external is going to work correctly, but that's a small price to pay for a lot of extra confidence.
     
    Voxel-Busters likes this.
  42. Solid_Metal

    Solid_Metal

    Joined:
    Mar 25, 2015
    Posts:
    45
    hey guys,
    so i got this error on logcat

    I/Unity (19698): NullReferenceException: Object reference not set to an instance of an object
    I/Unity (19698): at VoxelBusters.NativePlugins.NPSettings.get_Application () [0x00000] in <filename unknown>:0
    I/Unity (19698): at NPBinding.get_NotificationService () [0x00000] in <filename unknown>:0
    I/Unity (19698): at _MenuManager.Awake () [0x00000] in <filename unknown>:0

    now, i use couple SDKs, i use official FB SDK, this plugin, and admob

    before i was using old 6.2 FB SDK and works well, and then i update it to newer FB SDK 7.2.2, then the problem occured, it freezes my mainmenu
    downgrade the FB SDK is not an option because i need couple features that they added on new FB SDK, is there any quick fix for this?

    heres partial of the code
    Code (CSharp):
    1.  
    2. void Awake()
    3.     {
    4.     NPBinding.NotificationService.RegisterNotificationTypes(NotificationType.Alert | NotificationType.Badge | NotificationType.Sound);
    5.     }
    6.  
    7. void Start()
    8.     {
    9.         //notification script
    10.  
    11.         CrossPlatformNotification _notification = CreateNotification(3, eNotificationRepeatInterval.DAY);
    12.         //Schedule this local notification.
    13.         NPBinding.NotificationService.ScheduleLocalNotification(_notification);
    14. }
    15.  
    16. ///================== NOTIFICATION NATIVE CODE =======================
    17.     private CrossPlatformNotification CreateNotification(long _fireAfterSec, eNotificationRepeatInterval _repeatInterval)
    18.     {
    19.         // User info
    20.         IDictionary _userInfo = new Dictionary<string, string>();
    21.         _userInfo["data"] = "custom data";
    22.  
    23.         CrossPlatformNotification.iOSSpecificProperties _iosProperties = new CrossPlatformNotification.iOSSpecificProperties();
    24.         _iosProperties.HasAction = true;
    25.         _iosProperties.AlertAction = "text1!";
    26.  
    27.         CrossPlatformNotification.AndroidSpecificProperties _androidProperties = new CrossPlatformNotification.AndroidSpecificProperties();
    28.         _androidProperties.ContentTitle = "text2!";
    29.         _androidProperties.TickerText = "text3";
    30.         _androidProperties.LargeIcon = "appNotif.png"; //Keep the files in Assets/PluginResources/Android or Common folder.
    31.  
    32.         CrossPlatformNotification _notification = new CrossPlatformNotification();
    33.         _notification.AlertBody = "text2"; //On Android, this is considered as ContentText
    34.         _notification.FireDate = System.DateTime.Now.AddSeconds(_fireAfterSec);
    35.         _notification.RepeatInterval = _repeatInterval;
    36.         _notification.SoundName = "Notification.mp3"; //Keep the files in Assets/PluginResources/Android or iOS or Common folder.
    37.         _notification.UserInfo = _userInfo;
    38.         _notification.iOSProperties = _iosProperties;
    39.         _notification.AndroidProperties = _androidProperties;
    40.  
    41.         return _notification;
    42.     }
    43.     ///===================================================================
    44.  
    45.  
     
    Last edited: Dec 30, 2015
  43. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Sorry for the inconvenience caused.

    From the log it doesn't seem like an an issue caused by updating to latest FB SDK. Anyways can you please answer few question to find out the exact reason:
    • Have you placed NPBinding prefab object in your scene?
    • Is the NPBinding object placed as a child of some other Game Object? NPBinding is a persistent object i.e, single instance will be alive throughout the application lifecycle. So incase if you have it as a child object, then it might get destroyed when the next scene loads, until and unless the parent is also marked as persistent object. Hope it makes sense!

    Looking forward for your reply.

    Regards
    VB Team
     
    Last edited: Dec 30, 2015
    Solid_Metal likes this.
  44. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Sorry, I meant NPBinding.

    Okie no worries! We will test it with latest FB SDK and try to find the reason for this.

    And BTW, was this issue noticed in Unity Editor? Any steps to reproduce it? Also do you find the same problem with our demo scene?
     
  45. Solid_Metal

    Solid_Metal

    Joined:
    Mar 25, 2015
    Posts:
    45
    @Voxel Busters , i think the warning on editor is my mistake, cause i forgot to turn off some of the features that i'm not use, but its sometimes a pain because the setting keep resetting even tho i already save it D:

    and another question, because i'm using the notification feature, sometimes theres random notification with my notification text pop up on the editor, is there any way to disable this just for the editor?

    edit :

    and heres the complete error on logcat, hope it'll help

     
    Last edited: Dec 30, 2015
  46. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Sorry, this is the first time we are hearing complaints about NPSettings. So can you please share more details about it. Acc to us, Unity crash is the only point at which this issue might occur. As it is possible that all the changes might be lost at that point. Anyways, let us know if there are any other scenarios.

    Okie, Im guessing that you might have scheduled a repeatable notification which hasn't been cancelled yet. Thus it keeps popping up notification alert, whenever a notification was received. Solution for it would be to call, CancelAllLocalNotification or incase if you have its id then you can call CancelLocalNotification.
     
  47. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Last few days of New Year's Sale! Grab your copy of CPNP @Unity Asset Store with great discounts :)
     
  48. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Plugin just got Meaner!

    We have been hearing lot of complaints regarding online documentation. And even we admit that it din't completely justify the product. So, we started working on improving it and making it more useful. So here it is, our new documentation with extra description, extra notes, extra examples.

    New documentation includes updates for following features:
    • AddressBook
    • Billing
    • Game Services
    • Media Library
    • Network Connectivity
    • Notification Services

    Remaining ones will be updated soon!

    Please have a look into it and let us know your feedback.

    Cheers
    VB Team
     
    Solid_Metal and jprocha101 like this.
  49. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,963
    Quick update: We just posted the revised documentation for Sharing feature. Please make good use of it.

    Happy Coding!
     
  50. Solid_Metal

    Solid_Metal

    Joined:
    Mar 25, 2015
    Posts:
    45
    sorry for the late reply, i notice that it always restarted everytime i change somethings on the NPSetting, in my case i change the badge image quite often for now, but nothing too serious