Showing
2 changed files
with
22 additions
and
4 deletions
... | @@ -23,6 +23,17 @@ | ... | @@ -23,6 +23,17 @@ |
23 | <action android:name="android.intent.action.MAIN" /> | 23 | <action android:name="android.intent.action.MAIN" /> |
24 | <category android:name="android.intent.category.LAUNCHER" /> | 24 | <category android:name="android.intent.category.LAUNCHER" /> |
25 | </intent-filter> | 25 | </intent-filter> |
26 | + <intent-filter> | ||
27 | + <action android:name="android.intent.action.VIEW" /> | ||
28 | + | ||
29 | + <category android:name="android.intent.category.DEFAULT" /> | ||
30 | + <category android:name="android.intent.category.BROWSABLE" /> | ||
31 | + <!-- Accepts URIs that begin with "example://gizmos” --> | ||
32 | + <!-- Registered Callback URLs in TwitterApp --> | ||
33 | + <data | ||
34 | + android:host="" | ||
35 | + android:scheme="parlando" /> <!-- host is option --> | ||
36 | + </intent-filter> | ||
26 | </activity> | 37 | </activity> |
27 | <!-- Don't delete the meta-data below. | 38 | <!-- Don't delete the meta-data below. |
28 | This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> | 39 | This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> |
... | @@ -40,7 +51,6 @@ | ... | @@ -40,7 +51,6 @@ |
40 | <category android:name="android.intent.category.DEFAULT" /> | 51 | <category android:name="android.intent.category.DEFAULT" /> |
41 | <category android:name="android.intent.category.BROWSABLE" /> | 52 | <category android:name="android.intent.category.BROWSABLE" /> |
42 | 53 | ||
43 | - <data android:scheme="pub.yiyan.parlando.Parlando.braintree" /> | ||
44 | </intent-filter> | 54 | </intent-filter> |
45 | </activity> | 55 | </activity> |
46 | 56 | ||
... | @@ -54,9 +64,15 @@ | ... | @@ -54,9 +64,15 @@ |
54 | android:name="com.facebook.sdk.ClientToken" | 64 | android:name="com.facebook.sdk.ClientToken" |
55 | android:value="@string/facebook_client_token" /> | 65 | android:value="@string/facebook_client_token" /> |
56 | </application> | 66 | </application> |
67 | + | ||
57 | <queries> | 68 | <queries> |
58 | <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> | 69 | <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> |
59 | </queries> | 70 | </queries> |
71 | + <queries> | ||
72 | + <intent> | ||
73 | + <action android:name="android.support.customtabs.action.CustomTabsService" /> | ||
74 | + </intent> | ||
75 | + </queries> | ||
60 | 76 | ||
61 | <uses-permission android:name="com.android.vending.BILLING" /> | 77 | <uses-permission android:name="com.android.vending.BILLING" /> |
62 | <uses-permission android:name="android.permission.INTERNET" /> | 78 | <uses-permission android:name="android.permission.INTERNET" /> | ... | ... |
... | @@ -316,18 +316,20 @@ class _LoginPageState extends State<LoginPage> | ... | @@ -316,18 +316,20 @@ class _LoginPageState extends State<LoginPage> |
316 | // Registered Callback URLs in TwitterApp | 316 | // Registered Callback URLs in TwitterApp |
317 | // Android is a deeplink | 317 | // Android is a deeplink |
318 | // iOS is a URLScheme | 318 | // iOS is a URLScheme |
319 | - redirectURI: 'example://', | 319 | + redirectURI: 'parlando://', |
320 | ); | 320 | ); |
321 | - final authResult = await twitterLogin.login(); | 321 | + final authResult = await twitterLogin.loginV2(); |
322 | switch (authResult.status) { | 322 | switch (authResult.status) { |
323 | case TwitterLoginStatus.loggedIn: | 323 | case TwitterLoginStatus.loggedIn: |
324 | // success | 324 | // success |
325 | + print(authResult.authToken); | ||
325 | break; | 326 | break; |
326 | case TwitterLoginStatus.cancelledByUser: | 327 | case TwitterLoginStatus.cancelledByUser: |
327 | // cancel | 328 | // cancel |
329 | + print("cancelledByUser"); | ||
328 | break; | 330 | break; |
329 | case TwitterLoginStatus.error: | 331 | case TwitterLoginStatus.error: |
330 | - // error | 332 | + print(authResult.errorMessage); |
331 | break; | 333 | break; |
332 | default: | 334 | default: |
333 | break; | 335 | break; | ... | ... |
-
Please register or login to post a comment