ShortcutBadger Library : Counter on Android app like Facebook

An Android library supports badge notification like iOS in Samsung, LG, Sony and HTC launchers.
From StackOverflow a android user WeWe asked a question :
Q. How to display balloon counter over application launcher icon on android

Then i search and find a helpful android library named ShortcutBadger. The ShortcutBadger makes your Android App show the count of unread messages as a badge on your App shortcut!
Support launchers:

Download Library


1. Add mavenCentral to your build script.
    repositories {
2. Add dependencies for ShortcutBadger, it's available from maven now.
    dependencies {
        compile 'me.leolin:ShortcutBadger:1.1.4@aar'

3. Add the codes below:
int badgeCount = 1;
    ShortcutBadger.applyCount(context, badgeCount); //for 1.1.4
    ShortcutBadger.with(getApplicationContext()).count(badgeCount); //for 1.1.3

4. If you want to remove the badge
    ShortcutBadger.removeCount(context); //for 1.1.4
    ShortcutBadger.with(getApplicationContext()).remove();  //for 1.1.3

    ShortcutBadger.applyCount(context, 0); //for 1.1.4
    ShortcutBadger.with(getApplicationContext()).count(0); //for 1.1.3

Note :

If you receive mail from Google contains message like :
    REASON FOR WARNING: Violation of section 4.4 of the Developer Distribution Agreement.
Please use version 1.1.0+

Android Google ProgressBar Library

I am here for share android library to display progress like Google does in some of his services. Android library to display different kind of google related animations for the progressBar.

The demo app can be found in the play store.

Download Library

These animations have been finished so far:
FoldingCirclesProgressBar GoogleMusicDicesDrawable NexusRotationCross.gif NexusRotationCross.gif


Different colors for the already existing `GoogleMusicDicesDrawable'. Either the whole dice or his faces.
I also would love to receive your pull requests to create any of the following animations or others that you think fit on this library:

Nexus 5 circles boot progress animation (Just the circles bouncing)



Add a ProgressBar to the xml layout:

Choose from the list of Drawables the one you want to use and place it in your code:
    protected void onCreate(Bundle savedInstanceState) {
        mProgressBar.setIndeterminateDrawable(new your_list_option.Builder(this)
your_list_option can be replace for:

  • FoldingCirclesDrawable
  • GoogleMusicDicesDrawable
  • NexusRotationCrossDrawable
  • ChromeFloatingCircles

The more custom Drawables finished, the more options in this list.

Attributes depending on the drawable:


mProgressBar.setIndeterminateDrawable(new you_list_option.Builder(this)
                                                             .colors(getResources().getIntArray(R.array.colors) //Array of 4 colors

  • FoldingCirclesDrawable
  • NexusRotationCrossDrawable
  • ChromeFloatingCirclesDrawable

So far GoogleMusicDicesDrawable doesn't have color options. The animation speed can be modified easily with android:indeterminateDuration in the xml.

If not colors are define the 4 default google colors (red,blue, yellow and green) will be used.

From XML

When you want to use the GoogleProgresBar from XML you need to add the following view to your layout:
The require attribute gpb:type will specify the type of ProgressBar to display
your_list_option can be replace for:

  • folding_circles
  • nexus_rotation_cross
  • google_music_dices
  • chrome_floating_circles

The more custom Drawables finished, the more options in this list.
Each type of GoogleProgressBar have different attributes:

Attributes depending on type:


  • folding_circles
  • nexus_rotation_cross


  1. Optional, If not colors are define the 4 default google colors (red,blue, yellow and green) will be used.
  2. It needs to be an array of 4 colors

So far google_music_dices doesn't have color options. The animation speed can be modified easily with android:indeterminateDuration in the xml.

Including in your project

You can either add the library to your application as a library project or add the following dependency to your build.gradle:

dependencies {
    compile 'com.jpardogo.googleprogressbar:library:(latest version)'


In order to use this library with proguard you need to add this line to your proguard.cfg:
-keep class** { *; }

Hope it help you.

Zephyr - Tiny Linux OS for Internet of Things

The 21st century is witnessing a great change over in the daily life of folks with the advent of IoT devices that are capable of talking to each other without any human intervention.

Yeah! Now you do not have to individually cascade an instruction to each of your home devices to accomplish a task. All have gone automated with the actuators and sensors which are infused into the home appliances.

The fact is that your IoT devices would only comply within the family of same manufacturers. For example, if you have a Samsung smart refrigerator, and your wearable device is from Apple or any other vendors, then it couldn't sync as both are from different genres.

No need to worry now!

Zephyr: Future of IoTs

The Linux Foundation has broken all the barriers of compatibility issues by releasing a Real-Time Operating System (RTOS) for Internet of Things devices, dubbed "Zephyr". This OS enables connected devices to communicate with the same protocol.

So, no more digital barricades between your thermostat and your wearable devices, as they could communicate with each other using the same protocols.

The Zephyr project is supported by multiple platforms like NXP Semiconductors, Synopsys, and UbiquiOS Technology and is licensed under Apache 2.0.

Why is Zephyr so important?

Zephyr stands out from the crowd as it provides a scalable, customizable, secure and open source operating system to be used across multiple architectures.

Doing so, Zephyr could help solve many of the current limitations that prevent, so far, Internet of Things from becoming really mainstream.

Zephyr is expected to take the best of both sides: low-consumption as well as speed. 

Here's some key points about Zephyr:
  • Scalability: Universality of Interconnected devices
  • Umbrella Platform: All smart devices could run under a single roof.
  • Baby Footprint Kernel: Zephyr kernel can run on 8kb memory devices
  • Modularity: Supports to integrate 3rd party modules for additional functions as intended by the developer.
  • Licensing: As startups does not have to bother about any licensing clash, as a unique license file would be mailed to everyone.
Apart from the special features, Zephyr also supports technologies including Bluetooth, Bluetooth Low Energy, IEEE 802.15.4, 6Lowpan, CoAP, IPv4 and IPv6, NFC, Arduino 101, Arduino Due, Intel Galileo' Gen 2, and NXP FRDM-K64F Freedom board.

Security in Mind

Since connected devices are most hack prone items, these devices may malfunction when gets compromised.

However, Linux is more concerned about the Security of Individuals, and generally open source software is considered more secure, as anyone can inspect flaws and debug the code.

For this, the Linux Foundation is maintaining a dedicated security working group and a delegated security maintainer to be available through IRC Chats, so that anyone could help report the vulnerabilities in open discussions.

Although there are many other alternatives available for Internet of Things RTOS like Brillo from Google, Rocket from Intel, and Ubuntu Core from Canonicals, nothing would be as fascinating as Zephyr.

Mobile GUI Design Trends Changes Over Time

When the point of contact between the product and the people becomes a point of friction, then the industrial designer has failed.

Stop reading. Take a moment to think back, and ask yourself, which was the last app you used? And no, using Chrome to read this doesn’t count. Now, focus on the app. What made you choose it over other similar apps? What was the first thing that made an impact on you and drew you towards it?

Did it live up to your expectations? Was the userflow smooth and seamless? Was the layout intuitive and aesthetically pleasing? Were you able to accomplish your purpose without any hiccups? Were there any animations that caught your eye?

While your responses would be most welcome in the comments section below, the conclusion drawn from answering these questions is that in a world where the tiniest of factors can prove to be the difference between a good and a bad experience, pleasing the user subsequently becomes the pivotal point that dictates whether or not a product is successful. Was it always like this? Was this user-first, design-centric approach prominent from the beginning? The answer is a resounding and rather disappointing ‘no.’

Early Stages

Like most technological developments, the idea of a User Interface was thought of light years ahead of its time, in an age where digital computers were large mainframes, which required pre-programmed and scheduled punch cards for even the simplest of interactions. Douglas Englebert, an electrical engineer who worked as a radar operator in World War II, envisioned a CRT display system that showed users graphical information, his ideas fueled by a paper on the subject written in the 1930s. Englebert eventually went on to display text and lines on a CRT screen in 1968, taking the first step towards the evolution of user interfaces and opening the world’s eyes to what the future looked like — a completely digital, paperless world.

This vision of things to come caused Xerox, a company that made its fortune selling photocopiers, to balk and take the reins. The company launched PARC (Palo Alto Research Center), a forward-thinking unit that encouraged visionaries to come there and work on a five-year plan — moonshots of that era, if you may. The PARC team ended up doing just that, launching the Xerox Alto with a 606*808 raster display, roughly the same size as a sheet of paper, with a file manager and bitmap creator inbuilt. A few years down the line, Smalltalk, a development environment for the Alto was launched, and it was this program that first introduced concepts like windows to separate tasks, icons to depict programs, dropdown menus, radio buttons and scrollbars.

Apple’s Contributions to the Development of User Interfaces

With user interfaces poised to make a widespread commercial influx, it was none other than Apple that led the charge. Building on the success of the Apple II, which displayed both text and graphic albeit through a command line interface, Wozniak and Jobs, aided by former PARC engineers, set about to recreate the work done on the Alto, manifesting its forward-thinking interface concepts in the form of the UI for Apple’s next-gen Lisa computer. The Lisa built upon Smalltalk’s interface, introducing new interface standards like universal icons and disabled items, and went on to introduce some of the first experience-driven standards like double clicking, drag-and-drop, and keyboard shortcuts. The Lisa’s sales figures were low due to its high price tag and complex code mechanism, but it sparked the idea of the Macintosh in Jobs’ mind, giving rise to an entire lineup of relatively affordable, yet powerful and easy-to-use computers which persists unto this day. It was around this time that Bill Gates, spurred on by his time at Apple and the efforts of other companies like VisiCorp, went on to create and launch the prequel to Windows, dubbed Interface Manager.

Design in the 90s

The 90s marked the period that ultimately defined modern user interfaces, with numerous companies throwing their hats into the ring, coming up with and ultimately launching software sporting variants of the window pattern created by Xerox and popularized by Apple. While most of the contenders during this period were ultimately phased out, each fork sported some unique features that make appearances in interfaces to this day, such as Commodore’s Amiga Workbench, that featured stacked windows, Acorn, which introduced proportionally-sized scrollbars and a dock at the bottom, and NeXTSTEP, which sported a floating dock on the side and an X button to close a window.

As time passed, Windows and X Window System became the frontrunner interfaces, with Windows developing into a successful line of operating systems and X Window System becoming the open source Linux solution that gave rise to projects like GNOME and KDE.

Evolution of Design Patterns

As the end of the millennium rolled around, the spotlight shifted away from desktop operating systems, with the World Wide Web taking center stage. Since website layouts and components relied on familiar patterns like menus on the top, checkboxes, et al, designers focused on styling these components, marking a paradigm shift from the creation of design to the refinement of it.

Due to the commercial advent of the personal computer, an increasing majority of users accessing software programs and websites were average consumers, lacking in technical skills. The new digital interaction model and absence of familiarity caused the onboarding and subsequent task flows to suffer, giving rise to user dissatisfaction and high drop-off rates. Designers took it upon themselves to remedy this, creating a visual style called “skeuomorphism”, which is “the design concept of making items represented resemble their real-world counterparts.” Skeuomorphic design spread like wildfire, with Apple being one of the frontrunners in its expansion, giving a paper-like look to its Notes app, a leather finish to its Wallet app, and so on. The trick worked, and bred a sense of familiarity among users, easing the transition to the digital interaction model. As time passed, however, personal computers (and subsequently, laptop computers) become a common possession, and the need for a real world-resembling visual language passed.

At this point, designers unanimously decided to unite at the other end of the spectrum, taking advantage of the lack of boundaries in the digital world,  quickly developing and spreading the “flat design” trend. Flat design sported vivid colors, thin and futuristic fonts, plenty of whitespace and a stark, minimal look with a signature lack of detail. While the skeuomorphic trend still persists albeit faintly, flat design has gained a monopoly on the web and some operating systems like Windows 8, only to be recently challenged by Google’s Material Design.

Handheld Devices and the Intentions Behind Their Design

When handheld devices first became popular in the early 2000s in the form of Windows Mobile handsets, iPods, MP3 players, et al, designers everywhere agreed that the desktop point-and-click metaphor simply could not apply to this category of digital systems. Led by Apple once again, mobile designers adopted a post-WIMP style of interaction, where content selection was initiated either by a touch or button press. This style worked well and became the standard for handheld interaction, going on to become the universally accepted approach to designing for anything that could fit in the user’s hands, including tablets.

Handhelds quickly spread among consumers, becoming an unquestioningly necessary accessory and augmenting human culture in never-before-seen ways. While desktop computers remained stationary and laptop computers were relatively bulky, smartphones and tablets allowed a level of portability that made them more than just computers, going on to become devices of leisure and real-time entertainment. The increasing reliability of users on this class of devices and their unprecedented spread among consumers sparked the first serious User Experience revolution, which continues unto this day. UX has become an important standard in design, encompassing UI design as well as giving rise to subcategories like interaction design, and it is good UX design that augments and vivifies our handheld experience.

Current Trends

As technology matured, design took on numerous forms, with design teams everywhere adding their own flavor and spin to the accepted trends. Each subsequent update, be it an operating system, an app or a website, saw yet another mutation towards the final form that the team behind the product envisioned, and clear distinctions and uniqueness arose.

Microsoft worked outside the box for a few years up until the ‘Aero’ glass-like look of Windows 7, after which it went the completely flat route for both its desktop as well as its mobile operating systems, characterized by large colorful tiles, an elegant and thin typeface, and a monochromatic color scheme within apps, calling this style “Metro UI.”

Apple built on its Lisa operating system, maintaining the underlying look and experimenting with trends along the way. Right up until OS X Mavericks and iOS 6, Apple’s software was prominently skeuomorphic, using real-world finishes and gradients across the operating system as well as the apps. From OS X Yosemite and iOS 7 onwards, things changed to reflect flat design, keeping Apple’s unique flavor in the form of subtle yet delightful gradients, and elegant type across its range of products, even extending to the buttons on its Macbook lineup.

Linux distros, due to their varying nature and host of interface managers lack a unified look, with Ubuntu, sporting the side-dock from NeXTSTEP gaining favor among end users for its simplicity and similarity to Windows.

Google stayed on the fence for many years, flirting with both ends of the spectrum by using plenty of whitespace, and subtle gradients as decor. This lack of a complete commitment eventually led to the formation of Material Design, Google’s flat design language augmented by skeuomorphic metaphors like paper and ink, which has taken the software design industry by storm as of late, making its way from Android to the web, and even to other platforms.

What Lies Ahead

With experience design (UxD) and interaction design (IxD) occupying the forefront of designers’ minds in the current age, what do the years to come hold for the never-ending evolution of design? Two clear camps are forming around Augmented Reality and Virtual Reality. While the latter will still rely on interface and perhaps borrow from existing trends as early adopters like Google Cardboard are doing, the former mostly constitutes of a natural and intuitive experience that lacks an interface. UI may quite possibly be taken out from the AR equation altogether, but suppositions are just that and only time will reveal its mysteries.

Ram Booster Android Application - Source Code Free

RAM Booster is one of the most powerful memory cleaning application designed for Android devices which will work perfectly in your Android Phone .

This application mostly reduces lags for a purpose of increasing speed of your device. Power Ram Booster is the best solution for all who have problems with the memory, with slow device , with low performance or just want to improve the performance in all directions .

RAM Booster uses a latest technology to optimize the performance of your device.

It will kills low priority tasks and process which is no need for the device most of the time. For maximum results you should do two times manual boost once a day.

Only one single button to BOOST your memory within in a second . Just click the Boost button from the home screen .. simple and easy memory cleaner application with beautiful design .



  1. Its support Android Marshmallow Operating system .
  2. Simple and Easy one touch memory free app .
  3. Notices – You receive notifications ones your phone runs out of memory.
  4. Android Studio Support
  5. Admob Support

GM Bot - Android Malware Source Code Leaked Online

The source code of a recently discovered Android banking Trojan that has the capability to gain administrator access on your smartphone and completely erase your phone's storage has been LEAKED online.

The banking Trojan family is known by several names; Security researchers from FireEye dubbed it SlemBunk, Symantec dubbed it Bankosy, and last week when Heimdal Security uncovered it, they dubbed it MazarBot.

All the above wave of Android banking Trojans originated from a common threat family, dubbed GM Bot, which IBM has been tracking since 2014.

GM Bot emerged on the Russian cybercrime underground forums, sold for $500 / €450, but it appears someone who bought the code leaked it on a forum in December 2015, the IBM X-Force team reported.

What is GM Bot and Why Should You Worry about it?

The recent version of GM Bot (dubbed MazarBOT) has the capability to display phishing pages on the top of mobile banking applications in an effort to trick Android users into handing over their financial credentials to the fraudsters.

Besides this, the banking trojan is also capable of forwarding phone calls and intercepting SMS messages to help fraudsters bypass an additional layer of bank security mechanisms, and locking a device’s screen.

Cyber criminals could also use the malware to:
  • Spy on victims
  • Delete data from the infected device
  • Gain boot persistence to help survive device restart
  • Send and Read your SMS message
  • Make Calls to your contacts
  • Read the phone's state
  • Plague phone's control keys
  • Infect your Chrome browser
  • Change phone settings
  • Force the phone into sleep mode
  • Query the network status
  • Access the Internet
  • Wipe your device's storage (the most critical capabilities of the malware)
However, someone leaked the malware source code only to boost his/her reputation on an underground forum, according to the researchers.

GM Bot Android Malware Source Code for FREE

Yes, the source code for GM Bot and its control panel is now accessible to cybercriminals and fraudsters for FREE.

Here’s the Cherry on the Top:

Besides the source code, the leader also posted a tutorial and instructions for server-side installation, which means cybercriminals can create their own versions of the malware strain to conduct online banking frauds.

Though the archive file containing the source code and its control panel is password protected, the leader is offering the password only to active forum members who is approaching him.

"Those who received the password, in turn, passed it on to other, unintended users, so the actual distribution of the code went well beyond that discussion board’s member list,

- IBM cyber security evangelist Limor Kessem wrote in a blog post.
Online users had started sharing the password to the archive among their friends, and in no time, the GM Bot source code was all over the hacking underground forums.

GM Bot is one of the most dangerous banking trojan in the Android ecosystem and after its source code gets leaked, users are recommended to beware while banking online.

How to Protect Yourself?

As I previously mentioned, online users are advised to follow these steps in order to protect themselves against this kind of threat:
  • Never open attachments from unknown sources.
  • Never click on links in SMS or MMS messages sent to your phone.
  • Even if the email looks legit, go directly to the source website and verify any possible updates.
  • Go to Settings → Security → Turn OFF "Allow installation of apps from sources other than the Play Store" option.
  • Always keep an up-to-date Anti-virus app on your Android devices.
  • Avoid unknown and unsecured Wi-Fi hotspots and Keep your Wi-Fi turned OFF when not in use.

Mazar BOT : How this Android Malware Works and Harm Your Device

A new Android malware has been making waves recently that have the capability to gain root access on your smartphone and completely erase your phone's storage.
Dubbed Mazar BOT, the serious malware program is loaded with so many hidden capabilities that security researchers are calling it a dangerous malware that can turn your smartphone into a zombie inside hacker's botnet.

Mazar BOT was discovered by Heimdal Security while the researchers at the firm were analyzing an SMS message sent to random mobile numbers and locations.

How Mazar BOT Works

Despite other Android malware that distributes itself by tricking users into installing an app from third-party app stores, Mazar spreads via a spam SMS or MMS messages that carry a link to a malicious APK (Android app file).

Once the user clicks the given link, he/she'll be ending up downloading the APK file on their Android devices, which when run, prompts the user to install a new application.

This new Android app has a generic name, MMS Messaging, that asks for admin level privileges. Most of the users end up giving the root access to the malicious app due to its common name.

What Makes Mazar BOT So Nasty

Once gaining root access on the victim's device, Mazar BOT can do variety of nasty stuff on your Android devices, like:

  • Gain boot persistence to help survive device restarts
  • Send and Read your SMS messages
  • Make Calls to your contacts
  • Read the phone's state
  • Plague phone's control keys
  • Infect your Chrome browser
  • Change phone settings
  • Force the phone into sleep mode
  • Query the network status
  • Access the Internet
  • Wipe your device's storage (the most critical capabilities of all)

Mazar BOT Browses Internet Anonymously Using TOR

Besides these tasks, Mazar BOT can also download a legitimate TOR (The Onion Router) Android app on your smartphone and install it too, even without your consent or permission.

Using TOR app, the malware would be able to surf the Internet anonymously via the Tor network.
Once the malware installs TOR on victim's phone, Mazar BOT sends a "Thank you" message to an Iranian phone number (9876543210), along with the device's location.

In some instances, Mazar BOT also installs an Android app called Polipo Proxy that establishes a proxy on the device, allowing the malware's author to spy on victim's Web traffic and carry out Man-in-the-Middle (MitM) attacks.

Who is Behind This Awful Malware?

Mazar BOT is believed to be distributed by a Russia-based group of cyber-criminals.

One clue to this assumption is: 

Mazar BOT cannot be installed on Android smartphones in Russia, as its source code includes instructions on how to stop the malware installation process on phone configured with the Russian language.

Another clue is:

There is an unwritten law in Russia that says "If cyber criminals don't go after Russians, Russian authorities will not go after them." Moreover, there is no such indication yet that this Mazar BOT campaign has affected anyone in Russia.
Until now, Mazar BOT for Android has been advertised for sale on several Russian underground (Dark Web) forums, but this is the first time this creepy code has been abused in active attacks.

How to Protect Yourself from Mazar BOT

There are standard protection measures you need to follow to remain unaffected:

  1. NEVER click on links in SMS or MMS messages sent to your phone.
  2. Go to Settings → Security → Turn OFF "Allow installation of apps from sources other than the Play Store" option.
  3. Always keep an up-to-date Anti-virus app on your Android devices.
  4. Avoid unknown and unsecured Wi-Fi hotspots and Keep your Wi-Fi turned OFF when not in use.

How to Make Deep Link for Your App in Android

Deep Linking provides a mechanism to open an application to a specific resource. In this tutorial the opening of deep links via the payload of a notification, a link from a Rich App Page or the JavaScript Interface. The application still needs to be set up to handle deep linking.

Default Deep Link Strategy

The default deep link action assumes that the application is set up to handle deep links through Android implicit intents. Implicit intents are intents used to launch components by specifying an action, category, and data instead of providing the component’s class. This allows any application to invoke another application’s component to perform an action. Only application components that are configured to receive the intent, by specifying an intent filter, will be considered.

In this example, a single activity will be declared to handle all deep links for the app with the scheme vnd.urbanairship.sample and host deeplink. The activity will only exist long enough to open the deep link and will never be visible to the user.
A complete example can be found in the Sample Application.

Note :

When selecting a scheme for deep linking, choose one unique enough so as not to conflict with other apps on the user’s device, in order to avoid showing the user an app chooser.

Create the activity that parses the deep link:

public class ParseDeepLinkActivity extends Activity {
    public static final String PREFERENCE_DEEP_LINK = "/home/preferences";
    public static final String INBOX_DEEP_LINK = "/inbox/messages";

    protected void onCreate(Bundle savedInstanceState) {

        Intent intent = getIntent();
        if (intent == null || intent.getData() == null) {


        // Finish this activity

    private void openDeepLink(Uri deepLink) {
        String path = deepLink.getPath();

        if (PREFERENCE_DEEP_LINK.equals(path)) {
            // Launch preferences
            startActivity(new Intent(this, PushPreferencesActivity.class));
        } else if (INBOX_DEEP_LINK.equals(path)) {
            // Launch the inbox activity
            startActivity(new Intent(this, InboxActivity.class));
        } else {
            // Fall back to the main activity
            startActivity(new Intent(this, MainActivity.class));

Declare the activity in the AndroidManifest.xml file with the intent filter:

The intent filter should accept the default intent action android.intent.action.VIEW and either android.intent.category.DEFAULT or android.intent.category.BROWSABLE category. It should also filter out any intents that do not contain a data URI with the scheme vnd.urbanairship.sample and host deeplink.
   <activity android:name=".ParseDeepLinkActivity">
           <action android:name="android.intent.action.VIEW"/>

           <!-- Handles any vnd.urbanairship.sample://deeplink URI's -->
           <data android:scheme="vnd.urbanairship.sample" android:host="deeplink" />

           <category android:name="android.intent.category.DEFAULT"/>
           <category android:name="android.intent.category.BROWSABLE"/>
The application is now able to parse any predefined deep link paths. Alternatively, the ParseDeepLinkActivity could parse each segment of the path to construct a task stack using the Android TaskStackBuilder. This will enable sending any combination of deep links to define the entire task stack.
private void openDeepLink(Uri deepLink) {
    TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);

    // Treat each path segment of the URI as a deep link
    List<String> segments = deepLink.getPathSegments();

    // Create a task stack from the deep links
    if (segments != null) {
        for (String segment : segments) {
            Intent route = null;
            if ("preferences".equals(segment)) {
                route = new Intent(getApplicationContext(), PushPreferencesActivity.class);
            } else if ("inbox".equals(segment)) {
                route = new Intent(getApplicationContext(), InboxActivity.class);
            } else if ("home".equals(segment)) {
                route = new Intent(getApplicationContext(), MainActivity.class);

            if (route != null) {

    // Fall back to the main activity
    if (stackBuilder.getIntentCount() == 0) {
        stackBuilder.addNextIntent(new Intent(this, MainActivity.class));

    // Launch the activities
The deep link’s URI parameters can be used to pass extra data to one or more of the activities that are being invoked.
private Bundle parseOptions(Uri deepLink) {
    Bundle options = new Bundle();
    Map<String, List<String>> queryParameters = UriUtils.getQueryParameters(deepLink);

    if (queryParameters == null) {
        return options;

    for (String key : queryParameters.keySet()) {
        List<String> values = queryParameters.get(key);
        if (values.size() == 1) {
            options.putString(key, values.get(0));
        } else if (values.size() > 1) {
            options.putStringArrayList(key, new ArrayList<String>(values));

    return options;
Before launching the activities in the task stack, set the extras on the last intent:
Bundle extras = parseOptions(deepLink);
if (extras != null) {
    // Add the extras to the last intent
    stackBuilder.editIntentAt(stackBuilder.getIntentCount() - 1).putExtras(extras);

// Launch the activities
The app is now able to handle any deep links in the form of vnd.urbanairship.sample://deeplink/*. Where * is replaced with any deep link segments that the application knows how to parse and it will build the task stack in the specified order.


vnd.urbanairship.sample://deeplink/home/inbox?id=3 will launch the inbox activity on top of the main activity with the extra “id” with value “3”.

Alternative Deep Link Strategy

If the implicit intent deep linking strategy does not work for the application, the deep link action can be overridden to provide any custom deep linking behavior.

Create a custom action that handles deep linking. The example assumes the deep link is still a URI, but any value that translates to a deep link can be used.
public class CustomDeepLinkAction extends Action {

    public ActionResult perform(ActionArguments arguments) {
        Uri uri = UriUtils.parse(arguments.getValue().getString());

        String path = uri.getPath();
        Context context = UAirship.shared().getApplicationContext();

        Intent intent;
        if ("/home/preferences".equals(path)) {
            // Launch preferences
            intent = new Intent(context, PushPreferencesActivity.class);
        } else {
            // Fall back to the main activity
            intent = new Intent(context, MainActivity.class);

        // Launch the activity

        return ActionResult.newEmptyResult();

    public boolean acceptsArguments(ActionArguments arguments) {
        // Do any argument validation here.

        // Only accept String arguments
        if (arguments.getValue().getString() != null) {
            // Make sure we can parse the String as a Uri
            return UriUtils.parse(arguments.getValue().getString()) != null;

        return false;
Update the deep link action in the action registry after takeOff:
CustomDeepLinkAction action = new CustomDeepLinkAction();

ActionRegistry registry = UAirship.shared().getActionRegistry();

Enjoy your app deep link will work as you want. Please give some comment for appreciation.