Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Android library to ease the use of Google Play In-App Updates API

License

NotificationsYou must be signed in to change notification settings

hyperdevs-team/android-app-updates-helper

Repository files navigation

Release

This utility library aims to help Android developers to use theGoogle Play In-App Updates API in an easy way.

It's highly encouraged that you first read theGoogle Play In-App Updates API documentation before using this library in order to understand the core concepts of the library.

Setting Up

In your mainbuild.gradle, addjitpack.io repository in theallprojects block:

Groovy
allprojects {    repositories {        maven { url"https://jitpack.io" }    }}
Kotlin
allprojects {    repositories {        maven(url="https://jitpack.io")    }}

Add the following dependencies to your app or library'sbuild.gradle:

Groovy
dependencies {    implementation"com.github.hyperdevs-team:android-app-updates-helper:2.0.0"}
Kotlin
dependencies {    implementation("com.github.hyperdevs-team:android-app-updates-helper:2.0.0")}

You'll also need to add support for Java 8 in your project. To do so:

Groovy
android {    compileOptions {        sourceCompatibilityJavaVersion.VERSION_1_8        targetCompatibilityJavaVersion.VERSION_1_8    }    kotlinOptions {        jvmTarget="1.8"    }}
Kotlin
android {    compileOptions {        sourceCompatibility=JavaVersion.VERSION_1_8        targetCompatibility=JavaVersion.VERSION_1_8    }    kotlinOptions {        jvmTarget="1.8"    }}

How to use

  • Create a newAppUpdatesHelper.
  • Start listening for app update changes withAppUpdatesHelper.startListening(), for example inActivity.onCreate() or inFragment.onViewCreated().
  • Stop listening for app update changes withAppUpdatesHelper.stopListening() inActivity.onDestroy() or inFragment.onDestroyView().
  • Request app update information withAppUpdatesHelper.getAppUpdateInfo().
  • Request a flexible or immediate update withAppUpdatesHelper.startFlexibleUpdate() orAppUpdatesHelper.startImmediateUpdate()

Check theexample app for more implementation details aboutflexibleandimmediate updates.

You can also use afake implementation to test in-app updates.

Keep in mind that you may not see in-app updates if these conditions don't match:

  • The package name of the app isexactly the one you'd like to test in-app updates with.
  • The app must be signed with the same keys that you used to sign the app you want to test in-app updates with.
  • If the app is not published yet or you want to test with internal app sharing or closed tracks,ensure that any of your Google accounts in your device has access to said app in Google Play Store.
  • Check if the Google Play Store displays updates for the app you want to use to test in-app updates.

Please ensure that all conditions apply when using this library in order to avoid unnecessary headaches.

Using the example app

In order to ease using the example app with the sample data of your own app,you can create anapp_config.properties file in the root of the project with the following content:

applicationId=your.application.idkeystorePath=/full/path/to/your/keystore/filekeystorePwd=your_keystore_passwordkeystoreAlias=your_keystore_aliaskeystoreAliasPwd=your_keystore_alias_password

These values will be picked up by the compilation process of the example appand will set the application ID and signing configurations for you.

Authors & Collaborators

Acknowledgements

The work in this repository up to April 28th, 2021 was done bybq.Thanks for all the work!!

License

This project is licensed under the Apache Software License, Version 2.0.

Copyright (C) 2021 HyperDevsCopyright (C) 2019 BQLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at    http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.

About

Android library to ease the use of Google Play In-App Updates API

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp