Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Closed] Etcetera Plugin Live! Alerts, prompts, loading views, push, localization and more!

Discussion in 'iOS and tvOS' started by prime31, Oct 18, 2010.

  1. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    @prime31

    Well then I have to either write my own plugin or make my own date picker :(
     
  2. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    @prime31

    Well then I have to either write my own plugin or make my own date picker :(

    EDIT:
    Sorry about the doublepost internet is behaving a bit weird
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @trip, honestly, the built in iOS date picker is pretty hideous and it doesn't match the UI of anything. Consider it a blessing in disguise that you get to make your own ;)
     
  4. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Could you please explain "The values sent are multiplied by the screens dpi on the native side."? Because on my Samsung Galaxy Nexus (Screen.width=720 Screen.dpi=317) my frame values seem to be multiplied by 2, not Screen.dpi. For example, setting the frame width to Screen.width/4 results in half the screen. Of course this is not the case on all phones (On Samsung Galaxy S it's "multiplied by 1"). So how do I figure out which value it's multiplied by?

    *edit

    I have tried using DP (Screen.dpi/160p). Works fine on the Galaxy Nexus which is ~320dpi but not on the Galaxy S which has a dpi of ~240dpi beacuse it generates a DP of 1.5 and for it to look good it needs to be 1.
     
    Last edited: Jul 17, 2013
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @break, please post Android questions in the Android forum.
     
  6. JuiceReis

    JuiceReis

    Joined:
    May 28, 2013
    Posts:
    29
    Hi @Prime31 ,
    I'm having a problem with my takescreenshot method, I'm saving it to the datapersistantpath and once I click the button to take another photo it moves the previous photo into the photo library and puts the most current screenshot taken in the datapersistantpath - how would I be able to direct the photo into the photo library?
     
    Last edited: Jul 17, 2013
  7. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
  8. JuiceReis

    JuiceReis

    Joined:
    May 28, 2013
    Posts:
    29
    Anyone point me in the right direction please? Need to get this fixed asap
     
  9. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    Since the recent update, showMailComposerWithScreenshot is not working for me. It's putting an all-black image into the mail message, while the screen behind it is obviously not all black. This is in an app that was previously working. Before installing this most recent Etcetera update, I deleted all previous files (I read somewhere that I should do that with this update, but now can't find where).

    I didn't change the JS code that previously worked:

    Code (csharp):
    1.     EtceteraManager.mailComposerFinishedEvent += mailComposerFinished;
    2.     StartCoroutine(EtceteraBinding.showMailComposerWithScreenshot("", "Lab Report, Speed of Sound", tStr, false));
    Now that I look at it, the docs show one less argument than before, but the sample code (EtceteraGUIManager) shows it the same as before with that extra argument. I had to remove that first argument to get it to compile

    Is there something different I need to be doing since the update? I thought I read something about that somewhere, but can't find it now. Thanks.
     
  10. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    Any idea about the screen shot not working? I really need a solution as I am completely stuck.

    I tried deleting all the new files and installing the last version I had downloaded, 2012-12-26, but that generates linker errors in Xcode now. I tried running the auto update within Unity for that older version, and then it won't compile in Unity (problems with the hashtable in EtceteraManager). It looks like the only version that works in both Unity and Xcode is the current one, but it doesn't do screenshots any more.

    Any suggestions? I have several apps I'm right in the middle of updating, all of which use screenshots, and now I'm dead in the water. I really can't afford to hold things up much longer. Please help!
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, there is nothing magical about the screenshots. They use standard Unity ReadPixels calls or Application.CaptureScreenshot. There is absolutely no native code involved with screenshots. If they aren't working you need to open a bug report with Unity as the code is not ours.
     
  12. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    Getting a little frustrated here. Every problem I've had with Etcetera, I've been told it's not Etcetera's fault (e.g., WebViews that don't work reliably).

    Regardless whether this is a Unity or Etcetera problem, it worked in the previous version of Etcetera and does not work in the current version of Etcetera. (Your demo doesn't even work!) Which means that it's under your control. If you choose, you could easily make it work again, rather than just telling me too bad, it's not your problem. Your choosing not to fix it just leaves me high and dry with no solution until it might possibly be fixed in a future update of Unity.

    Since you changed the working screenshot function into a non-working function, how about either putting it back to the way it was when it worked? Or how about making an older, working version available that I can download and use? Please let me know if either of these is an option ASAP, since I will need to find a working solution immediately if Etcetera is no longer an option. Thanks.
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, if ReadPixels isn't working for you due to some odd rendering you may be doing then you can use Application.CaptureScreenshot. There is nothing stopping you from taking a screenshot any way you want and just calling showMailComposerWithAttachment.
     
  14. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    Is it working for you? Does your demo scene work for you? Is there also some odd rendering going on in the demo scene, because it doesn't work for me either. Just to be clear, this is on an iPad 3, iOS 6.1.3.

    I don't know what "odd rendering" means. Please explain what that is and how it would affect capturing screen pixels. It's just a Unity screen, with 3D models and some 2D interface graphics. Same as the 20+ other apps that I've used this function with in the past, which was working correctly until the last update. So it's not something unique to a particular app, it's unique to the latest version of Etcetera. Which means you could fix it (i.e., put it back the way it was), if you so choose.

    I've looked at Application.CaptureScreenshot and am not sure how to use it on iOS. I have no idea what path to use so showMailComposerWithAttachment can retrieve it, and I'm not sure what attachmentMimeType refers to.

    It sounds like you're not going to make an older, working version of Etcetera available. Unfortunately, I've been using the auto update, and so don't have any recent packages. The most recent complete package I have is 2012-02-25, and that version doesn't compile any more. At the very least, if you're not going to do anything to fix the most recent update, please give me an older version that works. That would cost you nothing, minimal effort. I'm too far into this project to have to start all over with a different plugin, but based on your responses, it's looking like that's just what I'm going to have to do.
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, the demo scene is tested and working on iPad 1, 2, 3, 4 and mini running iOS versions 5 - 7b4. From the Application.CaptureScreenshot documentation you can learn where the files are loaded: "On mobile platforms the filename is appended to the persistent data path." The PNG mime type is image/png. Mime types for all other file types can be found by just Googling "FILE_EXTENSION mime type"
     
  16. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    I did finally get it working by copying older Etcetera files from another project. Now the screen capture in this project works, which means it's something to do with Etcetera and not my project or Unity. It's not some "odd rendering." Something changed in Etcetera that caused this function to break.

    One thing I learned is that you apparently can't just copy Etcetera files from one project to another. Sometimes it works, sometimes it doesn't. Sometimes, if there are two P31RestKit.dll files, it causes Unity to crash on launch. Odd that the original project with duplicate files doesn't crash, but only when copied to a new project. I don't know why there are two of those files, but it looks like there are in many older projects.

    The other thing I learned is that the local Unity docs do not match the online version. That additional info about CaptureScreenshot that you linked to in the online version is NOT in the local version I have.

    I would still appreciate it if you would make the most recent version of the Etcetera package available for download. I really don't want to have to go through this every time I update a project (or start a new one). And I don't want to have to start dealing with workarounds every time. Bottom line: The previous version works, the current version does not. Please make the previous version available. Thanks.
     
  17. Anonymous3

    Anonymous3

    Joined:
    Jun 5, 2013
    Posts:
    7
    Hi Prime,

    I am using Etcetera Android plugin to take a photo using device camera. Its observed that in most of the devices, the image is rotated by 90 degress CC, after taking a picture from cam(back camera). I have observed this behaviour on Samsung Galaxy S Xperia P. How can this be fixed.

    Thank you
     
  18. Anonymous3

    Anonymous3

    Joined:
    Jun 5, 2013
    Posts:
    7
    Hi Prime, I have integrated Flurry with my App, I am able to see ads but I am not able to view the events logged on the app dashboard. I have waited for more than 2 days for the events to be logged. Thank you
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @anonymous, you will want to contact Flurry if your events are not showing up after 48 hours. We have no access to their servers so there is nothing we can do to assist.
     
  20. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    It would appear that the latest version of Etcetera requires Unity 4.2, which appears to have fixed the screen capture problem. That would have been REALLY nice to know, especially since Unity's auto update said I was up to date with 4.1.5f1.
     
  21. John-Higuera

    John-Higuera

    Joined:
    Oct 14, 2012
    Posts:
    20
    Everything works fine, in the editor, even on PC and an small test on Android, but on iOS we are getting this error once exported and using Xcode to run the app on the deice, we don't know why,

    /Assets/Editor/Etcetera/AppControllerPushAdditions.h:10:9: 'AppController.h' file not found

    Any advice would be very appreciated.
     
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, delete all old files and reimport the latest version of the plugin. You have pre Unity 4.2 files still in your project.
     
  23. ___Petr___

    ___Petr___

    Joined:
    Jun 4, 2013
    Posts:
    40
    I get a crash in my iOS program on line

    Code (csharp):
    1. EtceteraBinding.showAlertWithTitleMessageAndButtons( "" , "Blablbabla" , new string [] {  "Cancel" ,  "Restore"  } );
    2.  
    I found this by placing Debug.Log("...") before and after this line.

    Xcode stops on line 73 in CrashReporter.mm, with message in green "EXC_BREAKPOINT code=EXC_ARM_BREAKPOINT ...."

    In my C# code I have

    Code (csharp):
    1. Action<string> restoreHandler = null;
    2. restoreHandler = (string title) => {
    3.                    
    4.                 EtceteraManager.alertButtonClickedEvent -= restoreHandler;
    5.                
    6. ....
    7.  
    8.             };
    9. EtceteraManager.alertButtonClickedEvent += restoreHandler;
    10.  
    before call to EtceteraBinding.showAlertWithTitleMessageAndButtons

    The crash occurs frequently, but not always.

    I think I have latest version of plugin.
    I update it recently.

    How should I fix this?
     
    Last edited: Aug 26, 2013
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Petr, please provide steps to reproduce using the demo scene along with a full backtrace. We cannot reproduce the crash and if it isn't reproducible using the demo scene than most likely the issue is with your code elsewhere.
     
  25. mayur.bendale

    mayur.bendale

    Joined:
    Oct 3, 2012
    Posts:
    6
    @prime31
    i am not actually getting

    EtceteraAndroid.askForReview(int launchesUntilPrompt, int hoursUntilFirstPrompt, int hoursBetweenPrompts, string title, string message, bool isAmazonAppStore = false )

    i have to prompt alert after 24hrs, so what value function should take place????
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @mayur, I believe you are asking what parameter to pass for showing the prompt every 24 hours. Just pass in 24 for the hoursBetweenPrompts parameter.
     
  27. John-Higuera

    John-Higuera

    Joined:
    Oct 14, 2012
    Posts:
    20
    @Prime31, We would like to know a simple example of how can we save a screenshot from the screen of the unity scene to the camera roll, so after using the app, the photo can be access from the camera roll if you want, please nothing is working for us, please let us know.

    Thanks in advance
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, take a screenshot however you want with the default Unity methods (Application.CaputureScreenshot, Texture2D.ReadPixels, etc) then all you do is call EtceteraBinding.saveImageToPhotoAlbum with a valid path to the file.
     
  29. John-Higuera

    John-Higuera

    Joined:
    Oct 14, 2012
    Posts:
    20
    Thanks Prime31, Well I'm using this

    string filename = "Image"+count+".png";
    StartCoroutine(EtceteraBinding.takeScreenShot(filename;));
    string path = Application.persistentDataPath + "/" + filename;
    path = path.ToString();
    EtceteraBinding.saveImageToPhotoAlbum(path);

    We know that the event is been fired, because it get freeze a bit, and then continues, but the camera roll of the iOS doesn't show the saved screenshot,

    Thanks for the support
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, that code will not work. Taking a screenshot takes time (often 1 - 3 seconds). Your code is trying to save it to the photo album before the image even exists. You should be giving it more time and checking that the file exists with standard .NET methods such as File.Exists.
     
  31. John-Higuera

    John-Higuera

    Joined:
    Oct 14, 2012
    Posts:
    20
    thanks a lot!
     
  32. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi Mike
    I have a question regarding ETC and the localization feature.

    I have a lot of localization in my game (1900 words over 5 languages).

    I'm currently testing on lowest platforms, and have been having issues with iPad1 of course, because it's old. Anyway, my game start it's taking 50 mb real memory... loading into the main hub area it then goes to 80. That's fine. As long as I keep it 100 it all runs well without memory warnings.

    That's until I ad my localizable.strings into xcode for each language. Real memory suddenly blows out to 120mb real memory. Of course, this crashes an iPad1.

    Do you know why it would do this? I'm trying to profile at the moment but my profiler keeps crashing (that's a whole other issue)

    Thanks
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ocean, I can't say I have ever seen that happen. Xcodes localization is just a few .strings files. If it is taking 20+ megs something is going seriously wrong and you will want to report that to Apple.
     
  34. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi Mike

    I've been doing tests of this and wanted to show you.... Thought maybe you could advise what else to look for.

    I did fresh clean build.

    This is the pre-localisatoin result (my game is the blue sector)

    $localise-before.png


    I localised just one file (english) and put the text in.

    Profile it and these are the post localisation results:

    $localise-after.png


    It's a massive difference and I can't figure out why. It makes no sense.

    After I did the last test, I deleted all the text in the localizable.strings file, did another profile, and it's back to optimum.

    So it's definitely a strings issue.

    Are there etcetera events or something that could be triggering all that memory usage once strings are in?
     
    Last edited: Sep 13, 2013
  35. mayur.bendale

    mayur.bendale

    Joined:
    Oct 3, 2012
    Posts:
    6
    @prime31

    Thanx for the reply,

    means we should pass like EtceteraAndroid.askForReview(0,0,24, string title, string message, bool isAmazonAppStore = false )

    is it Right ???

    and what about launchesUntilPrompt, hoursUntilFirstPromp,?? when we have to specify these parameters???
     
    Last edited: Sep 13, 2013
  36. _developer_

    _developer_

    Joined:
    Sep 18, 2013
    Posts:
    3
    Hello. How can I make an update Etcetera?
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @_developer_, read the text after the word "IMPORTANT" in your original purchase receipt to learn how to get updates.
     
  38. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    Hi,

    I have a question about storing the pictures you take with EtceteraBinding.promptForPhoto(); function. What's the best way for storing this picture without saving it in the camera roll? I'm using the picture for a Log-in framework i've been working on, so when the user closes the app the picture should be stored, and when the user opens the app again it should see it's picture in the user login screen.
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tripwire, you can just save the image to disk in that case. Texture2D's have an EncodeToPNG method available.
     
  40. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    hi mike

    I'm also getting a crash with Etceteramanager that is only occuring on my devices with iOS7. iOS6 devices are running fine. Note that the crash occurs ONLY when playing the build on the device whilst it's hooked up to Xcode. When not running via X-code, it doesn't crash. But thought I'd report this anyway....

    The message in Output is
    And the app crashes.

    The code is
    Code (csharp):
    1.  
    2. alertGoTitle = EtceteraBinding.getLocalizedString( "Button0Title", "TODO" );
    3. alertGoMessage = EtceteraBinding.getLocalizedString( "Button0Message", "TODO" );
    4. alertGoButtonTitle = EtceteraBinding.getLocalizedString( "Alert_Title_Button0", "OK" );
    5. EtceteraBinding.showAlertWithTitleMessageAndButton( alertGoTitle, alertGoMessage, alertGoButtonTitle );
    6.  
    .

    When the user presses the OK button for the above, the app crashes. But ONLY on iOS7. iOS6 devices it runs fine.
     
    Last edited: Sep 22, 2013
  41. J3-Gaming

    J3-Gaming

    Joined:
    Dec 23, 2010
    Posts:
    55
    I am using the most recent Ecetera plugin with Unity 4.2.1f4
    I can utilizing the push notifications + urban airship.

    iOS 7 has problems, you get all the same success callback messages - nothing wrong there. But the registration does not appear to work. I can send notifications to every type of device running <= ios 6, but anything on ios 7 doesn't work. (Doesn't even show up in settings > notifications list)
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @J3, if you app is not showing up in the notifications list that has absolutely nothing to do with the plugin. That is almost certainly an issue with your app setup, bundle ID, provisioning profile, entitlements, etc.
     
  43. J3-Gaming

    J3-Gaming

    Joined:
    Dec 23, 2010
    Posts:
    55
    But it only happens when the device is ios7. I have no code to separate versions, it should all be working the same (and I do get the success registration event)
     
  44. iguana_02

    iguana_02

    Joined:
    Apr 22, 2011
    Posts:
    211
    Just updated the ipad2 and ipad3 to ios7 and now my app got a problem.

    Once i use the etcetera prompt for photo if the iPad is in landscape mode the camera is in portrait mode (but the container is landscape).

    Its a really weird problem that wasn't there using ios6.

    This happens only on iPads, on iphones all fine.

    Any idea?
     
  45. J3-Gaming

    J3-Gaming

    Joined:
    Dec 23, 2010
    Posts:
    55
    Any ideas? Still happening...
     
  46. J3-Gaming

    J3-Gaming

    Joined:
    Dec 23, 2010
    Posts:
    55
    Prime, any apple device running iOS7 will not create a device registration message (Allow this app to send you pushes | yes/no)
    I tried running the demo scene, same thing - I can get iOS6 to work, but not 7. I think the important point here is that this is for NEW apps, so don't test on an app that you know previously worked. Try an entire new app and app identifier.


    [hr][/hr]
    ALSO:

    Do I just call EtceteraBinding.showWebPage("www.google.ca", true); ? Do i need to 'hide' anything first? (EtceteraBinding.hideActivityView();) Should I do something like this first for a full screen viewer?
    EtceteraBinding.inlineWebViewSetFrame(0, 0, (int)(Screen.width / Screen.dpi), (int)(Screen.height / Screen.dpi));
     
    Last edited: Oct 5, 2013
  47. pgiragossian

    pgiragossian

    Joined:
    Apr 8, 2013
    Posts:
    2
    Same problem. Using Etcetera Plugin viOS v1.7.1 on iPad (4th generation Model A1458 ) with iOS 7.0 (11A465)
     
  48. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi Prime,

    I have the basics running in the app: take a photo/select from album, apply the photo to a cube/plane and viewing the photo on object.

    My question is, I couldn't see anything in the docs that relates to naming the image captured. In my app, i may have many photos, referencing items. So how do i ensure every time the app is loaded, the correct images that were taken for each object are loaded as well?

    I'd like to give specific names for each photo taken, as this would help the user should they take the images from photo album to their computer etc... plus cleaner for me to work with in the app.

    Thanks.
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ocean, the images are just files. You can move/copy/rename them whenever you want using standard Sytem.IO methods
     
  50. John-Higuera

    John-Higuera

    Joined:
    Oct 14, 2012
    Posts:
    20
    Hello we would like to know, if is possible to select multiple photos from the album at the same time, to use then in different cubes for example or have and array with the name of the set of images selected ??

    Thanks!