TimMackenzie/AndroidMarketManager

语言: Java

git: https://github.com/TimMackenzie/AndroidMarketManager

用于管理链接到Android应用商店的库
Library to manage linking to Android app stores
README.md (中文)

Android Market Manager

介绍

Android Market Manager库是一个面向Android应用开发者的小型图书馆项目,可简化与各种应用市场的互动。

目前,它包含:

  • 链接到适用于单个应用或所有开发人员应用的应用商店的方法
  • 一些库实用程序,用于检查应用程序正在运行的设备

还包括测试项目,它是检查链接到每个市场如何在特定设备上工作的便捷方式。

请注意,虽然文档目前很轻,但常量文件包含大量关于链接发生的描述。即使您不想使用库本身,这对您也很有用。

有关可用方法及其用途的说明,请参阅 http://www.projectjourneyman.com/linking-android-app-stores-android-market-manager

除了简单地将代码复制到项目中之外,还有两种简单的方法可以将其引入Android Studio。

包括作为当地图书馆

要将其作为本地模块引用(但不是项目的一部分),请在settings.gradle中添加以下内容(根据需要替换该位置)

include ':AndroidMarketManagerLib'
project(':AndroidMarketManagerLib').projectDir = new File(settingsDir, '../AndroidMarketManager/AndroidMarketManagerLib')

接下来,将以下内容添加到模块的build.gradle中:

dependencies {
    compile project(':AndroidMarketManagerLib')
}

直接从GitHub引用

要在GitHub或其他一些地方(但不在回购中)引用此(或任何)库或代码库,请尝试此操作。

首先,你的模块的build.gradle必须为JitPack添加一个新的repo(第二行):

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

接下来,将依赖项添加到同一build.gradle。请注意,最后一个字符串是提交版本;您可以通过输入GitHub项目URL并选择最新提交来在JitPack.io上更新。

dependencies {    
    ...    
    // Use jitpack.io to capture https://github.com/TimMackenzie/AndroidMarketManager
    compile('com.github.TimMackenzie:AndroidMarketManager:bc272e410c') {
        exclude module: 'AndroidMarketManagerTest'
    }
}

而已!

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

Android Market Manager

Introduction

The Android Market Manager library is a small library project for Android app developers to simplify interaction with various app markets.

Currently, it contains:

  • Methods to link to the appropriate app store for either a single app, or all of a developer's apps
  • Some library utilities for checking which device the app is running on

Also included is the test project, which is a handy way to check how linking to each market will work on a particular device.

Note that while documentation is currently light, the constants file contains a lot of description for how the linking occurs. This may be useful for you even if you don't want to use the library itself.

For a description of available methods and what they are for, see
http://www.projectjourneyman.com/linking-android-app-stores-android-market-manager

Beyond simply copying the code into your project there are two easy ways to bring it into Android Studio.

Including as a local library

To reference it as a local module (but not a part of your project), add the following in your settings.gradle (substituting the location as appropriate)

include ':AndroidMarketManagerLib'
project(':AndroidMarketManagerLib').projectDir = new File(settingsDir, '../AndroidMarketManager/AndroidMarketManagerLib')

Next, add the following to the build.gradle for your module:

dependencies {
    compile project(':AndroidMarketManagerLib')
}

Referencing directly from GitHub

To reference this (or any) library or codebase on GitHub or a few other places (but not in a repo), try this.

First, your module's build.gradle must add a new repo for JitPack (the second line):

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

Next, add the dependency to the same build.gradle. Note that the final string is the commit version; you can update this at JitPack.io by entering the GitHub project url and picking the latest commit.

dependencies {    
    ...    
    // Use jitpack.io to capture https://github.com/TimMackenzie/AndroidMarketManager
    compile('com.github.TimMackenzie:AndroidMarketManager:bc272e410c') {
        exclude module: 'AndroidMarketManagerTest'
    }
}

That's it!