Stops app usage after a period of time has passed starting from app build date.

Overview

Donation About Jan Rabe

TimeBomb Android Arsenal Javadoc Build Status API Gradle Version Retrolambda Licence

Introduction

Blocks the user from keep using the App after a period of time based on build time. Mainly to have control preview versions handed out using e.g.: hockey or fabric.

Screenshot

How to install

compile 'com.github.kibotu:TimeBomb:-SNAPSHOT'

How to build

graldew clean build

CI

gradlew clean assembleRelease test javadoc

Build Requirements

  • JDK7, JDK8
  • Android Build Tools 24.0.3
  • Android SDK 24

How to use

  1. Add to build date to defaultConfig

     buildConfigField "String", "BUILD_DATE", "\"" + new Date().getTime() + "\""
    
  2. Invoke check at app start

     TimeBomb.bombAfterDays(this, BuildConfig.BUILD_DATE, 14);
    

(Optional) Adapt Message in string.xml

<string name="time_bomb_message">This Version is no longer Supported. Please update.</string>

Contributors

Jan Rabe

###License

Copyright 2016 Jan Rabe

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.
You might also like...
Allows usage of vCard resources with the Android contacts provider

vcard4android vcard4android is an Android library that brings together VCard and Android. It's a framework for parsing and generating VCard resources

An android application which shows usage of various jetpack libraries built by the android team
An android application which shows usage of various jetpack libraries built by the android team

JetPacker JetPacker is an android application which implements various jetpack libraries created by the android team. FEATURES - (Will be updated as m

The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.
The app has got fullscreen Turkey map via Huawei Map. App selects random province and shows it borders on the map than user will try to guess the provinces name.

Il Bil App Introduction I will introduce you to how to implement Account Kit, Map Kit, Game Service. About the game: The app has got fullscreen Turkey

This app contains an order flow for cupcakes with options for quantity, flavor, and pickup date

This app contains an order flow for cupcakes with options for quantity, flavor, and pickup date. The order details get displayed on an order summary screen and can be shared to another app to send the order.

Date Fruits Classifier App
Date Fruits Classifier App

Dates Fruits Classifier App It is a ML-based app for Android, that aims to make the target user familiar with the types of dates fruit. Up to now, the

Awesome Kid's Drawing App. It has a click and draws feature.

CanvaKids Overview It's a kid's drawing app which is build for android users. It is built in Kotlin with some very good practices involved.

The News App has been carried out within the framework of the MVVM architecture, information about news is obtained by consulting an API, it is built usisng Jetpack Copose, Coroutines, Dependency Injection with Hilt and Retrofit

Journalist The News App consists of an application that displays the latest news from EEUU from an API that provides official and updated information.

App that says if the movie you typed in has bazooka or not.

TemBazuca App that says if the movie you typed in has bazooka or not. But... why? The idea for the app came up while I was watching Choque de Cultura

A sample demo app which has Clean Architecture with MVVM , UI built with Jetpack Compose
A sample demo app which has Clean Architecture with MVVM , UI built with Jetpack Compose

A sample demo app (two screen todo list app) which has Clean Architecture with MVVM , UI built with Jetpack Compose and includes Modern Android Development Best Practices with components

Comments
  • Java 7 implementation of the bomAfterDays() method

    Java 7 implementation of the bomAfterDays() method

    Hi @kibotu,

    Thanks for a nice work on this project.

    Please can you write Java 7 equivalent of the above method. It seems to crash apps that use Java 7. I notice that it is only that method that doesn't work well with that Java 7.

    Any help will be greatly appreciated. Below is the method:

    `public static long bombAfterDays(Context context, long buildTime, int days) { SimpleDateFormat sdf1 = new SimpleDateFormat("dd.MM.yyyy"); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(buildTime); Date buildDate = calendar.getTime(); Date today = new Date(); long difference = daysBetween(buildDate, today);

        long timeLeft = days - difference;
        if (enableLogging)
            Log.v(TAG, "[bombAfterDays] Bomb in " + timeLeft + "d Build Date=" + sdf1.format(buildDate) + " Today=" + sdf1.format(today) + " Passed Days=" + difference);
    
        if (difference < days)
            return timeLeft;
    
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setMessage(R.string.time_bomb_message)
                .setCancelable(false);
    
        Dialog dialog = builder.create();
        dialog.setOnShowListener(dialog1 -> {
            ((AlertDialog) dialog1).getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(false);
            ((AlertDialog) dialog1).getButton(AlertDialog.BUTTON_NEGATIVE).setEnabled(false);
        });
        dialog.show();
    
        return timeLeft;
    }
    

    `

    opened by MrHeart 1
Owner
Jan Rabe
Technical Lead Android at CHECK24 Profis / Native Android / Unity Developer & Technocrat. #kotlin #android #csharp #unity #opensource
Jan Rabe
Project developed for monitoring hard braking zones as a scientific initiation at Facens in the period 2021/2022

@hard-braking-zones/location Project developed for monitoring hard braking zones as a scientific initiation at Facens in the period 2021/2022. Install

Caique Torres 2 Jan 25, 2022
An android app will start when boot and exit after 1s. Develop for Redmi K40 to enable DC dimming automatically.

An android app will start when boot and exit after 1s. Develop for Redmi K40 to enable DC dimming automatically.

Ovear 4 May 13, 2022
A pet project created to practise Android Development skills in Kotlin after finishing multiple courses online.

A pet project created to practise Android Development skills in Kotlin after finishing multiple courses online. The app displays a list of hundreds of characters provided by The Rick and Morty API https://rickandmortyapi.com/. In other screens user can access detailed information about a particular character, such as status, location and episodes. Libraries used in a project: - Kotlin - Jetpack libraries (Navigation, Room, Hilt, Palette) - other: Glide, Retrofit

Ania 0 Dec 15, 2021
Android-basics-kotlin-tip-time-app - Tip Time app from Android Basics in Kotlin

Tip Time Tip Time app from Android Basics in Kotlin at developers.google.com. It

Ramon Lima e Meira 0 Jan 2, 2022
Episodie is a TV show time tracker app with unusual design written in kotlin and clean architecture approach. Get to know how much time you spent watching tv shows.

Episodie Episodie is a TV show time tracker app with unusual design. Get to know how much time you spent watching tv shows. Track easily overall progr

Przemek 126 Dec 7, 2022
Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP).

1time Java/Kotlin lightweight implementation of RFC-6238 and RFC-4226 to generate and validate time-based one-time passwords (TOTP). Maven / gradle de

Atlassian Labs 31 Dec 21, 2022
A sample Android app which showcases advanced usage of Dagger among other open source libraries.

U+2020 A sample Android app which showcases advanced usage of Dagger among other open source libraries. Watch the corresponding talk or view the slide

Jake Wharton 5.7k Dec 27, 2022
Android app with advanced usage of Epoxy library

Epoxy Advanced Best practices and advanced usages (EditText & Forms) of Epoxy library written in accordance with the Modular and Clean Architectures.

Yusuf Gökmen Arısoy 6 Aug 30, 2022
Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Android Phishing Application.This Project is for Educational purposes only.The Developer of this application is not responsible of any bad usage

Aria Shirazi 93 Oct 23, 2022
A Frida based tool that traces usage of the JNI API in Android apps.

jnitrace A Frida based tool to trace use of the JNI API in Android apps. Native libraries contained within Android Apps often make use of the JNI API

null 1.1k Jan 7, 2023