Code Monkey home page Code Monkey logo

metrica-sample-android's Introduction

Usage example of Yandex.Metrica for Android Apps.

How to start

  • Clone repository: git clone https://github.com/yandexmobile/metrica-sample-android.git.
  • Current relevant sample is metrica-sample-android-1.60. Old sample - metrica-sample-android-1.20.
  • The sample was created by Android Studio.
  • In the folder with name "libs" & "jniLibs" you can find all necessary libraries.

The mobmetricalib library is available with protobuf library within itself. In this case your project shouldn't contain protobuf library.

  • Now we are ready to launch project!

ProGuard: If you use ProGuard, you need to keep com.yandex.metrica classes. You can use the following lines of code:

  • -keep class com.yandex.metrica.** { *; }
  • -dontwarn com.yandex.metrica.**

Notes

  • The last mobmetricalib library has the version 1.60 and the level of API is 16. Thus in the AndroidManifest.xml you can see that the metrica:api:level value is equal to 16.

  • The example uses API_KEY = 1111.

  • Alternatively you can add the last version of Metrica for Apps to your project as maven artifact from the maven central:

    • groupId: com.yandex.android
    • artifactId: mobmetricalib
    • version: 1.60

Documentation

License

License agreement on use of Yandex.Metrica for Apps SDK is available at: http://legal.yandex.ru/metrica_termsofuse/.



В этом репозитории находится тестовое приложение, демонстрирующее библиотеку Yandex.Metrica for Android Apps.

Как начать

  • Клонируйте репозиторий примера git clone https://github.com/yandexmobile/metrica-sample-android.git.
  • Текущий действующий пример находится в папке metrica-sample-android-1.60. Старый пример в metrica-sample-android-1.20.
  • Данный пример был создан в среде разработки Android Studio.
  • В папке "libs" & "jniLibs" уже находятся все нужные библиотеки.

Библиотека mobmetricalib доступна и с включенной в нее библиотекой protobuf. В таком случае подключать protobuf не нужно.

  • Теперь мы готовы к запуску тестового проекта.

ProGuard: Если вы используете ProGuard при сборке проекта, то следует не изменять Metrica. Вы можете использовать следующие строчки кода:

  • -keep class com.yandex.metrica.** { *; }
  • -dontwarn com.yandex.metrica.**

Примечания к примеру

  • Данный пример использует библиотеку mobmetricalib версии 1.60 и уровнем API равным 16. Поэтому в файле AndroidManifest.xml вы можете увидеть, что значение metrica:api:level равно 16.

  • В примере используется тестовый API_KEY = 1111.

  • Последнюю Метрику для приложений можно добавить в проект и как maven-артефакт с maven-central:

    • groupId: com.yandex.android
    • artifactId: mobmetricalib
    • version: 1.60

Документация

  • Вы можете зарегистрировать свое приложение на домашней странице Yandex.Metrica for Apps.
  • Доступна документация на русском и на английском, в которой содержится полная документация по mobmetricalib и описание подключения библиотеки к вашему проекту, а также инструкции по использованию.
  • Доступен тестовый пример, демонстрирующий различные возможности библиотеки. Вы можете найти его в другом репозитории здесь.

Лицензия

Лицензионное соглашение по использованию Yandex.Metrica for Apps SDK доступно по следующей ссылке http://legal.yandex.ru/metrica_termsofuse/.

metrica-sample-android's People

Contributors

brainail avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.