Page 1 of 1

Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 10:03 am
by Mark6753445

Hi all,
Would be really grateful if someone could help me on this please as I have tried all the anwwers and nothing seems to be working. I am looking to open a webpage within the app straight after launch image.
So I open the app, the launch picture shows, then straight to the required webpage with no interation from the user other than starting the app.

Any help would be greatly appreciated as this is driving me nuts.

Thanks very much


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 11:51 am
by Igor

Hello,

Can you show what exactly you tried and what doesn't work?


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 12:11 pm
by Mark6753445

Hi Igor, thank you for your reply.
I have tried the answers in the forum one of which is

window.plugins.childBrowser.showWebPage('http://www.google.com', { showLocationBar: true });

So I add a launch screen and then I select
Events Startscreen device ready run javascript and add the above code.
When I build this and install to my mobile, the launch works fine and then nothing happens.

I have also tried this from Katya

function myNavigate(url) {
var cb;
if (window.plugins) {
cb = window.plugins.childBrowser;
}
if (cb != null) {
cb.showWebPage(url);
} else {
window.open(url);
};
}
On Click event instead of code:
var childBrowser = ChildBrowser.install();
window.plugins.childBrowser.showWebPage('a href="http://" rel="nofollow"http:///a...');
run:
myNavigate('a href="http://" rel="nofollow"http:///a...');

but again this does not seem to work or I am not doing this correctly?!

Thank you for your help

EDIT - For the image I did not use the first code, I have used on click navigateto then added URL
Apologies for misleading.


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 2:15 pm
by Igor

Let us know if this doc will help
http://docs.appery.io/tutorials/using...


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 2:21 pm
by Mark6753445

Hi Igor.

It doesn't really help as I wanted to do everything automatically IE

User clicks on app Launch image shows for x seconds webpage opens automatically within the app.

So basically no user input other than starting the app.

Thank you for your continued help.
Kind regards


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 2:43 pm
by Igor

Hi,

As I understand you correctly you want to do next:


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 3:09 pm
by Mark6753445

I want to navigate to the startscreen from the launch image (I have attached the graphic from the app settingsandroid binary area) rather than adding a background image.
Image

Is this possible.

EDIT If i use JS setTimeout("Appery.navigateTo('startScreen',{})" , 3000); - the launch image doesnt show at all on the mobile?


Open web page within the app straight after launch image.

Posted: Sat Mar 22, 2014 3:54 pm
by Illya Stepanov

ChildBrowser is deprecated, use InAppBrowser: http://docs.phonegap.com/en/3.3.0/cor...


Open web page within the app straight after launch image.

Posted: Mon Mar 24, 2014 2:34 pm
by Maryna Brodina

Hello!

Try this code on device ready prenavigator.splashscreen.hide();
window.open(encodeURI('http://your.site.com'), '_blank', 'location=yes');/pre