App Shortcuts for Android on Pre Nougat 7.1!

Overview

Shortcuts for Android on Pre Nougat 7.1!


WHAT IS ANDROID SHORTCUTS?

The Android App Shortcuts Library have features of Android 7.1 Nougat, you can implement in your launcher shortcuts starting from API 14! With new communication all developers will only implement shortcuts layout (this library), then it's up to developer to implement their own shortcuts, like Google!!! In version 1.4.0 library can get shortcuts from app which have API 25 and Static or Dynamic shortcuts implementation I have also implemented Force Touch and YOU CAN USE ON CUSTOM LAUNCHER WITH SHORTCUTS!!

DONATIONS

This project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!

PayPal

  • Donate $5: Thank's for creating this project, here's a coffee (or some beer) for you!

  • Donate $10: Wow, I am stunned. Let me take you to the movies!ù

  • Donate $15: I really appreciate your work, let's grab some lunch!

  • Donate $25: That's some awesome stuff you did right there, dinner is on me!

  • Donate $50: I really really want to support this project, great job!

  • Donate $100: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!

  • Donate $2799: Go buddy, buy Macbook Pro for yourself!

Of course, you can also choose what you want to donate, all donations are awesome!! Follow this link Donate!!

If you want to contribute you may download Donation App from Google Play

# v2.0.0 Preview

v1.4.0 Preview

v1.3.0 Preview Click Here

Click Here

v1.2.0 Preview Click Here

v1.1.0 Preview Click Here

v1.0.0 Preview Click Here

v0.2.0 Preview Click Here

APP EXAMPLE

Android Shortcuts is on Google Play!!!

Get it on Google Play

If you want to help me please download Donation App!!

Get it on Google Play

Or scan QR Code

alt tag

USAGE

Add this to build.gradle

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

Than add this dependencies

   compile 'com.github.michelelacorte:AndroidAppShortcuts:2.0.0'

DOCUMENTATION

Coming soon with Force Touch implementation

SYSTEM REQUIREMENT

Android API 14+

STATUS

project maintained

CHANGELOG

v2.0.0

  • New App version 2.0 with library and dependencies update and bug fix.
  • Fully support to Launcher3 (dock and folder shortcuts!) with circluar icon, now support device screen resolution:
    • 1440x2560 (Portrait).
    • 1080x1920 (Portrait).
    • 720x1280 (Portrait).
  • Improved layout of 720x1280 resolution.
  • Added class ShortcutsBuilder for create shortcuts with builder constructor.
  • Update class Utils
    • Added static Bitmap getRoundedBitmapForLauncher3 to get circular icon (shortcuts on launcher)
    • Added static int getScreenXDimension to get screen X.
  • Update class StyleOption
    • Added NONE option for delete menù at right of shortcuts.
  • Added OnLongClickListener on shortcuts to create shortcuts icon on launcher.
  • General bug fix and improvement.

v1.4.0

  • Fully support to API 25 App Shortcuts, now app can use Google implementation method!!!
  • New App version 1.4 with some fix, background changed to bring out the Shortcuts.
  • Fixed onShortcutsOptionClickListener, now remove view parent on click.
  • Update class RemoteShortcuts
    • Added static method ArrayList<Shortcuts> getRemoteShortcutsOnAPI25(Activity activity, String targetPackageName, int uid) throws Exception this method get shortcuts defined in API 25, with Google SDK.
    • Update static void saveRemoteShortcuts(Activity activity, ArrayList<Shortcuts> listOfShortcuts) removed unecessary packageName string from method.
  • Update class Shortcuts
    • Added constructor for API 25 Shortcuts(Bitmap shortcutsImage, Bitmap shortcutsImageBadge, String shortcutsText, String targetClass, String targetPackage, int rank).
    • Added getter (API 25) Bitmap getShortcutsImageBadgeBitmap().
    • Added getter (API 25) int getRank().
    • Increase MAX_CHAR_SHORTCUTS from 16 to 20.
  • Update class Utils
    • Added method (API 25) static Bitmap getRoundedBitmapForAPI25(Bitmap bitmap, Drawable packageImage) for get launcher icon with badge and shadow.
  • Fixed some method issue.
  • Update buildToolsVersion and dependencies

