Intercept and debug url scheme on Android

Overview

Android-UrlScheme Interceptor

Test it

What's gonna happen?
✘ App not installed → Redirect to Play Store
App installed → Start the application or the interceptor

Click here to trigger the url scheme!

Integration

In your build.gradle file:

dependencies {
    compile 'fr.smarquis.usi:usi:1.0.0'
}

In your Application class:

public class YourApplication extends Application {

    @Override public void onCreate() {
        super.onCreate();
        Usi.intercept(this);
    }

}

If you want to intercept a custom scheme, simply override the usi_scheme string resource:

<resources>
    <string name="usi_scheme">your-custom-scheme</string>
</resources>

Or more complex, add a new IntentFilter to the InterceptorActivity:

<activity android:name="fr.smarquis.usi.InterceptorActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="your.project.com" android:scheme="http" />
    </intent-filter>
</activity>

That's it! UrlSchemeInterceptor will automatically intercept the corresponding scheme.

Manual trigger

This demo application can be launched without any modification.
Use this adb command to trigger the default url scheme with some parameters:

adb shell am start \
    -a android.intent.action.VIEW \
    -d 'usi://example.com:8042/over/there/index.html?query=something#refresh' \
    --es extra-string abc \
    --ez extra-boolean true \
    --ei extra-int 123 \
    --el extra-long 123456 \
    --ef extra-float 123.456 \
    --eu extra-uri http://www.google.com \
    --esa extra-stringArray a,b,c

Chrome Intents

The default Chrome implementation is done through intents.
Simply wrap the following intent into an <a href="..."> tag.

intent://example.com:8042/over/there/index.html?query=something#refresh#Intent;scheme=usi;package=fr.smarquis.usi.sample;action=android.intent.action.VIEW;S.string=abc;B.boolean=true;i.int=123;l.long=123456;f.float=123.456;end

The package=x.y.z; is mandatory to prompt the user to install the app if it is not already on the device.

You might also like...
Android News App built in kotlin with implementation of MVVM architecture, android navigation components and retrofit. Displays news to users allowing them to share and save news.
Android News App built in kotlin with implementation of MVVM architecture, android navigation components and retrofit. Displays news to users allowing them to share and save news.

News-App Android news app built in kotlin that fetches news data from news api with Retrofit and displays news to users. This App follow MVVM architec

MQTTandroidApp is android application that monitoring users state and other ambient condition, the acquire data is send at central broker (RaspberryPI3) of the MQTT architecture and then recieved back again an anothers android devices that chose to subscribe at topic. Tachiyomi is a free and open source manga reader for Android 6.0 and above. Android application allowing to sniff and inject Zigbee, Mosart and Enhanced ShockBurst packets on a Samsung Galaxy S20
Android application allowing to sniff and inject Zigbee, Mosart and Enhanced ShockBurst packets on a Samsung Galaxy S20

This Android application allows to sniff and inject Zigbee, Mosart and Enhanced ShockBurst packets from a Samsung Galaxy S20 smartphone. It interacts with a set of patches installed on the phone Bluetooth controller, allowing to add new capabilities to communicate using the previously mentioned protocols.

Android app for streaming and downloading Movies, TV-Series and Anime.
Android app for streaming and downloading Movies, TV-Series and Anime.

CloudStream-3 DOWNLOAD: https://github.com/LagradOst/CloudStream-3/releases Discord: https://discord.gg/5Hus6fM Features: AdFree, No ads whatsoever No

A reliable android app that shows upcoming fixtures, updated league tables, and top goal scorers in a Premier League and French Ligue 1
A reliable android app that shows upcoming fixtures, updated league tables, and top goal scorers in a Premier League and French Ligue 1

RapidScore Screenshots Table of Contents Description Dependencies API Reference Lessons Learnt Contributing Roadmap Google Playstore License Author In

Android Bitcoin market app base on Jetpack Compose and MVI. The app displays current bitcoin market price and history price k-line charts.

compose-bitcoin Android Bitcoin market app base on Jetpack Compose and MVVM & MVI. Features Current bitcoin market price. K-line charts of history pri

An educational android app that provides services like notes, online videos and visualization calculator to learn and understand deep concepts of DSA.
An educational android app that provides services like notes, online videos and visualization calculator to learn and understand deep concepts of DSA.

Aldo ALDO is a free education app for the young programmers who are desiring to master the concepts of Data Structure and Algorithms. ALDO offers prac

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

Ionic Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a sin

Releases(1.0.0)
Android developer tool to draw overlay layout for GUI debug

LayoutOverlay Overview Make a overlay window to show transparent shape to compare size with view, margin. Features Overlay window Drag Drag and drop t

7loro 1 Oct 11, 2021
Bringing webhooks into Telegram. Push messages to chats via URL with a simple API.

Webhooks over Telegram (WoT) WoT aims to provide a simple API for registering webhooks and sending messages to Telegram chats via them using a single

d1s utils 2 Oct 5, 2022
Vaibhav Jaiswal 57 Jan 3, 2023
Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Taskify Taskify is an app to manage your daily tasks and boost your productivity Video Introduction ?? This is a small introduction video about Taskif

Vaibhav Jaiswal 101 Jan 4, 2023
Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sending commands to the mobile by Wear OS.

OpWear-Cam Communicating between Wear OS and Android device using the OpWear module and a sample of displaying real-time camera on the watch and sendi

AmirHosseinAghajari 6 Nov 8, 2022
An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

CSwala 48 Nov 26, 2022
A news application through which you can learn and browse all the news that interests you by choosing the country and type of news with the ability to browse and add some news to your favorites

MY-NEWS-Android A news application through which you can learn and browse all the news that interests you by choosing the country and type of news wit

Mahmoud ELramady 0 Nov 11, 2021
🌄 Photo editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and PhotoEditor (Android)

React Native Photo Editor (RNPE) ?? Image editor using native modules for iOS and Android. Inherit from 2 available libraries, Brightroom (iOS) and Ph

Baron Ha. 242 Dec 28, 2022
🎥 A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose.

ComposeMovie Android ?? A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose. Built with

null 13 Oct 1, 2022
An Open-Source repository that contains all the Android Dev and Kotlin concepts and several projects on android ranging in difficulty making this repo completely beginner-friendly.

An Open-Source repository that contains all the Android Dev and Kotlin concepts and several projects on android ranging in difficulty making this repo completely beginner-friendly. The main aim of this repository is to help students who are learning Android Development or preparing for an Android Developer role-based job.

Mimo Patra 15 Dec 29, 2022