ibm-mobilefirst

IBM Worklight - hiding splash screen

不羁的心 提交于 2019-12-23 05:47:09
问题 I want to hide the screen splah of my app and i'm trying to do this with Cordova function navigator.splashscreen.hide() according to this function wlEnvInit(){ wlCommonInit(); document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { alert("device is ready!"); navigator.splashscreen.hide(); } } I placed this code on android/js/myAppName.js and iphone/js/myAppName.js folders. It does not work. There is something wrong? 回答1: I assume what you're trying to do is

Background work in Worklight Server

会有一股神秘感。 提交于 2019-12-23 05:30:58
问题 Trying to find an approach to perform some regular house-keeping in a Worklight Server. Simplified scenario: We have an adapter talking to a back-end system. When user authenticates with Worklight they create some credentials that are passed to the back-end on each service call. Those credentials can become stale if not used for a period of time. Hence what we want is a "heartbeat" for all active sessions. I have a singleton Java object in which I stash the credentials when the user

Worklight Event Source, what security test

给你一囗甜甜゛ 提交于 2019-12-23 05:30:05
问题 Worklight 6.1, testing in WL Studio on a Mac. As a follow-up to this question concerning doing background work in a Worklight Server, the accepted answer to which is to use an Event Source. WL.Server.createEventSource( { name: "housekeepingEventSource", poll: { interval: 5, onPoll: workToBeDone }, securityTest: "eventTest" } ); The issue concerns which security test to use. Whatever I try I get this error: Adapter deployment failed: Wrapped java.lang.ClassCastException: org.mozilla.javascript

How to display a custom keyboard

眉间皱痕 提交于 2019-12-23 05:20:44
问题 I am creating a Worklight 6.1-based app with Dojo. I want to present a 10-key keyboard to the user instead of the standard OS keyboard. How would I go about doing this? I've tried the following, but it does not bring up a numbers-only keyboard. In iOS it brings up the full keyboard, only with the view that has numbers and $%^&* keys. <input type='number' data-dojo-type='dojox.mobile.TextBox'> Any suggestions? 回答1: To successfully display a numeric keyboard you need to add the pattern

IBM Mobilefirst - Custom direct update is not happening in ionic2

送分小仙女□ 提交于 2019-12-23 05:20:27
问题 I have used adapter, authentication, server everything of MFP. But now I am stuck in Direct Update . If I am pushing mfpdev app webupdate direct update default dialog is coming and I can update application. But issue is coming while I am trying to make a custom dialog for getting the update. I never got the custom dialog . The codes I have used is:\ wl_directUpdateChallengeHandler.handleDirectUpdate = ((directUpdateData, directUpdateContext) => { WL.SimpleDialog.show('Update Avalible', 'Press

IBM Worklight: Self-signed CA implementation in Testing environment with Load Balancer

99封情书 提交于 2019-12-23 05:15:22
问题 I have the following implementation in testing environment, Front-end Server [IBM HTTP Server + IBM Websphere plugin], WLServer1 [IBM Worklight 6.2 + IBM DB2 10.1+ Liberty Farm 8.5.5.1] and WLServer2 [IBM Worklight 6.2 + IBM DB2 10.1+ Liberty Farm 8.5.5.1]. plugin-cfg.xml has been generated from each Worklight server and merged. The request[http] from multiple devices has been directed to worklight server's alternatively, once the merged plugin-cfg.xml has been deployed in Front-end server's

Invoking Worklight Adapter and Displaying that JSON data in list view as strings

本小妞迷上赌 提交于 2019-12-23 05:00:21
问题 This is my adapter.impl.js code. //This procedure implementation is to get all the details from the table which in database. var procedure1Statement = WL.Server.createSQLStatement("select * from employee"); function procedure1() { return WL.Server.invokeSQLStatement({ preparedStatement : procedure1Statement, parameters : [] }); } This is my JSON data retrieved from SQL Adapter in worklight. { "isSuccessful": true, "resultSet": [ { "EMAIL": "bkandregula@gmail.com", "ID": 1, "NAME": "Bhanu

IBM Worklight 6.1 - How to open links?

一曲冷凌霜 提交于 2019-12-23 04:26:24
问题 I have tried using this WL.App.openURL('link','_blank') . In my app, I have some hyperlinks. Upon clicking a link, it has to load respective pages in the app itself. How do I accomplish this? 回答1: You are mis-using the API... You have 2 options: Use Cordova's InAppBrowser API This way you can display a browser window ontop of the app; when done you tap a button to close it and return to the app. This code snippet works: <a href="#" onclick="window.open('http://apache.org', '_blank', 'location

IBM Worklight 6.1 - How to add custom written native code from Eclipse to Xcode?

纵然是瞬间 提交于 2019-12-23 03:43:29
问题 We created a hybrid application on Iphone 5s. The worklight server version is 6.1, Xcode version is 5.0.2. We noticed that after we deleted our native folder under Iphone, our self-written native codes were gone. Therefore, we need to manually add these native codes to Xcode when we build a Xcode project from Eclipse. I am just wondering if there is a more convenient way to do it? Thank you very much. 回答1: If you delete the native folder, then any user-files you've placed in it will be

Worklight: Canno access the WL server over https where CA certificate is setup

*爱你&永不变心* 提交于 2019-12-23 03:25:38
问题 Recently, my Test Worklight server has been configured and secured via https protocol and SSL setup (CA certificate is added). However, my mobile app cannot connect to the WL server now and get an error. Before, it can connect to the WL server normally with http protocol. I did some tests (exmaples for Auto Provisioning and Custom Provisioning - module_25_0_CustomDeviceProvisioningCustomProvAppAndroid) based on the Device_Provisioning_concepts.pdf document, but they didn't work on Test env. I