[Android SDK] Using Lynx – An opensource Library from @pedrovgs

These are very quick steps to import Lynx into your Android project. For further information, visit the official GitHub site.

1.- Include gradle dependency for Lynx inside your project. In this moment it is this one:

compile 'com.github.pedrovgs:lynx:1.5’

you may search at the GitHub site if there are new versions

2.1.- Declare LynxActivity inside your manifest, next to the rest of your Activities

<activity android:name="com.github.pedrovgs.lynx.LynxActivity”/>

2.2.- Add READ_LOGS permission

<uses-permission android:name="android.permission.READ_LOGS"/>

3.- Then, you have three options to start using Lynx:

3a.- Open LynxActivity in code

private void openLynxActivity() {
    LynxConfig lynxConfig = new LynxConfig();

        Intent lynxActivityIntent = LynxActivity.getIntent(this, lynxConfig);

3b.- Add LynxView to your layout


3c.- Declare an application-wide LynxShakeDetector and initialize it

public void initializeLynxShakeDetector(){
   LynxShakeDetector lynxShakeDetector = new LynxShakeDetector(this);

thanks to @pedrovgs for this fantastic library!!! 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s