Android library that creates app shortcuts from annotations
ShortbreadGenerated
. Now it generates one
class for each activity that contains shortcuts, e.g. MoviesActivity_Shortcuts
. The generated classes are still only used by the
library itself, the consumer does not interact with them.public
anymore. Any visibility higher than private
is enough.R2
, resource values sometimes were not properly read when the incremental annotation processing was incremental:sample-library
shows how to use Shortbread in a library moduleShortbread.create(context)
- no need to call this anymore as the shortcuts are set automatically during app startupActivityLifecycleCallbacks
will not be registered if there are no method shortcutsandroidx.annotation:annotation
to 1.1.0
4.1.2
androidx.annotation
9
to 14
(app shortcuts are still not available before 25
)3.6.4
Fix: Annotated methods are called before onCreate()
(#13)
Update: Support annotations library to 26.0.2
. This requires the new Google Maven Repository:
google()
or
maven {
url "https://maven.google.com"
}
Shortbread.create(context)
can now also be called if there are no @Shortcut
annotations in the code, which before produced a crash. Previously created shortcuts are now removed.NullPointerException
when an activity containing method shortcuts is not launched via a method shortcutInitial release