Worklight how to retrieve latest app version on server from client side? - ibm-mobilefirst

I need to compare the current app version with the latest app version deployed on worklight server from both android and ios app.
Did some research and found the link below but the mentioned api only returns current app version.
Can we get the app version and IP address info using worklight api?
Is there any way the mobile client can retrieve the latest app version?
I'm using Worklight version 5.0.6
Thanks in advance.

As written in the comments:
The way you're trying to do this is not the right one IMO.
with the Remote Disable feature as it is now you can block any environment and a specific version of it that you'd like, as long as it is deployed to the Worklight Server.
For the feature to work, you do not need to know what is the latest version; simply go to the console and disable the app version that is installed on the the device. You can customize this remote disable dialog and/or its behavior, see this blog post: How to Create a Customized Remote Disable Behavior.
The written in the blog post is supported in the latest Worklight versions: 5.0.6.2, 6.0.0.2 and 6.1.0.1.

Related

Push notification does not work on mobilefirst platform 7.1 server

We have develop a cross platform app with mobilefirst studio 7.0 and test it on production environment.
It was fine before we upgrade our project with mobilefirst studio 7.1.0.00-201510120-1525 and test it on clean staging server (7.1.0.0 20151012-1525).
It seems that the push notification functionality dedicated on mobilefirst 7.0 did not work properly on production server of mobilefirst platform version 7.1. The source code and configuration file of our mobilefirst push notifcation adapter and configuration files are here.
Inorder to fix the issue, we refer to official push notification tutorial which was documented here.
Surprisingly, although the source project in official tutorial looks fine on development server, it still not work on production server either.
We have test this project using iphone5s with ios 8.4 and HTC 816h phone with android 4.4.2, both of them fail to register push notification service after we login to the HybridEventSource sample application and tap the “Subscribe Notification” button.
The Mobilefirst server logs down internal server error message during the registration process of client devices.
I am wondering how to let the push notification mechanism work again on mobilefirst 7.1?
Either a valid push notification sample code of mobilefirst 7.1 or any fix pack which we do not know is welcomed.
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server,
we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
The server log message generated during this test is in this file.
The log file generated while we run EventSourceNotification app as xcode project is in this file.
For detail system log from ios device, please refer to device log file
And the Log message generated by HTC 816h android 4.4.2 phone is here
Information about our server environment:
Operating system : centos 5.8 linux
Java development kit : Oracle jdk 1.8 update 65 x86-64
Application server : Apache tomcat server 7.0.63
Worklight environment database : oracle database 11g.
Apple push notification service certificate : sandbox version
Well that's kinda suspicious, isn't it?
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server, we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
You are using the push mechanism provided by MFPF but you do not want to go through MFPF? You are required to go through MFPF if you want to use the push mechanism provided by MFPF... What did you mean by the above?
That said, did your DBA examine mf7-1-EventSourceNotifications-catalina.out.log? There are quite a few Oracle-related exceptions there that you should look at.
If you are still unable to resolve it I suggest to open a PMR instead so that the development team will be able to further investigate.

Worklight 6.2: Is it possible to decommission the device using any WL API

Worklight 6.2: Is it possible to decommission the devices using any Worklight API apart from Licence Tracking in Worklight Server?
Not sure how an API would be of help here.
Anyway, the only available feature that allows you to disable a specific device, is the License Tracking feature you have mentioned in your question.
Feel free to submit feature requests: https://developer.ibm.com/mobilefirstplatform/help/

How can i create local Notification in worklight

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, that will in turn allow you to open the app and execute an optional callback, etc...
You could either write a custom Cordova plug-in of your own,
Or find existing plug-ins on the web.
When adding an existing Cordova plug-in to Worklight (depending on your version of Worklight and version of Cordova), the instructions to do so are a bit different at this time.
This video demonstrates one instance of how to do add an existing Cordova plug-in: Integrating Cordova plugins into Worklight applications

IBM Worklight - Server configuration from application?

we are devloping an application using IBM worklight.
we have a requirement that the worklight server may be deployed in other location(that is ip will be changing).
can the app be configured to communicate to the other server through some settings page with out being reinstalled ?
Yes and No.
The official response is that this is not a supported configuration. IBM Worklight will not support this if done.
Technically, you have 2 options:
Use the Worklight Settings page (enabled by default in application-descriptor.xml; Android and iOS only)
In iOS it is external to the app, accessible via Preferences.app
In Android it is accessible via the Options Menu (which is not present starting API Level 13 or so)
This feature is not meant for end-user consumption; you must enter URLs manually. This is not encouraged for anything other than testing
This feature is not customizable
Create your own app-level settings page and follow this: Re-route/Divert some WL.Client Adapter Invocation traffic to WL Server through different URL (for PCI payment and security requirements)?
Again, this is not encouraged. There will not be support provided if this path is chosen
If you feel this is important to your customer, you can submit an RFE and explain your use case for future consideration by Worklight product designers.

worklight apps not working on after installed device

I am developed sample worklight http adapter. it working fine then i am going to tested for worklight simulator and android simulator it's both are working fine. while i move to install the in that app on android device i am getting error for url connection is failure and connection refuse problem . then i am going customized change the ipaddress and port number on android project for wlclient.properties then generate APK file it's working fine. this is right way to develop the application or otherwise any configuration level shall i do this? please any think let me shared information
by default WL studio will inject one of the IPs available on your machine. If you're using WL 5.x you can change worklightServerRootUrl property in application-descriptor.xml
If your on WL 6.x right-click your app and select run->build for remote server