Skip to content
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ See https://github.com/coredevices/libpebble3/wiki/Roadmap

See https://github.com/coredevices/libpebble3/wiki/Roadmap

## Enabling PebbleKit Android Classic

To fully enable PebbleKit Android Classic, you have to add this provider to your `AndroidManifest.xml`:

```xml
<provider
android:authorities="com.getpebble.android.provider.basalt"
android:name="io.rebble.libpebblecommon.pebblekit.PebbleKitProvider"
tools:ignore="ExportedContentProvider"
android:exported="true" />
```

Note that by doing so, your app will not be able to be installed alongside other apps that also do this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth noting that (unless we change libpebble so that it doesn't enable the gatt server by default) installing any other app using libpebble will break other apps (see otherPebbleCompanionAppsInstalled), so this might not really be a big problem. Leaving it like this is fine though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, is the gatt server running even if no watches are set to connect?


# Contributing

We aren't actively encouraging contributions yet, while we are aggressively building out feature parity with the original Pebble apps. CI testing is not comprehensive, so changes need to be manually tested with real hardware using CoreApp, and our roadmap/bug tracker is not currently on github. We will update when this changes.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.rebble.libpebblecommon.connection.endpointmanager

import io.rebble.libpebblecommon.connection.CompanionApp
import io.rebble.libpebblecommon.js.CompanionAppDevice
import io.rebble.libpebblecommon.metadata.pbw.appinfo.PbwAppInfo
import io.rebble.libpebblecommon.pebblekit.PebbleKitClassic

actual fun createPlatformSpecificCompanionAppControl(
device: CompanionAppDevice,
appInfo: PbwAppInfo
): CompanionApp? {
return PebbleKitClassic(device, appInfo)
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class WebViewJsRunner(
libPebble: LibPebble,
jsTokenUtil: JsTokenUtil,

device: PebbleJSDevice,
device: CompanionAppDevice,
private val scope: CoroutineScope,
appInfo: PbwAppInfo,
lockerEntry: LockerEntry,
Expand Down Expand Up @@ -397,4 +397,4 @@ class WebViewJsRunner(
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import io.rebble.libpebblecommon.connection.LibPebble

class WebViewPKJSInterface(
jsRunner: JsRunner,
device: PebbleJSDevice,
device: CompanionAppDevice,
private val context: Context,
libPebble: LibPebble,
jsTokenUtil: JsTokenUtil,
Expand Down Expand Up @@ -40,4 +40,4 @@ class WebViewPKJSInterface(
override fun openURL(url: String): String {
return super.openURL(url)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import androidx.core.net.toUri

class WebViewPrivatePKJSInterface(
jsRunner: WebViewJsRunner,
device: PebbleJSDevice,
device: CompanionAppDevice,
scope: CoroutineScope,
outgoingAppMessages: MutableSharedFlow<AppMessageRequest>,
logMessages: MutableSharedFlow<String>
Expand Down Expand Up @@ -95,4 +95,4 @@ class WebViewPrivatePKJSInterface(
override fun getActivePebbleWatchInfo(): String {
return super.getActivePebbleWatchInfo()
}
}
}
Loading
Loading