BUGS: Working well in Companion but not working if installed as .apk in phone

It is taking more than 10 seconds for the specific webview page (url) to be opened/loaded completly. So, I wish to display an image/ video in that gap until the url is loaded perfectly and completly. So, how it is possible to know if the page is being loaded or loaded completly?

The purpose is to hide the white blank page that usually appear until the page is loaded completly.

How do you display an image until the webview page is loaded completly? As soon as the page is loaded the image has to disappear

Look at the blocks available for the webviewer. You will find your answer there.

2 Likes

I found this block that is attached below, But, there are no blocks in webviewer to put within this block so I can play a video file or display a picture until the page is fully loaded.

component_event

help me .

I found this block

component_method

Can I achieve what I said above using this block?

I think your should be able, not sure, but you could display an image/video using the image or the videoplayer instance. Set the webviewer to visible = false while loading, and the image; visible = true. And then once ut loaded swap this two values.

1 Like

Let me try. Thankyou.

Is it a Bug?

Yes, it worked but worked only in Companion and not working when the app is installed. I tried to play a video file until the web page is loaded completly.

Why it is working only in companion and not working when i installed the app?

You do not show your video source path, maybe the issue is there?

1 Like

I set the video in the designer section. And, I tested in block as well once.

When I add the block 'Set.VideoPlayer.Visible=FALSE' within When.Webviewer.Page.Loaded block, the error is happening.

If the above said block is disabled, then the .apk is playing video file but not in the expected way. When I include that block, the .apk file is not playing any video and its simply appearing as blank.

I tried by placing the video player within a Vertical Arrangement and then to hide the VA, but this also worked within companion and not working as .apk.

In companion everything is working fine but not working as .apk after installation.

This is the .aia file

image_3.aia (774.0 KB)

Make a test aia project that just plays the video. Does that work when compiled ?

Try moving blocks around hide the video player first, then show the webview. You may also want to stop the video playing again.

1 Like

I tried all these already. .apk file plays video if I disabled all blocks related to webviewer. Only when I add the above said block, it is not working. Can you check the .aia file that I shared.

There is no error in companion but the error is occuring in .apk.

I think, this block is a culprit which is creating problem.

blocks (13)

Whenever or Where ever I use this block, the error is happening. Can you please look into it and help me?

By doing this I hide the video player. But, my need is different.

Tried many ways, not working. (ie, working well in companion & not working as .apk)

This works as expected when compiled:

but the web page loads so quickly, I do not see the video (this is probably to be expected also)

vidPlay.aia (28.3 KB)

Is this your problem ?

1 Like

Let me try this.

This is not working in my phone when i install it using .apk but working when I run through companion.

This seems, therefore, to point the finger at your device...

You may need to slow things down with another clock, and/or stop the video player before loading the webviewer.

Instead of hiding the video player, Once when i tried to set the height of video player as 100% at Screen.initialize and 0% after the Page is loaded, it worked. But, i modified it further and forgot the blocks. Now, it is not working.