Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 22.214.171.124 release ready!
If you are looking for a feature just like iPhone’s 3D Touch than in the language of android we call it App Shortcuts. Introduced in Android Nougat (API Level 25), whenever you tap and hold on to any app icon then it displays some options which can directly take you to some activity. App shortcuts are only supported in Nougat and above.
They are of three types :
To achieve this feature you can go to Android Developer they have provided details steps to add shortcuts in the app. But adding shortcuts is little tricky some of the beginners may find it hard. We will be discussing the easy way of adding them.
Matthias Robbers have provided a library called Shortbread which provides a very easy way to implement app shortcuts. Let’s get started with this awesome library.
First, You need to add the two dependencies in your build.gradle.
And to display the shortcuts, call Shortbread.create(Context context) in your Application class.
Now all you need to do is add the annotations on your activity to start it from the app shortcut.
As we can see in the above code segment, we have just added an annotation @Shortcut and assigned some attributes like
That’s all!!! try adding the shortcuts in your app and you can definitely play with the other attribute of the library to get more awesome results.
The results will look somthing like this
Thank you very much. This is Vedesh Kumar signing off.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Owner, Shop ATV Escape
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.