Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

How do I create/pass context for bb::cascades::QmlDocument::create(someHere) (for a webview)

Discussion in 'BlackBerry' started by tyoc213, Dec 18, 2014.

  1. tyoc213


    Nov 14, 2011
    Hi there, Im creating a plugin that involves a webview... I find somewhat BB documentation counter intuitive :S... but anyway.

    I have created a stand-alone app for mobile as cascades app where I have some like

    Code (JavaScript):
    1. Page {
    2.         titleBar: TitleBar {
    3.             // Localized text with the dynamic translation and locale updates support
    4.             title: qsTr("Page 1") + Retranslate.onLocaleOrLanguageChanged
    5.         }
    7.         Container {
    8.             WebView {
    9.                 url: ""
    10.                 id: myWebview
    11.        "TODO: Add property content"
    12.             }
    14.         }
    15.     }

    Which works on device... so Im trying to show the same after a click on a button from unity.... but I don't know how to pass

    Code (CSharp):
    1. bb::cascades::QmlDocument *qml = bb::cascades::QmlDocument::create("asset:///main.qml").parent(someHere);
    ``someHere`` is passed in the native applications (crated from momentics) a "this" that is created from main (argc, argv).

    In android at less I know we have some like UNity player (or some like that, cant remember from memory).

    I hope you understand the idea of this post :S and hope you can give me some guidance.

    Thanks people.
    Last edited: Dec 18, 2014
  2. AlexThibodeau


    Unity Technologies

    Jul 23, 2013
  3. tyoc213


    Nov 14, 2011
    As a fact, I have a C dll library which I can make calls and do things like sum two numbers as test and things like that, so I can do a plugin in C and call it from unity.

    The problem is cascades and the webview and the requested params for context.

    So it mean that there is no equivalent to "UnityPlayerActivity" or some like that? or the source code as when you generate xcode project as equivalent for BB???

    ------ [ASIDE NOTE]

    By the way... I don't know where to put this... but seen you are one there, I think the forum should also support C, C++ code because native plugins, not only boo, js and C# ;).

    I will go to see what I can do today in code, because I really need it ASAP to 2 weeks ago xD hehe.
    Last edited: Dec 18, 2014
  4. tyoc213


    Nov 14, 2011
    Is there an example of a native date picker (or some kind of UI that you can direct me at???) it would be greatly appreciated.