ibm-mobilefirst

How to make HTTPS requests with serverside javascript using Worklight?

此生再无相见时 提交于 2019-11-30 04:23:36
问题 I'm toying around with IBM worklight, and am trying to create an adapter to feed some data in from the Google places API. I want to call this URL : https://maps.googleapis.com/maps/api/place/search/json?key=AIzaSyCTlPms1pvhzeoRrBao5qW-DJMI_CWcbAM&location=52.0700,1.1400&radius=10000&sensor=false&name=coffee Executing this URL works fine in a browser, and displays some nice JSON that I'm trying to obtain via Worklight. The Worklight adapters are created in Javascript, this is what I have so

IBM Worklight 6.1 - Why is Cordova code not working when placed in a sub-page?

狂风中的少年 提交于 2019-11-29 18:13:38
I tried out the Cordova camera example inside my Worklight application. It works only when the camera code is inside the main HTML file (index.html). When I place it in another HTML file, it does not work. Why is that? What am I missing? Worklight is a Single Page Application. Thus you cannot simply load another HTML file and expect your application to continue functioning; this includes Cordova. Read the "Building a multi-page application" training module and review the accompanying sample project, to better understand how to create a multi-page application. You can also review these sample

MobileFirst v8 and bootstrap Angular JS v1.5.3 error

亡梦爱人 提交于 2019-11-29 18:05:37
I have a Cordova application that uses MobileFirst Platform version 8, Ionic version 1.3.1 and AngularJS version 1.5.3. When I run it and bootstrap Angular JS so that the app connects to the MobileFirst Platform first I get the following error: Error in Success callbackId: WLAuthorizationManagerPlugin561212842 : Error: [$injector:modulerr] Failed to instantiate module ng due to: TypeError: Cannot set property 'aHrefSanitizationWhitelist' of null at $$SanitizeUriProvider (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:30845:35) at new <anonymous> (file:///android_asset/www/plugins

IBM Worklight - WL.App.getDeviceLanguage() API method does not return correct language code in iOS

僤鯓⒐⒋嵵緔 提交于 2019-11-29 18:03:57
In iOS, despite changing the language settings WL.App.getDeviceLanguage() always returns en . Tested on iPhone 5, iPad 4 and several emulators. If use navigator.globalization.getPreferredLanguage could detect language correctly in iOS. But the application seems not know it is under other language such as French so application name local string is still in English even other language is available. When using iOS, the relevant setting is that of Region Format. Created a new Worklight project and application with the iPhone and Android environments Added in wlCommonInit() : alert(WL.App

How can i create local Notification in worklight

不想你离开。 提交于 2019-11-29 18:03:11
I'm creating an app using Worklight. I need to show a Notification at specific time like an alarm clock. It'd work when offline so i cannot use Push Notification. I need Notification like image below. Thanks. iOS's Local Notifications feature does not have built-in support in Worklight. One way to add Local Notifications support is by extending your application using a Cordova plug-in , which will allow you to run Native code. This means that you will natively implement it by following Apple's APIs: to schedule the notification in the app and to then receive a notification locally via the OS,

Retrieve base64 image stored as a CLOB from derby with Worklight adapter

谁说胖子不能爱 提交于 2019-11-29 17:38:23
I am trying to retrieve an image stored as a CLOB in a Derby DB via a Worklight SQL adapter. I would like to do something similar to what was written up here: https://www.ibm.com/developerworks/community/blogs/dhuyvett/entry/jsonstore_revisited_in_worklight_v6_part_1_the_adapter?lang=en except for the referenced article the author is using DB2. Does anyone know how I can do this in Derby? Currently when I go to retrieve the image doing a SQL Select, the string returned is "IMAGE": "org.apache.derby.impl.jdbc.EmbedClob@2d236" I would also consider mysql as an alternative. Thanks for any

type error: cannot call method 'invoke procedure' of undefined in worklight

自古美人都是妖i 提交于 2019-11-29 17:31:11
this is my js function... var invocationData={ adapter : 'Health_Care', procedure: 'update', parameters:[uname,cp,np] }; WL.Client.invokeProcedure(invocationData, { onSuccess: function(){ alert("Password successfully changed"); }, onFailure: function(){ alert("failed"); } } ); my adapter is... var updateStatement = WL.Server.createSQLStatement("UPDATE EMPLOYEE SET PASSWORD=? WHERE UID=? AND PASSWORD=?"); function update(pid,curP,newP) { return WL.Server.invokeSQLStatement({ preparedStatement : updateStatement, parameters : [newP,pid,curP] }); } my adapter is alone working when i invoke adapter

IBM Worklight - Can't change app icon in both Worklight Console and device

我怕爱的太早我们不能终老 提交于 2019-11-29 17:27:40
I want to change the application icon from the default one to custom one. I'm using this element in application-descriptor.xml <thumbnailImage>common/images/some-logo.png</thumbnailImage> but nothing changes. There is still a default image in Worklight Console and iPad, that i deploy to the iOS Simulator. Idan Adar The thumbnailImage element in application-descriptor.xml does not control the application icon you see in a device/simulator. For changing the application icon in Worklight Console, see my answer in this question: IBM Worklight - Thumbnail image from project is not updated in

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

感情迁移 提交于 2019-11-29 17:23:13
This question already has an answer here: Libraries do not get added to APK anymore after upgrade to ADT 22 7 answers 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 environment (android) to the project "HelloWorld", the auto-generated "HelloWorldHelloWorldApplicationAndroid" is created but when

IBM Worklight 6.2: JMX configuration error. Unable to obtain MBeans

心不动则不痛 提交于 2019-11-29 17:05:14
I have IBM Worklight 6.2 development environment with the following setup. Oracle Java 1.7 Eclipse 4.3 IBM Worklight 6.2 Developer Edition A sample Hybrid project had been created and deployed in the Worklight development server and app works fine in the Mobile Browser Simulator. I am getting the following error in Worklight Server console in Eclipse: [ERROR ] Failed to obtain JMX connection to access an MBean. There might be a JMX configuration error: Read timed out [ERROR ] FWLSE3000E: A server error was detected. FWLSE3012E: JMX configuration error. Unable to obtain MBeans. Reason: "Read