Slinger alternatives and similar packages
Based on the "Utility" category.
Alternatively, view Slinger alternatives based on common mentions on social networks and blogs.
-
timber
A logger with a small, extensible API which provides utility on top of Android's normal Log class. -
ExpirableDiskLruCache
DISCONTINUED. Java implementation of a Disk-based LRU cache which specifically targets Android compatibility. -
Android-Templates-And-Utilities
Collection of source codes, utilities, templates and snippets for Android development. -
secure-preferences
DISCONTINUED. Android Shared preference wrapper than encrypts the values of Shared Preferences. It's not bullet proof security but rather a quick win for incrementally making your android app more secure. -
greenrobot-common
General purpose utilities and hash functions for Android and Java (aka java-common) -
Androl4b
A Virtual Machine For Assessing Android applications, Reverse Engineering and Malware Analysis -
vector-compat
A support library for VectorDrawable and AnimatedVectorDrawable classes introduced in Lollipop -
CastCompanionLibrary-android
DISCONTINUED. CastCompanionLibrary-android is a library project to enable developers integrate Cast capabilities into their applications faster and easier. -
motion
An Android library allowing images to exhibit a parallax effect that reacts to the device's tilt -
Colours
A beautiful set of predefined colors and a set of color methods to make your Android development life easier. -
Reservoir
DISCONTINUED. Android library to easily serialize and cache your objects to disk using key/value pairs.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Slinger or a related project?
README
Slinger - deep linking library for Android
Slinger is a small Android library for handling custom Uri which uses regular expression to catch and route URLs which won’t be handled by normal intent-filter mechanism.
With slinger it’s possible to provide deep links for quite complicated URLs.
[Scheme of Slinger resolving Activities using regular expression](assets/slinger_resolving_mechanism.png)
How do I use it?
Declare Activity in your manifest with your own IntentResolver
that will handle links within particular domain.
<activity
android:name="pl.allegro.android.slinger.SlingerActivity"
android:excludeFromRecents="true"
android:noHistory="true"
android:theme="@style/android:Theme.NoDisplay">
<meta-data
android:name="IntentResolver"
android:value="com.my.appp.ExampleIntentResolver"/>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="example.com"
android:pathPattern="/.*"
android:scheme="http"/>
</intent-filter>
</activity>
IntentResolver
is a class that redirects URLs to concrete Activities based on regular expressions.
@Keep
public class ExampleIntentResolver extends IntentResolver {
private List<RedirectRule> rules;
public ExampleIntentResolver(Activity activity) {
super(activity);
rules = asList(getRedirectRuleForAboutActivity(activity));
}
private RedirectRule getRedirectRuleForAboutActivity(Activity activity) {
return RedirectRule.builder()
.intent(new Intent(activity, MyConcreteActivityA.class))
.pattern("http://example.com/abc\\\\.html\\\\?query=a.*")
.build();
}
@NonNull @Override public Iterable<RedirectRule> getRules() {
return rules;
}
}
In case when no redirect rule is matched IntentResolver
will fallback to default Intent - Uri
with ACTION_VIEW
.
Customizing
Matching Activities
In order to provide other mechanism than regular expression matching you can override resolveIntentToSling
in IntentResolver
Enriching Slinged Intents with Referrer and input URL
Slinger enriches Intents with URL and referrer by default.
This can be changed by overriding enrichIntent
in IntentResolver
@Keep
public class ExampleIntentResolver extends IntentResolver {
@NonNull
@Override
public Intent resolveIntentToSling(@NonNull Uri originatingUri) {
// implement own intent resolving strategy here
return super.resolveIntentToSling(originatingUri);
}
@Override
public Intent enrichIntent(Activity parentActivity, Intent resolvedIntent, Uri originatingUri) {
// enrich resolved intent with custom data
return super.enrichIntent(parentActivity, resolvedIntent, originatingUri).putExtra("foo","bar");
}
}
Security considerations
Slinger does not sanitize input in any way. So providing security for application is your responsibility.
License
slinger is published under Apache License 2.0.
*Note that all licence references and agreements mentioned in the Slinger README section above
are relevant to that project's source code only.