Notification - RDMLX

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
kno_dk
Posts: 45
Joined: Wed Oct 17, 2012 4:19 am

Notification - RDMLX

Post by kno_dk »

Hi

I want to make news section in an app for one of my customers. I want to make the notification like when you get an sms (see attached image). I would like to set some timer i the app so it make a request to the server and then check if the device have seen the news or not. If the device have not seen the news it maks a notifikation.
Is it possible to make this notification?
is it possible to a unique id for the device?
Attachments
IMG_0542.PNG
IMG_0542.PNG (640.84 KiB) Viewed 15470 times
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

For question 2 - "is it possible to a unique id for the device?"

Yes - one is assigned at installation and you can assign your own if you want to - see http://www.longrangemobile.com/docs/lan ... ethods.htm
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

For question 1 – "Is it possible to make this notification?"

No, not as an Apple application notification. There are quite a few reasons for this – but the most significant are that it is a service provided by Apple’s servers, message delivery is not guaranteed, and Android does not have the same facility delivered in the same way.

As an alternative you might consider sending an email to a mobile device user that contains a URL that causes their LongRange application to fire up (if required) and then to switch to the application area nominated by you in the URL.

For example you can send email messages like “Order 772723 has exceeded the customer credit limit. Touch here to approve” or “Please approve leave for employee FRED JONES by touching here.” . If you want more details about this please let us know.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

If you only want the overlaying red number (but no associated notification message) then this may be possible in a future release.
kno_dk
Posts: 45
Joined: Wed Oct 17, 2012 4:19 am

Re: Notification - RDMLX

Post by kno_dk »

it is only the overlaying red number I want. If the user see the red number then they open the app and choose the news menu item .
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

The we will add that to the enhancement request list.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

One of other thing about this - " I would like to set some timer i the app so it make a request to the server and then check if the device have seen the news or not."
That tends to not be how iOS or Android Apps work.
When they are moved to the background and another app is in the foreground they are effectively unconscious - so any timers you had would not fire.
This is apparently a very complex area and very few apps can do this while unconscious (like mail).
So even if you could show the red number you would not be able to fire a timer to show or update it.
That is why generally something like notifications or emails are used to start or 'revive' an application.
You could send the user an email "You have news - touch here to view" so that when the user touches the hyperlink your App is fired up (if required) and then it can switch to the exact news item and display it.
kno_dk
Posts: 45
Joined: Wed Oct 17, 2012 4:19 am

Re: Notification - RDMLX

Post by kno_dk »

Hi
in the incident list (demo) you show a icon with at number beside. is it possible to change the icon in the menu the same way? I would like to make a news menu item where I show how many unread news the user have.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: Notification - RDMLX

Post by MarkDuignan »

Generally this is done by putting 3 things into the same form view grid cell. The main image, a small red circle image and then a label containing the variable “n” number to be displayed. These all overlay one another using the zIndex to control what goes on top of what (http://www.longrangemobile.com/docs/LRP ... erties.htm).

This might be set up in a VL reusable part or as an RPG procedures so that it can be reused in many different form views. Once you can this you call it asking it to ‘insert’ image X, with overlaid number N into a form grid cell row and column number. This can be fiddly to get set up initially as you need to use padding properties to force the “n” label to appear on top of the red circle, etc, etc.

It may also be worth making your entire VL reusable part (or RPG sub procedure) create a sub-form that contains the overlaid images and label. This makes it fairly easy to inject your reusable part in to table rows – where a table column is made up of sub-forms.
kno_dk
Posts: 45
Joined: Wed Oct 17, 2012 4:19 am

Re: Notification - RDMLX

Post by kno_dk »

I would like to controle the icon in the main menu. You have this command: COM_OWNER.Set_SystemMenu Name() Hidden() but you can not control which icon you want to have in the menu. If we could control the icon like you (Mark) described in your last post we could make some "sort" of notification for the user.
Post Reply