-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more build docs and docs on rust module s
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Rust Modules in Android OS | ||
|
||
This will follow the hello rust example from AOSP documentation | ||
[here](https://source.android.com/docs/setup/build/rust/building-rust-modules/hello-rust-example) | ||
|
||
Before following this example, make sure your system meets the minimum requirements, and | ||
go through the AOSP setup steps [here](https://source.android.com/docs/setup/start) | ||
|
||
use | ||
```bash | ||
lunch aosp_cf_x86_64_phone-trunk_staging-eng | ||
``` | ||
for the build command | ||
|
||
## Android Services | ||
|
||
[Documentaiont](https://developer.android.com/develop/background-work/services) | ||
|
||
Main idea: servies are long-running operations in the background that can be accessed mby multiple devices. | ||
This is what we want for the light client, and is how Ethereum Phone implements their light client. | ||
|
||
Must be declared in the manifest file: | ||
|
||
```html | ||
<manifest ... > | ||
... | ||
<application ... > | ||
<service android:name=".ExampleService" /> | ||
... | ||
</application> | ||
</manifest> | ||
``` | ||
|
||
Services can be started or stopped by calling ```startService()``` and ```stopService()```, | ||
this should be managed by a light client manager app. |