Worklight - Open a Native application

穿精又带淫゛_ 提交于 2019-12-07 16:27:31

问题


In Worklight, its possible to open a native page from the Worklight application for Android. Is it possible to launch a native application from an application developed by Worklight in an Android device? If possible, how? Thanks in advance.


回答1:


Yes and it has nothing to do with Worklight :)

In your native page in Worklight (or you can write a phonegap plugin if you prefer), you need to create an intent (see http://developer.android.com/reference/android/content/Intent.html).
This intent can open an external application.




回答2:


Yes, it is possible. Here is a training that explains how to open native activity from Worklight application - http://worklight.com/download/get-started/4.2.1/module-9.1

If you want to open another activity (other app) from your application, you will need to create a PhoneGap plugin which creates an Intent object to open a new application.

This question may contain what you're looking for Open another application from your own (intent)

And here you can see how to implement PhoneGap plugin for Android - http://worklight.com/download/get-started/4.2.1/module-9.3




回答3:


IBM Worklight has samples that cover calling the native app, but that was created in worklight itself. Eg: module_09_1_Android_CombiningNativeAndWebPages in this sample in the Android folder itself they created one activity com.AndroidShowNativePage.HelloNative (package name) that activity was invoking from that JavaScript.




回答4:


Using Worklight you can call native page ,

code:

WL.Nativepage.show("com.example.class",backtopage,parameter);

function backtopage()

custom parameter to call native code and back to web page.

if you have doubt please refer "Anton" link .



来源:https://stackoverflow.com/questions/10831679/worklight-open-a-native-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!