play-core 0.2.3

Google Play Core Plugin for Crossbow
Documentation
  • Coverage
  • 0%
    0 out of 4 items documented0 out of 3 items with examples
  • Size
  • Source code size: 10.88 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.45 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 36s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • dodorare/crossbow
    212 14 25
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • enfipy

Crossbow Google Play Core Plugin

Crate Info Documentation MIT/Apache 2.0 GitHub Stars

About

This project is a Crossbow Plugin for Google Play Core libraries written in Rust and Kotlin.

Installation

Important: Before using this plugin please read more about Google Play Core libraries and In-app updates.

Just add Rust dependencies like this:

[dependencies]
crossbow = "0.2.3"
[target.'cfg(target_os = "android")'.dependencies]
play-core = "0.2.3"

And finally, add this to your Crossbow Android configuration:

[package.metadata.android]
plugins_remote = ["com.crossbow.play_core:play_core:0.2.3"]

That's it, now you can start using Play Core!

Usage

First step is plugin initialization. In your rust project, you will need to initialize Crossbow instance and then get Android plugin:

#![cfg(target_os = "android")]

use crossbow::android::*;
let crossbow = CrossbowInstance::new();
let play_core: play_core::PlayCorePlugin = crossbow.get_plugin()?;

After plugin initialization you can use supported features. For example to start connection and query purchases you can use:

play_core.check_update()?;
play_core.in_progress_update()?;

To read signals:

if let Ok(signal) = play_core.get_receiver().recv().await {
    println!("Signal: {:?}", signal);
}

Complete documentation you can find here.

Future work

Ideally we will get rid of the Java wrapper and will create C++ wrapper around Google Play Core native - so that it will support all features and will work faster than with JNI. If you want to help us with it - welcome!