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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

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.