Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Framework for dispatching various procedure on update application.

License

NotificationsYou must be signed in to change notification settings

KeithYokoma/Fit

Repository files navigation

GitterAndroid ArsenalLicenseCircleCI

Framework for dispatching various procedure on update application.

FitPhoto License CC by NC-ND

Attention

This library is under development so API may be changed drastically until the first major release.

Usage

PrepareVersionModule to declare what to do when your application is upgraded or newly installed.

publicclassMyModuleimplementsVersionModule {@VersionCode({1,2,3})// foo() is called when the app is updated to version code = 1, 2 and 3publicvoidfoo() {    }@VersionCode(4)// bar() is called when the app is updated to version code = 4publicvoidbar() {    }}

If you like to have them executed only when it is an upgrade, useUpgradeOnly annotation.

publicclassMyModuleimplementsVersionModule {@VersionCode({1,2,3})// foo() is called when the app is updated to version code = 1, 2 and 3publicvoidfoo() {    }@VersionCode(4)@UpgradeOnly// bar() is called when the app is updated to version code = 4, and not called when the app is newly installedpublicvoidbar() {    }}

Register yourVersionModule whenApplication#onCreate() called.

publicclassMyAppextendsApplication {@OverridepublicvoidonCreate() {super.onCreate();Fit.initialize(this,newMyModule());    }}

And execute update procedure like this.

Fit.getInstance().execute();

CurrentlyFit has a synchronous call interface only.Asynchronous call will be introduced in the near future.

ProGuard Settings

Set configuration for ProGuard to keep annotation and annotated methods.

-keepattributes *Annotation*-keepclassmembersclass * {@jp.yokomark.fit.VersionCode *;}

License

Apache License v2

Copyright (C) 2014 KeithYokoma, Inc. All rights reserved.Licensed under the Apache License, Version 2.0 (the "License"); you may not usethis file except in compliance with the License. You may obtain a copy of theLicense at    http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributedunder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES ORCONDITIONS OF ANY KIND, either express or implied. See the License for thespecific language governing permissions and limitations under the License.

About

Framework for dispatching various procedure on update application.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp