Topic
  • 1 reply
  • Latest Post - ‏2012-05-12T16:38:11Z by IdanAdar
SystemAdmin
SystemAdmin
570 Posts

Pinned topic Worklight integration with external website - super.loadUrl("http://www.google.fr");

‏2012-05-12T15:17:56Z |
Hello !

I am currently working on the integration of Worklight with a web application.

Basically, I have already developped a web application which is deployed on a HTTP server. I can access to this website via http://www.myapplication.com for example.

I would like to create a hybrid application with a webview pointing to http://www.myapplication.com with the following code :




public 

class Test 

extends WLDroidGap 
{ @Override 

public 

void onCreate(Bundle savedInstanceState) 
{ String url = 
"http://www.myapplication.com"; super.onCreate(savedInstanceState); super.loadUrl(url); 
} 
}


In my android hybrid application created with Worklight, I have also created some activities like a MapActivity.

My question : I would like to invoke my MapActivity from http://www.myapplication.com which is in my webview.

Tha thing is that I can't use the following code since WL, WL.Client ... are not declared in http://www.myapplication.com


var params = 
{nameParam : $(
'#nameInput').val()
}; WL.NativePage.show(
'com.AndroidShowNativePage.HelloNative', backFromNativePage, params);

Is it possible to do this ?

It seems that it is possible : https://www.ibm.com/developerworks/mydeveloperworks/blogs/b75d3ff5-8534-43ff-8eb0-8e33fc67f50e/entry/sample_of_using_worklight_with_ibm_websphere_portal_and_ibm_web_experience_factory2?lang=en

But do we need to include some js files ? Or the android application automatically include some js file when rendering the webview ?

Thank you.
  • IdanAdar
    IdanAdar
    288 Posts

    Re: Worklight integration with external website - super.loadUrl("http://www.google.fr");

    ‏2012-05-12T16:38:11Z  
    Hi, as you have opened a support ticket already, it will be handled over there...