PlayReads class

A read-only Google Play session for one package.

final reads = await PlayReads.open(
  packageName: 'design.codeux.example',
);
try {
  final tracks = await reads.tracks();
  for (final line in tracks.lines) {
    log.writeln(line);
  }
  print(tracks.newestVersionCodeOn('internal'));
} finally {
  reads.close();
}

Credentials come from the environment cux_ship secrets exec sets up — playServiceAccountVar. In-process reads therefore need that variable in the calling process, which is the one thing a caller switching from a spawned cux_ship to this has to arrange.

Properties

hashCode int
The hash code for this object.
no setterinherited
packageName String
The Android package this session was opened for.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Releases the HTTP client. A session that is not closed keeps a connection pool alive, which is what stops a long-running process from exiting.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tracks() Future<PlayTracks>
What cux_ship play tracks reads.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

open({required String packageName}) Future<PlayReads>
Authenticates and holds the session open.