v1.3.0

  • New App version 1.3
  • Added dynamic colored of shortcuts icon!
  • Update icon in launcher when create shortcuts, Nougat style! See alt tag
  • Fixed numbers of shortcuts at 5
  • Fixed layout issue with numbers of shortcuts >= 2 :
    • 1440x2560 (Portrait).
    • 1080x1920 (Portrait).
    • 720x1280 (Portrait).
  • Update ShortcutsCreation class, introduced:
    • static void setPackageImage(Drawable packageImage) to set package image and create bitmap on launcher shortcuts icon like image above.

v1.2.0

  • Update class ShortcutsCreation layout bug fixed, now support device screen resolution:
    • 1440x2560 (Portrait).
    • 1080x1920 (Portrait).
    • 720x1280 (Portrait).
  • New App version 1.2
  • Fixed layout with no toolbar padding.
  • Fixed shortcuts constructor with Bitmap (remote shortcuts).
  • Fixed mShortcutsOptions click listener, now auto-convert resource into bitmap and create launcher shortcuts with icon.
  • Added class StyleOption, contains static int for menù option layout.
  • Added 1 style right menù of shortcuts (see int optionLayoutStyle or StyleOption class).
  • Code style improvement by codacy.
  • Fixed crash on Example App when click outside of GridView.
  • Fixed crash when OnShortcutsOptionClickListener isn't defined (local shortcuts mode).

v1.1.0

  • Deprecate AIDL communication, not suited to the needs, replaced with simple file data.
  • Improved Example App, new version 1.1.
  • Improved Shortcuts view, fixed bug.
  • Added class RemoteShortcuts
    • Method static void saveRemoteShortcuts(Activity activity, String packageName, ArrayList<Shortcuts> listOfShortcuts) for save shortcuts and make accessible on library.
    • Method static ArrayList<Shortcuts> getRemoteShortcuts(Activity activity, String packageName) to get shortcuts from library.
    • Method static void checkPermission(Activity activity) for check WRITE_EXTERNAL_STORAGE permission on Android M and above.
    • Method static void requestPermission(Activity activity) for request permission to user.
  • Update class Shortcuts
    • Added constructor Shortcuts(Bitmap shortcutsImage, String shortcutsText)
    • Added constructor Shortcuts(int shortcutsImage, String shortcutsText, String targetClass, String targetPackage) only for remote use.
    • Added constructor Shortcuts(Bitmap shortcutsImage, String shortcutsText, String targetClass, String targetPackage) only for remote use.
    • Added constructor Shortcuts(int shortcutsImage, String shortcutsText, View.OnClickListener onShortcutsClickListener, View.OnClickListener onShortcutsOptionClickListener)
    • Added getter View.OnClickListener getOnShortcutsOptionClickListener()
    • Added getter Bitmap getShortcutsImageBitmap()
    • Added getter String getTargetPackage()
    • Added getter String getTargetClass()
  • Update class Utils
    • Added method static void createShortcutsOnLauncher(Activity activity, Bitmap shortcutsImage, String shortcutsText, String className, String packageName) for create shortcuts when user click on right menù (option menù)

