IBM Worklight - Can we create a custom dialog for Direct Update? - ibm-mobilefirst

How can we use custom dialog box for direct update in worklight 6.0?
Is there any option in wlclient.js? I don't know where it should be customized in the application.

Worklight 6.0 does not provide developers the ability to create a "custom dialog box" for Direct Update.
You can submit a feature request: http://www.ibm.com/developerworks/mobile/worklight/connect.html

So Idan already answered, but I did a lot of digging prior to his answer and I thought I'd share my findings just because I spent so much time on it.
Sifting through the code, through all the checks it does to see if a Direct Update is needed, it calls an update method for the app. It utilizes a Cordova plugin called 'WebResourcesDownloader'. In turn it calls the necessary native components and that's how you get a native handler for the downloader (it is in the worklight-android.jar for Android). So, long story short, you can't customize the box itself because its rendered via the plugin/native components and you can't modify the plugin directly (not that I know of at least).
However, you can at least update all the notification messages surrounding the update in the messages.js within the wlclient folders. =)

Related

React-admin | Easiest way to warn user of a newer available version

I have a react-admin app where we are making frequent changes.
Is there an existing plugin or a way to detect a new version of app and provide user with a toast to refresh the application so that they are working with latest version?
If not with react-admin, is anyone familiar with a way to do this easily with react?
I have found some manual way to do this in following places but I am asking here in case there is an existing package or a more elegant solution that I can leverage directly.
How to force update Single Page Application (SPA) pages?
https://medium.com/#kellyrmilligan/create-react-app-let-your-users-know-when-the-app-has-been-updated-with-a-notification-21335d85481c
Any help is appreciated even if its, nothing exist and I should just hand-roll.
Thanks for reading.
This is not the responsibility of React Admin to handle this kind of issue.
You can think of RA as a simple React component that helps you define an admin.
Hence, RA doesn't provide any helper to manage code update or something similar.
You have to implement this refresh system by hand, and your links are a good start for that.
With the serviceWorker you can do that :
https://github.com/marmelab/react-admin/blob/master/examples/tutorial/src/registerServiceWorker.js
But i don't know why in the demo the service worker is not used ?
https://github.com/marmelab/react-admin/tree/master/examples/demo/src

Custom plugin creation in worklight

I have eclips with ibm worklight pulgin .I want to create a custom plugin to store shared preferences values in worklight . can we do do this?? please post the answer with small implementation for this.
If all you're looking to do is to simply store data for the application to be later used in the same application, you can simply use HTML5 LocalStorage API or JSONStore.
LocalStorage: http://diveintohtml5.info/storage.html
JSONStore: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/devref/c_jsonstore_overview.html
There is no need for anything custom if the above is what you're looking for.
In the comments you are attempting to use the Send Action API. I don't know how that is supposed to help you. If you want a working example of that, you can see one here: Android: MobileFirst sending data from Native to cross page

Sitefinity, intercepting page events

Sitefinity has some documentation on how to create a page programmatically, but what I really want to do is to perform some additional logic when the "Create Page" event is fired.
From a high-level, how would one go about doing this? Is there certain interface to implement, or a class to extend?
I'm using SiteFinity 4 (4.4)
If you download SDK, you will find Utilities class which contains sample code for creating pages, templates etc.
You can create pages by using PageManager or a fluent API - everything is in the SDK.
Disclaimer: I work on the Sitefinity team at Telerik.
I'm talking from memory here, but usually you can subscribe to the Executed event of each manager in Sitefinity. It is fired on each action you perform from that manager and passes you arguments about the current command being executed. You'll have to debug and inspect what is the name of the command when creating pages, and if so do what you need.
Another alternative is to implement custom workflow and include your coded step somewhere. More info here: http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/modules/workflow-for-content-modules/custom-workflow
If you open a support ticket or write in the forums with more details, we would be glad to help.
Maybe this post "Automatically create other language versions of the page using Sitefinity API" will help...

Is it possible to access text message information through iPhone SDK

I am developing an application where in i want to alert the user if he receives a message from a contact.
I have been struggling for the same yet haven't found any solution to this.
I also wanted to know if the sdk 3.0 allows access to the call history..
There is no access to SMS messages from the application sandbox, and there is no access to call logs from the application sandbox. You can file a feature request with Apple, but I doubt you will see changes to this any time soon. You will not be able to provide any functionality in your app that depends on this information.
Similar question here regarding call history:
Reading call history in iPhone OS
Short answer is, not possible. I do not believe this has changed in 3.0.

How do I create a button to check for updates and install them?

I can get the program to easily, upon startup, look for updates and then install them.
I want to have a button that the user can click that will check/install updates. Is this possible, if so how?
Edit: Sorry all, not ASP.NET; VB.NET only
This msdn page outlines your different options for ClickOnce updates. It explains how to check for updates before your application starts, after you application starts, or programmatically.
My guess is that you would probably want to combine one of the automatic checks (before or after application starting) with your programmatic check (on your button click).
This is not difficult. Presumably the update/install code is in its own routine. In the button's click event code, simply call the update/install routine used by the startup code.
Add an event to the button. In this event, you use something like the WebClient to retrieve an newer installation package from your server. Then verify its signature to make sure the code is really yours and install it on the local machine.
I noticed the asp.net tag on your question. Are you talking a desktop app or like from an admin page of a customer installed web application?
If it's a desktop app, just look into a ClickOnce deployment. It has that functionality built in.
Either I am not getting the big picture or it's because i work on a asp.net environment...
Anyway, I did something like you asked for our products (web applications) and it was anything but a simple task.
Here is how I did it:
1 - Build a back office application to release new product versions.
2 - Build a webService that received a given product and a version, checked if there was an update available, if so send it to the client.
3 - On the client when received an update, installed it.
I guess the update process will be easier to do on a windows application, my only advice is to be extremely careful when doing it. Always make a safe copy of your application so if anything goes wrong you can roll-back to the previous version.