Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    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.         }
    6.  
    7.         Container {
    8.             WebView {
    9.                 url: "http://google.com.mx"
    10.                 id: myWebview
    11.                 accessibility.name: "TODO: Add property content"
    12.             }
    13.  
    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

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
  3. tyoc213

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    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

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    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.