@@ -5,13 +5,14 @@ English | [中文](https://github.com/TangXiaoLv/Android-Router/blob/master/READ
55
66| lib| androidrouter| androidrouter-compiler| androidrouter-annotations|
77| ---| ---| ---| ---|
8- | version| [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter/images/download.svg?version=2.0.0 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter/2.0.0 /link ) | [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter-compiler/images/download.svg?version=1.0.1 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter-compiler/1.0.1/link ) | [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter-annotations/images/download.svg?version=1.0.0 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter-annotations/1.0.0/link ) |
8+ | version| [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter/images/download.svg?version=2.0.1 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter/2.0.1 /link ) | [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter-compiler/images/download.svg?version=1.0.1 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter-compiler/1.0.1/link ) | [ ![ Download] ( https://api.bintray.com/packages/tangxiaolv/maven/androidrouter-annotations/images/download.svg?version=1.0.0 ) ] ( https://bintray.com/tangxiaolv/maven/androidrouter-annotations/1.0.0/link ) |
99
1010High-performance, flexible, easy-to-use lightweight Android component-based framework, Used to solve the interdependence of complex projects, A single module is conducive to independent development and maintenance.
1111
1212Update Log
1313---
1414```
15+ 2.0.1: Support auto cast on return value, fix array cast exception.
15162.0.0: Resolve callback support generic, Support reactive programming, Remove resolve.call 'type' param.
1617-----2.0+ new feature dont support 1.0+
17181.0.7: Fix system params passed exception.
@@ -84,29 +85,11 @@ Note:Android-Router Protocol Format: scheme://host/path?params=json
8485
8586** Step 1: Setup router module**
8687``` java
87- /**
88- * Supported parameter types
89- *
90- * float
91- * int
92- * long
93- * double
94- * boolean
95- * String
96- *
97- * Array
98- * Varargs
99- * List<?>
100- * Map<String,Object>
101- * custom object
102- *
103- * default parameter: Application context, String scheme, VPromise promise
104- */
10588@RouterModule (scheme = " android" , host = " main" )
10689public class MainModule implements IRouter {
10790
108-
10991 // Route => android://main
92+ // default parameter: Application context, String scheme, VPromise promise
11093 @RouterPath
11194 public void def (Application context , String scheme , VPromise promise ) {
11295 promise. resolve(" " ," from scheme: [" + scheme + " ] " + " path: []" );
@@ -191,6 +174,30 @@ public class RemoteModule implements IRouter {
191174}
192175```
193176
177+ ** Supported parameter**
178+
179+ | from| -| to| desc|
180+ | :---| :---:| :---| :---|
181+ | context| →| context| ` version 1.0.0+ ` Type: Application [ default] |
182+ | scheme| →| scheme| ` version 1.0.0+ ` Type: String(Router scheme) [ default] |
183+ | promise| →| promise| ` version 1.0.0+ ` Type: VPromise (Used return) [ default] |
184+ | float| ⇌| float| ` version 1.0.0+ ` |
185+ | int| ⇌| int| ` version 1.0.0+ ` |
186+ | long| ⇌| long| ` version 1.0.0+ ` |
187+ | double| ⇌| double| ` version 1.0.0+ ` |
188+ | boolean| ⇌| boolean| ` version 1.0.0+ ` |
189+ | String| ⇌| String| ` version 1.0.0+ ` |
190+ | Object A| ⇌| Object A| ` version 1.0.0+ ` From and To must implement IRouter and keep empty constructor|
191+ | Object A| ⇌| Object B| ` version 1.0.0+ ` From and To must implement IRouter and keep empty constructor|
192+ | A[ ] | ⇌| A[ ] | ` version 2.0.1+ ` |
193+ | A[ ] | ⇌| B[ ] | ` version 2.0.1+ ` |
194+ | A[ ] | →| Varargs A| ` version 2.0.1+ ` [ 1,2,3] → add(int... i)|
195+ | List< A>| ⇌| List< A>| ` version 1.0.0+ ` Receiver must be defined as List<?> interface|
196+ | List< A>| ⇌| List< B>| ` version 1.0.0+ ` |
197+ | Json Object| ⇌| Object| ` version 1.0.0+ ` |
198+ | Json Object| ⇌| Map< String,String>| Coming Soon|
199+ | Json Array| ⇌| List< ?>| ` version 1.0.0+ ` |
200+
194201** Step 2: Invoke **
195202```
196203AndroidRouter
0 commit comments