All Projects → novoda → Merlin

novoda / Merlin

Licence: other
Observes network connection status & gives callbacks

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Merlin

Ios Demos
Examples of ios applications http://www.novoda.com/blog
Stars: ✭ 85 (-84.14%)
Mutual labels:  novoda, open-source
Simple Chrome Custom Tabs
Easy integration of Chrome Custom Tabs into your project. Just connect it to your activity, and navigate to the external website styling your tab as you wish.
Stars: ✭ 131 (-75.56%)
Mutual labels:  novoda, open-source
Gradle Build Properties Plugin
Keep your secrets secret. External build properties support for your Gradle scripts.
Stars: ✭ 110 (-79.48%)
Mutual labels:  novoda, open-source
Aosp.changelog.to
Generates a change log between different aosp tags. Based on the wonderful work of @alsutton
Stars: ✭ 12 (-97.76%)
Mutual labels:  novoda, open-source
Sqlite Provider
Extended SQLite functionality for Android
Stars: ✭ 312 (-41.79%)
Mutual labels:  novoda, open-source
Novoda
Common things for all Novoda's open source projects
Stars: ✭ 37 (-93.1%)
Mutual labels:  novoda, open-source
Download Manager
A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Stars: ✭ 482 (-10.07%)
Mutual labels:  novoda, open-source
Notils
Never again need a .utils. package yur scurvy sea dogs!
Stars: ✭ 126 (-76.49%)
Mutual labels:  novoda, open-source
No Player
Simplified Player wrapper for MediaPlayer and ExoPlayer
Stars: ✭ 182 (-66.04%)
Mutual labels:  novoda, open-source
Android Demos
Examples of Android applications
Stars: ✭ 1,963 (+266.23%)
Mutual labels:  novoda, open-source
Bonfire Firebase Sample
An app to discuss your favourite emojis. This is a sample app built with Firebase.
Stars: ✭ 564 (+5.22%)
Mutual labels:  novoda, open-source
Rxpresso
Easy Espresso UI testing for Android applications using RxJava.
Stars: ✭ 373 (-30.41%)
Mutual labels:  novoda, open-source
Spikes
Where ideas & concepts are born & incubated
Stars: ✭ 540 (+0.75%)
Mutual labels:  novoda, open-source
Accessibilitools
UI tools to help make your Android app accessible.
Stars: ✭ 81 (-84.89%)
Mutual labels:  novoda, open-source
Bintray Release
A helper for releasing from gradle up to bintray
Stars: ✭ 1,878 (+250.37%)
Mutual labels:  novoda, open-source
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (-34.89%)
Mutual labels:  novoda, open-source
Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (-25.75%)
Mutual labels:  novoda, open-source
Hacktoberfest 2020
Make this Hacktoberfest a learning period and contribute to Great Open Source Projects.
Stars: ✭ 492 (-8.21%)
Mutual labels:  open-source
Tern
Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBoM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more.
Stars: ✭ 505 (-5.78%)
Mutual labels:  open-source
Tio
tio - A simple TTY terminal I/O application
Stars: ✭ 489 (-8.77%)
Mutual labels:  open-source

Merlin header image

Merlin Build status Download License

Merlin aims to simplify network monitoring. Providing 3 registerable callbacks for network connectivity changes. onConnect() , onDisconnect() and onBind(NetworkStatus networkStatus).

Adding to your project

To start using Merlin, add these lines to your module's build.gradle:

repositories {
    jcenter()
}

dependencies {
    implementation 'com.novoda:merlin:1.2.0'
}

Optional steps

Note: these steps should not be necessary as the Manifest Merger should be taking care of this for you!

If for some reason your app's manifest doesn't end up containing the required entries, and you encounter issues, you might need to manually add a few things to your AndroidManifest.xml:

  1. These permissions:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
  2. This service:

    <service
      android:exported="false"
      android:name="com.novoda.merlin.MerlinService" />
    

Sample usage

Create Merlin:

merlin = new Merlin.Builder().withConnectableCallbacks().build(context);

Bind and unbind the service in your activity:

@Override
protected void onResume() {
    super.onResume();
    merlin.bind();
}

@Override
protected void onPause() {
    merlin.unbind();
    super.onPause();
}

Register for callbacks:

merlin.registerConnectable(new Connectable() {
    @Override
    public void onConnect() {
        // Do something you haz internet!
    }
});

For further details you can check the wiki.

Migrating from pre-v1 versions

Version 1 of Merlin introduced several breaking changes in the implementation and the APIs, to account for the latest changes in Android N+. Please follow the instructions in the wiki to make the upgrade as painless as possible.

Migrating from 1.1.7

In version 1.1.8 some public API changes were made. According to our tests auto importing should be able to take care of these changes.

RxJava support in v1.0+

Starting in version 1.0.0, the RxJava support is no longer built into the library but it has been split out into a separate artifact. You'll need to add one of these two dependencies, depending on the version of RxJava you use:

// For RxJava 1.x
implementation 'com.novoda:merlin-rxjava:[version_number]'

// For RxJava 2.x
implementation 'com.novoda:merlin-rxjava2:[version_number]'

Links

Here are a list of useful links:

  • We always welcome people to contribute new features or bug fixes, here is how
  • If you have a problem check the Issues Page first to see if we are working on it
  • For further usage or to delve more deeply checkout the Project Wiki
  • Looking for community help, browse the already asked Stack Overflow Questions or use the tag: support-merlin when posting a new question
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].