v1.0.0

  • Improved Example App, soon relased on Google Play
  • Added class ShortcutsService that create remote connection and use AIDL to communicate with launcher, soon all developers will only implement shortcuts layout, then it's up to developer to implement their own shortcuts, like google!!!
  • Improved animation, almost equal to the Pixels Launcher.
  • Added 2 style right menù of shortcuts (see int optionLayoutStyle)
  • Added click shadow on shortcuts.
  • Added AIDL interface IRemoteShortcutClickListener
    • Method void onShortcutsClickListener() when user click on shortcuts
    • Method void onShortcutsOptionClickListener() when user click on right menù
  • Added AIDL interface IRemoteShortcutService
    • Method void addShortcutsWithRemoteClickListener(int shortcutsImage, String shortcutsText, IRemoteShortcutClickListener onShortcutsClickListener)
    • Method void addShortcuts(int shortcutsImage, String shortcutsText)
    • Method List<Shortcuts> getShortcuts()
  • Added AIDL interface Shortcuts provide parcelable Shortcuts
  • Added class RemoteServiceConnection
    • Public constructor RemoteServiceConnection(Activity activity, List<Shortcuts> shortcuts)
    • Public constructor RemoteServiceConnection(Activity activity, Shortcuts... shortcuts)
    • Public method boolean connectServiceAndVerifyConnection(RemoteServiceConnection serviceConnection) to bind service and return boolean to check if is connected.
    • Public method void connectService(RemoteServiceConnection serviceConnection) to bind service.
    • Public method IRemoteShortcutService getService() to retreive service.
  • Added class ShortcutsService to create service
  • Update class Shortcuts
    • Added constructor Shortcuts(int shortcutsImage, String shortcutsText, final IRemoteShortcutClickListener onIRemoteShortcutsClickListener)
    • Added method int getShortcutsImage()
    • Added method String getShortcutsText()
    • Added method IRemoteShortcutClickListener getOnIRemoteShortcutsClickListener()
    • Added method View.OnClickListener getOnShortcutsClickListener()
    • Update class to Parcelable for AIDL communication.
  • Update class ShortcutsCreation
    • Added private method void createShortcutsBasedOnGridSize(int currentXPosition, int currentYPosition, int rowHeight, GridSize gridSize, List<Shortcuts> shortcuts)
    • Update method void createShortcutsBasedOnGridSize(int currentXPosition, int currentYPosition, int rowHeight, GridSize gridSize, int optionLayoutStyle, List<Shortcuts> shortcuts)
    • Update method void createShortcutsBasedOnGridSize(int currentXPosition, int currentYPosition, int rowHeight, GridSize gridSize, int optionLayoutStyle, final Shortcuts... shortcuts)
    • Improved method getPositionInGrid()

v0.2.0

  • Improved Animation enter/exit on Shortcuts (See Preview)
  • Update ShortcutsCreation class, now support all grid size!! (Tested major grid size Column x Row: 4x5, 4x4, 5x5, 5x4)
  • Added class Utils
    • Public method GridSize getGridSize(AdapterView gridView)
    • Public method int getToolbarHeight(Activity activity) moved from ShortcutsCreation
  • Added class GridSize
    • Public constructor GridSize(int nColumn, int nRow)
    • Public method int getRowCount()
    • Public method int getColumnCount()
  • Update ShortcutsCreation, added param int rowHeight to constructor
  • Update ShortcutsCreation class
    • Added constructor ShortcutsCreation(Activity activity, ViewGroup masterLayout, GridView gridView)
    • Added private method boolean isClickOnItem(int currentXPosition, int currentYPosition, GridSize gridSize)
  • Deleted ResizeAnimation class
  • Bug fix and code improvement

v0.1.0

  • Support API 14+ (API 25 Compatible)
  • Added params ShorcutsCreation class for initialize gridView and parentLayout
    • Public constructor ShortcutsCreation(Activity activity, ViewGroup masterLayout, AdapterView gridView)
    • Public method to create shortctus void createShortcuts(int currentXPosition, int currentYPosition, Shortcuts... shortcuts)
    • Public method to clear layout void clearAllLayout()
    • Private method int getToolbarHeight(Context context)
    • Private method void getScreenDimension()
    • Private method int getPositionInGrid(int currentXPosition, int currentYPosition, AdapterView gridView)
  • Added Shortcuts class for create your custom shortcuts!!
    • Public constructor with params Shortcuts(int shortcutsImage, String shortcutsText, View.OnClickListener onShortcutsClickListener)
    • Public constructor with params Shortcuts(int shortcutsImage, String shortcutsText)
    • Public method void init(View layout) do not use this, it's just to initialize shortcuts in ShortcutsCreation class
  • Added ResizeAnimation class to make transition
    • Public constructor ResizeAnimation(View v, float fromWidth, float fromHeight, float toWidth, float toHeight)
    • Protected method applyTransformation(float interpolatedTime, Transformation t)

CREDITS

Author: Michele Lacorte ([email protected])

Follow my Google+

CONTRIBUTING

If you want to contribute to the project fork it and open Pull Request, or contact me by e-mail.

Each proposal will be accepted!

LICENSE

Copyright 2016 Michele Lacorte

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.

Support on Beerpay

Hey dude! Help me out for a couple of 🍻 !

Beerpay Beerpay

You might also like...
A Java library that models spring dynamics and adds real world physics to your app.

