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. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @russel, that is correct and is the expected behavior.
     
  3. nada

    nada

    Joined:
    Sep 30, 2010
    Posts:
    20
    hi prime

    same issue here as nahOy in point 1):

    after building the project xcode throws an error from Etcetera/AppControllerPushAdditions.mm:

    Code (csharp):
    1. + (void)applicationDidFinishLaunchingNotification:(NSNotification*)note
    2. {
    3.     ...
    4.         if( remoteNotificationDictionary )
    5.         {
    6.             NSLog( @"launched with remote notification: %@", remoteNotificationDictionary );
    7.             AppController *appCon = (AppController*)[UIApplication sharedApplication].delegate;
    8.             [appCon perfo]
    9.             [appCon performSelector:@selector(handleNotification:) withObject:remoteNotificationDictionary afterDelay:5];
    10.         }
    where line 41 is obviously the problem with
    Code (csharp):
    1. [appCon perfo]
    can i just delete the line or would there be anther call on appCon which got cut somehow?

    thanks in advance + grx
    nada
     
  4. nah0y

    nah0y

    Joined:
    Apr 4, 2011
    Posts:
    74
    Hi nada,

    I've deleted it and it seems to be working correctly :)

    I think prime31 is working on the plugin to fix the things I've said (well... I hope so :D)
     
  5. jeroenx000

    jeroenx000

    Joined:
    Oct 4, 2012
    Posts:
    27
    Hello Prime31

    Can I rotate the image after the screenshot? or Can I change the iPhone orientation before screen shot?
    how and where should I add it?

    e.g. our game orientation is portrait but our cam and game is landscape, I need the screenshot on landscape.

    Thanks
     
    Last edited: Mar 8, 2013
  6. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    Hello Prime31-Team,

    Why is there not a progress dialog on iOS?

    Regards,
    Russel
     
  7. Lav-patel

    Lav-patel

    Joined:
    Jul 3, 2012
    Posts:
    23
    Hello Prime31,
    i am trying to save image but it is not working properly .
    string GetDocumentsPath()
    {
    string DocumentsPath;
    //DocumentsPath = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
    DocumentsPath = Application.dataPath.Substring (0, Application.dataPath.Length - 5);
    DocumentsPath = DocumentsPath.Substring(0,DocumentsPath.LastIndexOf("/"));
    return DocumentsPath + "/Documents/";

    }

    public void SaveWallpaperPrompt()
    {
    StartCoroutine( EtceteraBinding.takeScreenShot("te.png") );

    saveImage();
    EtceteraBinding.saveImageToPhotoAlbum(GetDocumentsPath()+"te.png");

    }
    public IEnumerator saveImage()
    {
    yield return new WaitForSeconds(2.5f);

    }
     
  8. nada

    nada

    Joined:
    Sep 30, 2010
    Posts:
    20
    thanks nah0y!
    deleted it too, but would be great to know if we deleted another selector call or just a copy-paste relic.
    well waiting for the official patched plugin too....
     
  9. nah0y

    nah0y

    Joined:
    Apr 4, 2011
    Posts:
    74
    They updated the plugin :)
     
  10. Ali-Be

    Ali-Be

    Joined:
    Aug 29, 2012
    Posts:
    11
    Hello Prime

    I was able to use plugin etcetera, to send global notification throught Urban Airship.
    Unfortunatly I can't find method/parameter, that would set up tags for the device. Only alias can be set.
    I think method setUrbanAirshipCredentials should contain another parameter to set them.

    Would you be so kind to help me with that ? :)
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ali, tags are not supported. Only alias is supported.
     
  12. Ali-Be

    Ali-Be

    Joined:
    Aug 29, 2012
    Posts:
    11
    Are you going to support tags for Urban Airship ?
    They are quite essencial for global notification, if you have large number of users.
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ali, we have no plans to support tags. You can do it yourself quite easily with the WWW class. Visit UA's REST API documentation.
     
  14. TicTocJones

    TicTocJones

    Joined:
    Mar 28, 2013
    Posts:
    1
    I am using AskForReview in Etcetera IOS. Is there an easy way to Localize the text on the buttons or do I need to change the text in the .mm file? Also, does it even work for non-english ipads? I have not seen it come up once the language is changed on the ipad. Thanks.
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tictoc, you can use Xcode's standard localization feature for that. See Xcode's documentation to learn how to use it.
     
  16. nah0y

    nah0y

    Joined:
    Apr 4, 2011
    Posts:
    74
    Personally, I have modified the plugin to accept 3 more parameters : yesLabel, noLabel, remindLabel.
    It's because we don't want to have the localisation inside Unity AND XCode AND Android etc... we keep everything at the same place.
     
  17. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    The inlineWebView doesn't work the same on iPad 1 as it does on iPad 2 or 3. It doesn't draw the contents until you touch it (like you were going to scroll). It's in a draggable panel, and will also draw the contents if you drag the panel. After the hidden panel is shown the first time, it draws correctly after that.

    Here's a free app that shows what I'm talking about:

    https://itunes.apple.com/us/app/hsvpl-newtons-2nd-law-motion/id599162351?mt=8

    I don't know if this has something to do with how I hide and show the panel. Here's how I initialize the web view:

    Code (csharp):
    1. function Start () {
    2.    
    3.     showPanel = false; 
    4.     startPos = thePanel.transform.position;
    5.     thePanel.transform.position.x = 9999.0;
    6.        
    7.     // open web view
    8.     EtceteraBinding.inlineWebViewShow(thePanel.transform.position.x + 140, 1024.0 - (thePanel.transform.position.y + 512.0) - 78.0, 486.0, 272.0);
    9.     var filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "Procedure-1.html");
    10.     EtceteraBinding.inlineWebViewSetUrl(filePath);
    11.  
    12.     // hide it
    13.     thePanel.transform.position = startPos;
    14.     oldPos = thePanel.transform.position;
    15.     thePanel.SetActiveRecursively(false);
    16. }
    And here's how I show/hide it:

    Code (csharp):
    1. if (showPanel) {       
    2.     thePanel.SetActiveRecursively(true);
    3.     EtceteraBinding.inlineWebViewSetFrame(thePanel.transform.position.x + 140, 1024.0 - (thePanel.transform.position.y + 512.0) - 78.0, 486.0, 272.0, false);
    4. }
    5. else {
    6.     EtceteraBinding.inlineWebViewSetFrame(thePanel.transform.position.x + 9999, 1024.0 - (thePanel.transform.position.y + 512.0) - 78.0, 486.0, 272.0, false);
    7.     thePanel.SetActiveRecursively(false);
    8. }
    I did it this way because it wouldn't work if I initialized the web view off screen. And if I close and reinitialize the view each time, it resets the scroll. I need the scroll position to be the same as when it was closed so the user doesn't have to scroll back to find their place each time they hide/show the panel. Unfortunately, I did not test on iPad 1, and now I have 27 apps in the store with this feature. Any ideas or suggestions?
     
  18. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Does the Etcetera plugin for Android support GCM push notifications?
     
  19. Vaklav

    Vaklav

    Joined:
    Sep 27, 2012
    Posts:
    6
    I have one question about setting up the Localizable.strings files. I'm getting a positive result when I use EtceteraBinding.getLocalizedString() only on the english file.
    Right now, I use Xcode 4, publish my project from Unity, and in Xcode, create a new Strings file called Localizable.strings, I add localization to this file, which makes it look like the attached image:



    The problem comes when I populate each with their own values, even if the device is set to Spanish, the spanish strings are not read, and instead I keep getting the english results. I fear I'm messing up an important step, as this method would also make these strings unseeable within the Unity editor.
     

    Attached Files:

    Last edited: Apr 26, 2013
  20. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Hi

    On iOS, using StoreKit, I've noticed that between the click of the button and the loading of the App Store prompt to purchase an item, there's a lag of up to around 5 to 10 seconds.

    So, I was wondering if it would be possible to use a showBezelActivityViewWithImage event during that time, and if so, how?

    Thanks
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @juicy, just call showBezelActivityViewWithLabel to show the activity view...
     
  22. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Thanks Prime, but I still can't figure how to launch and when to cancel it during the communication to iTunes Store.... Any tips? i.e. can't see any events that would trigger when the store prompt to purchase would open.
     
    Last edited: May 1, 2013
  23. madpoet0204

    madpoet0204

    Joined:
    Sep 10, 2012
    Posts:
    98
    I am trying to e-mail screenshot with the following code. Sometimes it's fine, other times it only takes a portion of
    the screen as if it's not complete. This code is from your example posted in this forum. Much appreciated
    if you have any feedback.


    void mailer()
    {
    StartCoroutine( hideStuffTakeScreenshotAndShowStuff() );
    }


    public IEnumerator hideStuffTakeScreenshotAndShowStuff()
    {

    yield return StartCoroutine( EtceteraBinding.showMailComposerWithScreenshot( this,"", "Dino Dan - Dino Cam", html,true ) );


    }
     
  24. G_Koko

    G_Koko

    Joined:
    Aug 25, 2012
    Posts:
    30
    Hi Prime, one question. Can i increment the badge count with local notification? I tried to do that, but when the local notification fired the count don't work.

    Thanks.
     
  25. G_Koko

    G_Koko

    Joined:
    Aug 25, 2012
    Posts:
    30
    Hi Prime, another question that i have.

    We are using EtceteraTwoBinding.scheduleLocalNotification( 60, notificationAlert1, "", 1, "", "" ); without any problems, however, the notifications are still working when the Notification Center is off. Is there a way to to make sure you always know when the user does not have notifications enabled?

    Thanks in advance!
     
  26. Matkins

    Matkins

    Joined:
    Aug 24, 2009
    Posts:
    152
    Hello Prime,

    I'm finding that the etcetera manager isn't getting added to the scene automatically (the storekit manager is though). When using the plugin on device I get this message:
    "SendMessage: object EtceteraManager not found!".

    I tried adding the manager to the scene manually in the editor, and it gives me this message:
    "It looks like you have the EtceteraManager on a GameObject in your scene. Our new prefab-less manager system does not require the EtceteraManager to be on a GameObject.
    It will be added to your scene at runtime automatically for you. Please remove the script from your scene."

    What do you suggest I do?

    Cheers.
     
  27. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @matkins, if you do not listen to any of the events that the Manager fires than that log is entirely normal. It is not an error, it is just a log.
     
  28. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,252
    No response to inlineWebView not working correctly on iPad 1?

    I have to have a troubleshooting/workaround section on my web site just for Etcetera problems in my apps. There are three problems so far, all related to the web view (inline and the regular web view too). (2) inlineWebView doesn't draw correctly on iPad 1, (2) all web views occasionally/frequently stop scrolling, and (3) buttons/links occasionally/frequently stop working. There are workarounds for all of these, but I don't think it's a good idea to have to have workarounds for (what would appear to users as) such basic functions.

    Is there somewhere else I should be posting about these problems?
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @john, you need to open a bug report with Apple. The web view is an entirely closed system handled 100% by Apple. There is exactly nothing we can do to affect rendering, scrolling, links, etc.
     
  30. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi
    I am currently building two builds - one for iphone and one for ipad HD (seperate builds)

    As we know, we can still play 'iphone only' apps on our iPads (even though they look crap!)

    My question is, with Localization, what can i do to have the local strings load on the ipad if i've built for iphone only? At the moment they don't

    Thanks
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ocean, as far as I know they should still work. If they are not working you will want to check Xcodes docs to see if there is something you have to do to enable them.
     
  32. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Ok thanks will do that
     
  33. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Prime,

    i have the same problem so I add EtceteraManager. But i receive error:

    "UnityException: You are not allowed to call this function when declaring a variable" or "ArgumentException: FindObjectsOfType can only be called from the main thread".

    So on your docs I found this:
    Important note: all plugin updates since December 1st no longer have *Manager prefabs. The *Manager script should not be on any GameObject in your scene. If you get an error such as one of the following when in the Unity Editor you need to remove the *Manager script from your scene: "UnityException: You are not allowed to call this function when declaring a variable" or "ArgumentException: FindObjectsOfType can only be called from the main thread".

    So What is the best solution?

    I keep the send message error on my xcode project and delete etceteramanager? thanks
     
    Last edited: May 15, 2013
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    You should not have any *Manager objects in your scene. Have a look at the EtceteraEventListener for a fully functional example.
     
  35. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    At this moment I have not any *Manager Object but in xcode i receive error:
    "UnityException: You are not allowed to call this function when declaring a variable" or "ArgumentException: FindObjectsOfType can only be called from the main thread".

    How can I fix this?
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @kaz, to fix it just remove the script that is causing the log from your scene.
     
  37. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Sorry for mistake.

    "UnityException: You are not allowed to call this function when declaring a variable" or "ArgumentException: FindObjectsOfType can only be called from the main thread". was fixed deleting EctereaManager.cs ..

    I have problem in xCode : "SendMessage: object EtceteraManager no found!"

    Not in Unity. How can fix this?

    Thanks
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @kaz, that is not an error. That is just a log message. The only reason it is being logged is because you have not subscribed to any events that the EtceteraManager publishes.
     
  39. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi all.... we've made a "How-To" on Localising your iOS app from setting up the plug-in, to Localisation Registers, through to X-code set up through to final build.

    We're making these How-To's, first to share with everyone hoping it may help those who are a little green with coding, and secondly, for our own reference. We know in a future project, we'll go to localise and scratch our ***es, thinking "How did we do that again??"

    Hope you enjoy and let us know if there's any errors in it.

    How-To: Localisation for iOS using Prime31's Etcetera Plug-in
     
    Last edited: May 18, 2013
  40. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Prime,

    I was using your LocalNotification events, "localNotificationWasReceivedAtLaunchEvent" and realized when looking through the .mm and .m files, they're not anywhere. Is there a reason you have these events?

    Also, is there a way to check NotificationServices to see which local notification the user tapped to launch the app?

    EDIT
    I looked in your AppPushControllerAdditions file and it looks like the local notification on launch event is commented out. Was there something that happened with Apple's API that caused you to comment this out?
     
    Last edited: May 19, 2013
  41. OceanBlue

    OceanBlue

    Joined:
    May 2, 2013
    Posts:
    251
    Hi Prime - did this get implemented? Thanks
     
  42. yifan024

    yifan024

    Joined:
    Jun 5, 2013
    Posts:
    19
    Hi Prime 31
    When use EtceteraBinding.showWebPage, is there any way to tell if user terminate web browser or not?
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @solo, the normal Unity OnApplicationPause method will be called.
     
  44. jeroenx000

    jeroenx000

    Joined:
    Oct 4, 2012
    Posts:
    27
    Hello Prime31,

    My App saves multiple photos at some time, though I only call saveImageToPhotoAlbum once on imagePickerChoseImage.

     
  45. jeroenx000

    jeroenx000

    Joined:
    Oct 4, 2012
    Posts:
    27
    bump, i need the photo from promptforphoto to be saved if the user takes a picture.
     
  46. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Prime

    I'm trying to get my head around this inlineWebView frame / scale / dpi. Your documentation says the native code multiplies the values by it's dpi. Is this the same as Screen.dpi? For instance, if I wan't the inlineWebView to cover half of a mobile screen with resolution 720x1280 and dpi 317. If I use 720/2 or Screen.width/2 it still fills the whole screen. If I divide that number by Screen.dpi it's 720/2/317 which is so small you can't even see it. I tried multiplying that number by 72 which brought me closer but I feel I'm not really on track here.
     
  47. Breakmachine

    Breakmachine

    Joined:
    Sep 19, 2009
    Posts:
    39
    Btw.. I tried setting the frame width to Screen.width/4... that gives me half of the screen. No idea if this will work on other phones than my Galaxy S Nexus though.
     
  48. AtomicChimp

    AtomicChimp

    Joined:
    Aug 9, 2011
    Posts:
    47
    @Prime31, I am using inlineWebView to display a photo from the internet on a static screen in my app but now need to place a photo from the web into a slider (I am using UIToolkit). Do you have a way to place the image onto a UISprite in UIToolkit?
     
  49. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    Hi,

    I'd like to know if it's possible to use Prime31 Etcetera to open up the native Date Ticker see image below:
    $Ticker.png

    Please let me know if this is possible! Thx :)
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @trip, the date picker is not part of the plugin