ibm-mobilefirst

IBM Worklight - Connecting/Re-Connecting: WL.Client.connect vs. connectOnStartup vs. WL.Client.invokeProcedure

淺唱寂寞╮ 提交于 2019-11-30 15:48:59
In our project we are trying to figure our what the best process to connect to the server will be - especially when taking care of offline/online scenarios etc. Right now, for us, it seems that all three options to connect to the WL server are similar. Whatever option we use, we can call our Adapter Procedures perfectly and we receive Notification Messages that are set in the console. We are not sure about Direct Update - this is not working properly yet. Are there any important differences between these three ways of connecting to the WL server, or is basically the same connection procedure

Unable to deploy HelloWorld application to MobileFirst Development Server

两盒软妹~` 提交于 2019-11-30 15:35:21
问题 I am having some trouble building/running the HelloWorld application from the first hybrid app tutorial. When I try to run the default HelloWorld application on the MobileFirst Development Server, the server starts and seems to stop again (without error) before the MobileFirst Application Builder has a chance to finish running. This then causes the application to fail to deploy with the following error message: [2015-01-23 14:03:12] Failed to deploy application 'HelloWorld' to MobileFirst

post image using worklight http adapter proper format

本小妞迷上赌 提交于 2019-11-30 10:05:39
问题 I am trying to post an image (as part of a form) to a PHP server from a Worklight V6 app using the HTTP adapter. The image is base64 encoded navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 8, destinationType: navigator.camera.DestinationType.DATA_URL }); .. later in the code $('#myImageImg').attr('src', "data:image/jpeg;base64," + imageData); I send the image to the adapter var img = $('#myImageImg').attr('src'); var formData = {"someField" : name, "image" : img }; var

worklight auto-generated android folder does not run on avd [duplicate]

一笑奈何 提交于 2019-11-30 09:58:23
问题 This question already has answers here : Libraries do not get added to APK anymore after upgrade to ADT 22 (7 answers) Closed 6 years ago . i have installed ibm worklight studio (enterprise edition) 5.0.5v on windows server 2008 and i have also configured it with the latest android sdk(api 17, android 4.2) and the latest adt plugin (22.0v). when i create a new worklight project "HelloWorld", i build it and preview on browser trough the worklight console normally. when i add a worklight

Worklight build error Failed initializing ClientProjectBuilder

柔情痞子 提交于 2019-11-30 09:55:57
I have suddenly started getting worklight build errors like below. I have no clue why it started happening suddenly. The code was working fine until the remote machine I use for Xcode builds was rebooted. Any clue what could be causing it ? ipad build failed: Failed initializing ClientProjectBuilder android build failed: Failed initializing ClientProjectBuilder iphone build failed: Failed initializing ClientProjectBuilder Regards Avi Idan Adar The solution to this error, typically, is to delete the wlBuildResources folder, located in the TMPDIR of the OS. See here: Worklight - FWLST1040E:

Creating customized push notification in Worklight

陌路散爱 提交于 2019-11-30 09:31:55
问题 is there a way to direct the user to another html page upon opening a push notification? Thank you in advanced. 回答1: If you will take a look at the sample Worklight project for Push Notifications, you can see the following in common\js\main.js: function pushNotificationReceived(props, payload) { alert("pushNotificationReceived invoked"); alert("props :: " + JSON.stringify(props)); alert("payload :: " + JSON.stringify(payload)); } This function tells the application to display 3 alerts,

How to auto-scroll to input field in Android when the soft keyboard overlaps them on showing?

与世无争的帅哥 提交于 2019-11-30 09:29:18
I am developing a hybrid app using Worklight, and I am experiencing the following issue: When the user clicks on an input field, the soft keyboard that pops up hides the input field when the latter is relatively low on the screen. The page is scrollable, so the user can scroll and see the field again, but the customer requirements define that the page will auto-scroll until the field is visible. Please note that this happens only in the Android environment. In the iPhone and iPad environments the default behavior is the the desired one. Based on my findings, the trick should be done via the

How to open a new HTML page using jQuery?

强颜欢笑 提交于 2019-11-30 09:10:48
So, I am using IBM Worklight where I have the main file called file1.html and then I created another html file called file2.html . I am trying to open file2 but no luck so far. I tried following pieces of code: $(this).load("file2.html"); $("div1").load("file2.html"); //div1 is the id for outer div of file1 WL.App.openUrl("file2.html"); window.openURL("file2.html"); And none of these worked! Any suggestions? If you want to use jQuery, the .load() function is the correct function you are after; But you are missing the # from the div1 id selector in the example 2) This should work: $("#div1")

How to use adapter inside the application in worklight

人走茶凉 提交于 2019-11-30 08:53:09
问题 Im new to worklight. Now im started using adapter. Check this link one of my stackoverflow friend have same doubt click this Calling the procedure inside the application. The Adapter im using is SqlAdapter. But in the ibm worklight tutorial they gave example for HttpAdapter and clubing the procedure inside the function. But not for SqlAdapter. If any suggestion kindly let me know. if u want to my source i will ready to provide. Still my research continues 回答1: The call from an application to

Android: MobileFirst sending data from Native to cross page

孤人 提交于 2019-11-30 06:09:32
问题 My Task is as follows: using IBM MobileFirst create a Hybrid app and implement a JS calculator. show date retrieved from native java APIs to the web page. My attempts: I followed Documentations here and implemented the whole Native code onCreate method I found this answer"the first one" illustrating that i should use it on onInitWebFrameworkComplete, Solution provided didn't work I am working with MobileFirst version 7 full sample code is provided Suggestion: should i create the whole action