iOS
iOS

Reputation: 3626

Worklight - Open a Native application

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.

Upvotes: 3

Views: 2502

Answers (4)

Perumss
Perumss

Reputation: 137

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.

Upvotes: 2

Klose
Klose

Reputation: 158

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 .

Upvotes: 0

Anton
Anton

Reputation: 3166

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

Upvotes: 2

Raanan Avidor
Raanan Avidor

Reputation: 3583

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.

Upvotes: 1

Related Questions