I have an url like this myapp://select?param1=_4O0MSbkzwSzKe_Wcqmm2kSfgmxozRMA2U5dqhPkrfY¶m2=cc5646c4e12341020012fc0
Navigating into the url opens my app.
But the same does not work on chrome and Samsung default browser and it opens the search screen
It works fine on firefox and opera.
I checked links Samsung devices not opening app from browser url scheme in android.
But opening with javascript:windows.location='myurl' also does not work. (This works on Chrome but).
There is an already fixed bug https://code.google.com/p/chromium/issues/detail?id=181186 on chromium.
Thanks and Regrards,
Saurav
You can try 'intent://view?xxx=123#Intent;package=com.example.myapp;scheme=myapp;launchFlags=abc;end;' when normal 'myapp://xx?' way did not work after a short time delay.
Test to trigger via window.location or link custom event, or iframe's src one by one. At least one is suitable for your browser.
lol
Related
I'm trying to create a "re-launch" button that should bring the user to an existing opened tab. So far, this is how it's implemented:
Using window.open() initially to create the tab and focusing to that tab using window.focus().
The relaunch button should basically call window.focus() and redirect to that tab.
This has been asked in $window.focus() doesn't work on existing tabs in iOS Safari but I'd like to get a more general overview on this question. I've looked everywhere but I couldn't find any lead to this question.
Apparently, it works in android browsers but I can't get it to work in ios browsers (safari, chrome). Does anyone have any clue about this issue?
This seems to be a bug in iOS browsers. As a workaround you may replace
focus() by a sequence of close() and open(...).
I have a site embedded in an iframe from where I want to launch a mobile app. The following is bound to an onClick action on my button, and works in both Chrome and Firefox on my Android:
window.location = "scheme://app.com/?action=xxxxx"
However, when trying on Safari on iOS, nothing happens at all when clicking the button. If i go to the site directly (instead of iframing it) it works perfectly.
The same thing happens if I use an anchor tag:
I tried to fix this by using window.top.location, but then I run into Same-origin policy issues. The site that is hosting the iframe is on a different domain which I can't control.
Is there a workaround for this?
Let’s say I have a webpage and it has a button with an HREF attribute. I want the HREF of that button to be opened on Safari browser if the button is being clicked from an iOS device, even if the user is accessing the page on Google Chrome.
As of now, I only need to handle this situation for Chrome and not any generic browser. The way I see it, there are two parts to the problem:
Identifying the OS of the Client Machine: This I might be able to do easily.
Opening the Popup on Safari from Chrome: This is the tricky part I am not sure if it is possible.
I am looking for possibilities of accomplishing the second part.
Short Answer: no.
Long Answer: Some iOS apps have defined URL schemes that can be used to access the app directly from the browser. For example, twitter://timeline. But Safari for iOS does not have one.
You can detect the OS the user is using and if it Chrome then suggest the user to open it in Safari and also provide the link where to download it from. Or you can also suggest the user to make safari their default browser. ( Also provide a link on how to do that to them).
"googlechrome://www.lego.com" opened in mobile Safari will switch to Google Chrome iOS app to open the URL. This allows for scriptlets like the one below, which allows you to open the current page in Google Chrome iOS app, switching from mobile Safari:
(function()%7Bif(document.location.href.indexOf('http')===0)document.location.href=document.location.href.replace(/%5Ehttp/,'googlechrome');%7D)();
My question is, can the reverse be done? I tried "safari://www.lego.com", and it is simply an invalid URL. Can you make a scriptlet which switches from Google Chrome to mobile Safari to open the current page.
The answer is yes. Courtesy or MacStories (http://www.macstories.net/tutorials/chrome-for-ios-send-a-webpage-back-to-safari-via-bookmarklet/), I found this code:
window.location='googlechrome-x-callback://x-callback-url/open/?url='+encodeURIComponent(location.href)+'&x-source=Safari&x-success='+encodeURIComponent(location.href);
Execute that code, go to your homescreen, reopen Chrome, and there's a magical back button to go back to Safari. This may not be exactly what you want, but it works... Kink of.
Good luck!
Update:
Here's a screenshot:
Link (Sorry, I don't have enough reputation to put it right in the post): http://i.stack.imgur.com/OR175.jpg
Update:
It seems that the functionality to do this has broken. Thank you!
I'm building a web application (based on Phonegap) optimized for iPhone.
I have to integrate a popup which will open our twitter page and shouldn't fit to entire screen (for a simple navigation problem..how do a user should go back at full screen??).
I've noticed that Safari Mobile opens correctly the new page but ignores my window.load width/height parameters.
This is the incriminated js code :
var twitterLink=$("#twitter a");
var url="http://mobile.twitter.com/test";
twitterLink.click(function(){
window.open(url,'name','(height=200),(width=150)');
return false;
});
I've just tried all other browsers on leopard and work!
My aim was embedding a Twitter Profile Page in the fastest way in a page of my app (which has a navigation bottom bar).
This morning I've tried with IFRAME , but with no luck...are not supported..
Then i've tried with the new Twitter intent but has the same problem as here in safari Mobile (ignoring parameters of popup)
Thanks a lot!!!
I think that's a known bug of Mobile Safari.
By my knowledge window.open accepts parameters without parentheses, so:
window.open(url,'name','height=200,width=150');
this should work.