Skip to content

danielemaddaluno/Android-Update-Checker

Repository files navigation

Logo Android Update Checker Get it on Google Play

The project aims to provide a reusable instrument to check asynchronously if exists any newer released update of your app on the Store.

It uses the Java HTML Parser Jsoup to test if a new update really exists parsing the app page on the Google Play Store.

Screenshot

Quick Setup

1. Include library

Automatically ( Download ):

Automatically with Gradle

dependencies {
    compile 'com.github.danielemaddaluno.androidupdatechecker:library:1.0.2'
}

Remember to replace "1.0.2" with the latest version available.

If you want to automatically take the latest version, you could use this:

dependencies {
    repositories {
		mavenCentral()
//      maven {
//          url 'http://dl.bintray.com/danielemaddaluno/maven/'
//      }
    }
    compile 'com.github.danielemaddaluno.androidupdatechecker:library:+'
}

Automatically with Maven

<project>
...
    <repositories>
        <repository>
            <id>danielemaddaluno</id>
            <name>Daniele Maddaluno Bintray Repository</name>
            <url>http://dl.bintray.com/danielemaddaluno/maven/</url>
        </repository>
    </repositories>
    ...
    <dependecies>
        <dependency>
            <groupId>com.github.danielemaddaluno.androidupdatechecker</groupId>
            <artifactId>library</artifactId>
            <version>LATEST</version>
        </dependency>
    </dependecies>
...
</project>

Manual:

Manual - Using Android Studio:

  • Download the UpdateCheckerLib folder and import to your root application folder. You can manually achieve this step with 3 steps:
    1. Paste the folder UpdateCheckerLib into your application at the same level of your app, build and gradle folder
    2. Add to your settings.gradle file the following code line: "include ':app', ':UpdateCheckerLib'"
    3. Rebuild the project
  • File → Project Structure → in Modules section click on "app" → Click on tab "Dependecies" → Click on the green plus → Module Dependecy → Select ":UpdateCheckerLib"
  • Done =)

or

Manual - Using Eclipse ADT

  • Download the UpdateCheckerLib folder and import into the workspace
  • Right click on the project imported → Properties → Android → Check the box "Is Library"
  • Right click on the Main Project → Properties → Android → Add → Select UpdateCheckerLib → OK

2. Android Manifest

<manifest>
    <!-- Include following permission -->
	<uses-permission android:name="android.permission.INTERNET" />
	...
</manifest>

3. Activity class

public class DemoUpdateCheckerActivity extends ActionBarActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo_update_checker);
        /* Use this when you want to run a background update check */
        new UpdateRunnable(this, new Handler()).start();
    }

    /** Called when the user clicks the button */
    public void forceUpdateTest(View view) {
        if(view.getId() == R.id.button_force_update_test){
            /* Use this if an update check is explicitly requested by a user action */
            new UpdateRunnable(this, new Handler()).force(true).start();
        }
    }
}

4. Proguard

If you are using Proguard you have to add the following lines to your Proguard rules:

-keep public class org.jsoup.** {
    public *;
}

Applications using Android Update Checker

Indian Rail Salary Calculator | AutoVelox Fissi e Mobili Map | Školníček Gymspk | amaze | Italia Notizie - IT News

License

If you use Android Update Checker code in your application you should inform the author about it ( email: daniele.maddaluno[at]gmail[dot]com ) like this:

Subject: AUC usage notification
Text: I use Android Update Checker <lib_version> in <application_name> - http://link_to_google_play. I [allow | don't allow] to mention my app in section "Applications using Android Update Checker" on GitHub.

Also I'll be grateful if you mention AUC in application UI with string "Using Android Update Checker (c) 2014, Daniele Maddaluno" (e.g. in some "About" section).

Copyright 2014 Daniele Maddaluno

Licensed 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.0

Unless required by applicable law or agreed to in writing, software
distributed 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 and
limitations under the License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages