mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-30 23:30:32 +01:00
Gearslip apps are locked to Gearslip's key: an app's service must require a permission only Gearslip's signer holds, and Gearslip skips any that doesn't
This commit is contained in:
1 parent
fb865d98e4
commit
7b08f9892a
3 files changed
+31
-3
No files matched your search
+11
-3
@@ -7,7 +7,7 @@ Gearslip renders four kinds of app on a car screen. This page specifies all four
|
||||
| [Templated apps](#templated-apps) | An AndroidX Car App Library app. Gearslip hosts it. | Works today |
|
||||
| [Media apps](#media-apps) | A `MediaBrowserService` that opted in to Android Auto. | Works today |
|
||||
| [Messaging apps](#messaging-apps) | An app whose notifications opted in to Android Auto. | Works today |
|
||||
| [Gearslip apps](#gearslip-apps) | A native Gearslip screen, described over binder. | Specified here; not yet implemented |
|
||||
| [Gearslip apps](#gearslip-apps) | A native Gearslip screen, described over binder. | Works today |
|
||||
|
||||
Write a templated app when your app fits the Car App Library's templates, because it runs today
|
||||
and it also runs on Android Auto. Write a media app when you ship audio. Write a Gearslip app
|
||||
@@ -266,12 +266,14 @@ templated app if you need to draw a map, because version 1 lends no surface.
|
||||
|
||||
### Discovery
|
||||
|
||||
Export a service with the Gearslip action and declare the protocol version it speaks:
|
||||
Export a service with the Gearslip action, require Gearslip's bind permission, and declare the
|
||||
protocol version it speaks:
|
||||
|
||||
```xml
|
||||
<service
|
||||
android:name=".GearslipService"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:permission="app.seb3thehacker.gearslip.permission.BIND_APP">
|
||||
<intent-filter>
|
||||
<action android:name="app.seb3thehacker.gearslip.APP" />
|
||||
</intent-filter>
|
||||
@@ -288,6 +290,12 @@ launcher, under your application's own label and icon. To override either on the
|
||||
Gearslip binds to any app that declares this service. It asks the driver for nothing, exactly as
|
||||
a head unit asks nothing before running an Android Auto app.
|
||||
|
||||
Only apps signed with Gearslip's key hold the bind permission, so no other app on the phone can
|
||||
bind your service and read your screens. Gearslip skips a service that doesn't require it. The
|
||||
SDK also checks that the caller is signed with the certificate in
|
||||
[Letting Gearslip in](#letting-gearslip-in). To test with a Gearslip you signed yourself, add
|
||||
your key's digest to `trustedHosts`.
|
||||
|
||||
Gearslip binds your service when the driver opens your tile and unbinds it when they leave. Keep
|
||||
no state that a rebind cannot rebuild.
|
||||
|
||||
|
||||
Reference in new issue
Block a user