d-tarasov / android-intents Goto Github PK
View Code? Open in Web Editor NEWA collection of well-known Android intents for most common actions
License: Apache License 2.0
A collection of well-known Android intents for most common actions
License: Apache License 2.0
Hangouts not shows in intent chooser cause it doesn't handles intents with "vnd.android-dir/mms-sms" type. You can find more details here:
http://stackoverflow.com/questions/20079047/android-kitkat-4-4-hangouts-cannot-handle-sending-sms-intent
The solution worked for me (tested only on 2 devices):
if (Versions.hasKitKatApi()) {
String defaultSmsPackageName = Telephony.Sms.getDefaultSmsPackage(activity);
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse("smsto:"));
intent.putExtra("sms_body", message);
if (defaultSmsPackageName != null) {
intent.setPackage(defaultSmsPackageName);
}
return intent;
} else {
Uri smsUri = Uri.parse("tel:");
Intent intent = new Intent(Intent.ACTION_VIEW, smsUri);
intent.putExtra("address", "");
intent.putExtra("sms_body", message);
intent.setType("vnd.android-dir/mms-sms");
return intent;
}
IntentUtils.openLink() will crash if url would be without scheme (for example "www.google.com"). Uri.parse() unable to handle such urls. If scheme is not provided you could add "http" as default:
if (!TextUtils.isEmpty(url)) {
if (!url.startsWith("http")) {
url = "http://" + url;
}
}
It would be cool to have attachable sources for maven dependency.
for some reason when including
compile 'com.dmitriy-tarasov:android-intents:+'
to build.gradle I get this error:
error: cannot find symbol
startActivityForResult(IntentUtils.pickImage(), GALLERY_REQUEST);
^
symbol: method pickImage()
location: class IntentUtils
but when I checkout the source and make a jar with mvn package and include in libs folder, everything compiles just great
what am I doing wrong? I've never experienced this kind of problems before
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.