Rebound About Rebound is a java library that models spring dynamics. Rebound spring models can be used to create animations that feel natural by intro

A beautiful ripple animation for your app
A beautiful ripple animation for your app

Android Ripple Background A beautiful ripple animation for your app. You can easily change its color, speed of wave, one ripple or multiple ripples. S

A Java library that models spring dynamics and adds real world physics to your app.

Rebound About Rebound is a java library that models spring dynamics. Rebound spring models can be used to create animations that feel natural by intro

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates
A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

AppIntroAnimation is a set of code snippets to make cool intro screen for your app with special Image Translation and Transformation animation effects. It is very easy to use and customize without adding third party library integrations. Customizable bounce animation for any view like in Clash Royale app
Customizable bounce animation for any view like in Clash Royale app

Bounceview-Android Customizable bounce animation for any view updation Getting Started In your build.gradle dependencies { implementation 'hari.bo

Navigation pattern like in Google News Stand app with transitions

Google-NewsStand-Animation-Android Navigation pattern like in Google News Stand app with transitions Getting Started In your build.gradle dependencies

Location tracking & geofencing the easy way. Supports background, killed app, rebooted device different update intervals.

Geofencer Convience library to receive user location updates and geofence events with minimal effort. Features: supports Android-Q receive updates on

An Anime Watching App With Better player And Faster Servers
An Anime Watching App With Better player And Faster Servers

Kayuri An Android app to watch anime on your phone without ads.With GoogleServers and Manual Settings Toogles. This is a Fork Of Anime X Stream which

Comments
  • Remove application tag from manifest

    Remove application tag from manifest

    Please remove the application tag from the library here: https://github.com/michelelacorte/AndroidAppShortcuts/blob/master/library/src/main/AndroidManifest.xml#L4

    Otherwise, apps are forced to override those values and it does not make sense to define those values in the library already

    opened by MFlisar 0
  • Use as popup view alternative

    Use as popup view alternative

    I've a sidebar app that does not use an activity but draws over other apps. Is it possible to use this library in my app if I can't provide an activity context? Or is this activity context essentiell?

    opened by MFlisar 4
Releases(2.0.0)
Owner
Michele Lacorte
Android developer. Checkout my apps and libraries!
Michele Lacorte
Compose-actors - Android app built with jetpack compose follows new revamped guide to app architecture

Compose Actors ?? Inspired from JetCaster JetNews JetSnack More compose content

Raj 110 Dec 29, 2022
FastHub - Yet another open-source GitHub client app but unlike any other app

FastHub - Yet another open-source GitHub client app but unlike any other app

zeromake 15 Nov 20, 2022
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the Etsy app.

EtsyBlur EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the past Etsy app. Try out the sa

Manabu S. 755 Dec 29, 2022
An easy, flexible way to add a shimmering effect to any view in an Android app.

Shimmer for Android Shimmer is an Android library that provides an easy way to add a shimmer effect to any view in your Android app. It is useful as a

Facebook 5.1k Dec 26, 2022
DuGuang 1k Dec 14, 2022
With MVVM Architecture pattern using Android Architecture Components This is a sample app demonstrating Youtube player animation using constraint layout

Youtube UI/UX Animation This is a sample app demonstrating Youtube UX/UI animation using ConstraintLayout.It implements the Keyframe Animation feature

Burhanuddin Rashid 866 Dec 29, 2022
How to apply meaningful and delightful motion in a sample Android app

Applying meaningful motion on Android How to apply meaningful and delightful motion in a sample Android app Read the complete post at https://medium.c

André Mion 166 Nov 12, 2022
The Android app of Hachi Tov Hummus

HummusAndroidApp This was a passion project we wanted to make for a long time. It is improving both the dining experience for the customers and the wo

null 0 Nov 8, 2021
Image-search - An Image search android app with offline support

image-search Image search app built using bing image search API via paging 3. Fe

Suraj Vaishnav 3 Feb 17, 2022
PassCode is the Android app made by using Jetpack Compose. Created for the test task submission.

PassCode PassCode is the Android app made by using the Jetpack Compose. Created for the test task submission. Showcase Dark Theme Light Theme ACs The

Basil Miller 1 May 25, 2022