aaronk Well-Known Member Licensed User Longtime User Oct 29, 2014 #1 Hi, Does anyone know how to register a url scheme for the app so that I can open my B4i App from another app ?
Hi, Does anyone know how to register a url scheme for the app so that I can open my B4i App from another app ?
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2014 #2 Yes. Add this attribute: B4X: #UrlScheme: my.unique.scheme Add this sub: B4X: Sub Application_OpenUrl (Url As String, Data As Object) As Boolean Log("Received Url: " & Url) Return True End Sub You can now start your app with: B4X: Application.OpenUrl("my.unique.scheme://HereYouCanAddAnyTextYouLike") Upvote 0
Yes. Add this attribute: B4X: #UrlScheme: my.unique.scheme Add this sub: B4X: Sub Application_OpenUrl (Url As String, Data As Object) As Boolean Log("Received Url: " & Url) Return True End Sub You can now start your app with: B4X: Application.OpenUrl("my.unique.scheme://HereYouCanAddAnyTextYouLike")
K klarsys Active Member Licensed User Longtime User May 27, 2015 #3 How do I register URL scheme so that http://mydomain/xyz URLs are opened with my app? Upvote 0
JanPRO Well-Known Member Licensed User Longtime User May 27, 2015 #4 Hi, just create a index.php in the xyz directory and set the following code: <?php $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad'); $iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone'); if ($iphone or $ipad ) { header('location: my.unique.scheme://HereYouCanAddAnyTextYouLike'); }else{ echo("No iPhone or iPad"); } ?> Upvote 0
Hi, just create a index.php in the xyz directory and set the following code: <?php $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad'); $iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone'); if ($iphone or $ipad ) { header('location: my.unique.scheme://HereYouCanAddAnyTextYouLike'); }else{ echo("No iPhone or iPad"); } ?>
K klarsys Active Member Licensed User Longtime User May 27, 2015 #5 Thanks! I understand that there is no direct way to register an app with http based scheme like in Android. It has to go through web page as described above. Upvote 0
Thanks! I understand that there is no direct way to register an app with http based scheme like in Android. It has to go through web page as described above.
Roberto P. Well-Known Member Licensed User Longtime User Sep 25, 2015 #6 Hello There is a similar feature for Android? thank you Upvote 0
tucano2000 Active Member Licensed User Longtime User Sep 25, 2015 #7 Android you must use Intent. Search this in the Android forum. Upvote 0
Roberto P. Well-Known Member Licensed User Longtime User Sep 27, 2015 #8 tucano2000 said: Android you must use Intent. Search this in the Android forum. Click to expand... ok, thanks you Upvote 0
tucano2000 said: Android you must use Intent. Search this in the Android forum. Click to expand... ok, thanks you
tufanv Expert Licensed User Longtime User Aug 11, 2016 #9 JanPRO said: Hi, just create a index.php in the xyz directory and set the following code: <?php $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad'); $iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone'); if ($iphone or $ipad ) { header('location: my.unique.scheme://HereYouCanAddAnyTextYouLike'); }else{ echo("No iPhone or iPad"); } ?> Click to expand... Is it possible if the app is not installed on the device direct to appstore ? What code we must add for that to php side ? Upvote 0
JanPRO said: Hi, just create a index.php in the xyz directory and set the following code: <?php $ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad'); $iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone'); if ($iphone or $ipad ) { header('location: my.unique.scheme://HereYouCanAddAnyTextYouLike'); }else{ echo("No iPhone or iPad"); } ?> Click to expand... Is it possible if the app is not installed on the device direct to appstore ? What code we must add for that to php side ?
Erel B4X founder Staff member Licensed User Longtime User Aug 12, 2016 #10 Check the answer here: http://stackoverflow.com/questions/...l-scheme-for-iphone-apps-like/1109200#1109200 The JavaScript opens the store page if the app is not opened after 25 milliseconds. Starting from iOS the user will see a dialog asking them whether they want to open the app so the interval should be larger. For further discussion please start a new thread. Upvote 0
Check the answer here: http://stackoverflow.com/questions/...l-scheme-for-iphone-apps-like/1109200#1109200 The JavaScript opens the store page if the app is not opened after 25 milliseconds. Starting from iOS the user will see a dialog asking them whether they want to open the app so the interval should be larger. For further discussion please start a new thread.