(LongRange App) Issues...

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’.
Post Reply
edwardtn
Posts: 33
Joined: Fri Aug 28, 2015 11:53 pm

(LongRange App) Issues...

Post by edwardtn »

I have two issues I am running into and while I know this is not the place to submit issues, I want to verify that they are not working as intended:

1. When using an RDMLX local objects generator to hide the application title bar (#COM_OWNER.Set Property('/SysStates.HideTitleBar') To(True)). In the Windows 10.1 app, the title bar is still visible.

2. When using LONGRANGE.Audio to play sound clips, the onCompleted function executes as soon as the sound begins playing. There does not seem to be a way to update my UI on play and stop.

If these issues are bug-related, I will submit as incidents in the support portal.

Thanks,

Edward
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: (LongRange App) Issues...

Post by tsupartono »

Hi Edward,

1) Yes this is a defect and will be rectified soon.

2) It's actually correct that the onCompleted callback of the "LONGRANGE.Audio.play" function is called immediately, as it indicates that the playback has either started or failed to start (the onCompleted callback gets called when an async action has completed - in this case, the action is to start a playback).

If you'd like to be notified when the playback itself has completed, you can use the "onPlayFinished" callback.

Code: Select all

var options =
{
    path: "...",
    onCompleted: function(result)
    {
        // This is invoked when playback has started (or failed)
        if (result.status == LONGRANGE.Status.Ok)
        {
              // Update UI to indicate that it's currently playing something
        }
    },
    onPlayFinished: function()
    {
        // This is invoked when the playback has completed
        // Reset UI to indicate idle state.
    }
}
If you'd like to interrupt playback, use "LONGRANGE.Audio.stop".

If you'd like to know if LR is currently playing or recording, you can use "LONGRANGE.Audio.isActive".

* Please note that the JavaScript API support in LR for Windows is currently still in beta.
edwardtn
Posts: 33
Joined: Fri Aug 28, 2015 11:53 pm

Re: (LongRange App) Issues...

Post by edwardtn »

Thanks Tony,

That's perfect! I did not see the onPlayFinished callback anywhere...that makes perfect sense and will do exactly what I need.

Regards,

Edward
edwardtn
Posts: 33
Joined: Fri Aug 28, 2015 11:53 pm

Re: (LongRange App) Issues...

Post by edwardtn »

Hi Tony,

I tried implementing the use of the onPlayFinished callback as you suggested, but it does not seem to work. Below is an example with all of the UI updating removed and showing an alert onPlayFinished. In this case, the sound is played but the alert is never displayed.

Code: Select all

function playAudio(audioFile) {
	if (typeof LONGRANGE != "undefined") {
		var audioPath = "/app/UserMedia/Audio/" + audioFile + ".m4a";
		var opts = { };
		opts.path = audioPath;
		opts.onCompleted = function(result) {
			if ( result.status != LONGRANGE.Status.Ok ) {
				alert(result.message);
			}
		};
		opts.onPlayFinished = function() {
			alert("Play Done");
		};
		LONGRANGE.Audio.play(opts);
	}
}
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: (LongRange App) Issues...

Post by tsupartono »

Hi Edward,
You are right, the version currently on the App Store does not have this feature.
My apology for the misinformation.

We are planning to post the latest version (RV18) to the App Store in about 3 weeks time.
I can also provide an RV18 beta build for you if you wish (for development purposes)
Let me know.
edwardtn
Posts: 33
Joined: Fri Aug 28, 2015 11:53 pm

Re: (LongRange App) Issues...

Post by edwardtn »

Hi Tony,

That makes sense, I can just leave my code in place for a few weeks and come back to it. My initial delivery date is still pretty far off. I don't need the unreleased version for my development but if you ever need someone to put the app through its paces, we could probably help. We are using webviews, local database, and the JavaScript API heavily and testing all three platforms as it is a planned BYOD solution.

Also, I want to mention another issue I discovered with the HideTitleBar property. In Android, the title bar is hidden initially but is restored when using the LONGRANGE.Camera API. I will attach some screenshots to illustrate what happens.

Also, also...I just wanted to let you guys know that we are having a great experience with the LongRange product. The product is amazing, and being able to get great support in this forum has been terrific. Our whole company is excited with what they see as a giant leap forward with technology and LongRange has really made it very easy.

Thanks,

Edward
Attachments
Screenshot_1.png
Screenshot_1.png (412.21 KiB) Viewed 4548 times
Screenshot_2.png
Screenshot_2.png (105.74 KiB) Viewed 4548 times
Screenshot_3.png
Screenshot_3.png (418.46 KiB) Viewed 4548 times
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: (LongRange App) Issues...

Post by tsupartono »

Thanks Edward, it's really great to hear that you have found LongRange useful in your project.

RE the title bar in Android re-appearing, I will get that fixed.

Before I submitted the RV18 update to the App Store (in about 2 weeks time), I will provide you with a test build, so you can verify that all your code works as expected in this version.
Post Reply