You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,17 @@ ti-android-url-scheme
2
2
=====================
3
3
4
4
Open Android app from browser (or another app) by creating a app url scheme
5
+
6
+
Using custom URL app schemes on iOS and Titanium is pretty straightforward. A few lines of code in the tiapp.xml and you’re off to the races going from app-to-browser and back or app-to-app depending on your setup. When looking for Android best practices on this….forget it. Stack Overflow? Nope. Appcelerator community Q&A? Nope. What I found were bread crumbs to keep me on the path but nothing to take me home.
7
+
8
+
Here’s what I wanted to do:
9
+
10
+
-Login via Instagram<br>
11
+
-Take user to Instagram authentication link to sign in<br>
12
+
-Once successfully authenticated, take user back to redirect uri which would open my app and pass in data with the url scheme I setup. In this case the data would come in with an intent on Android.<br>
13
+
-Parse the variables and save to device for use later on (userid, username, etc)<br>
14
+
-The trouble I was having was when I would redirect back to the app. It would either:<br>
15
+
16
+
-Not open my app and fail as a bad url in the device browser<br>
17
+
-Open my app and crash it<br>
18
+
-Or open my app and with no intent data with it (took me quite a while to get to this very exciting step)<br>
0 commit comments