jtribe / shelly Goto Github PK
View Code? Open in Web Editor NEWFluent API for common Intent use-cases for Android
License: Apache License 2.0
Fluent API for common Intent use-cases for Android
License: Apache License 2.0
Having Context as a required parameter to an email
or share
means that the resulting builder has a reference to the Application/Activity.
It could be better to provide the context only when needed to avoid these issues.
This means the API might look something like:
Shelly.share()
.text("shareText")
.send(context);
It would be convenient to be able to get an Intent from an Email/SocialShare, in addition to being able to start the Intent.
For example:
Intent shareIntent = Shelly.share(context)
.text("shareText")
.intent()
Calling startActivity()
on the intent will only show a chooser dialog when there's more than one app capable of receiving the intent. Then the user will also be able to select one of these apps as default app. When sharing content this is usually not the desired behavior.
Using [Intent.createChooser()
](https://developer.android.com/reference/android/content/Intent.html#createChooser%28android.content.Intent, java.lang.CharSequence%29) will always display a chooser dialog and not allow the user to select a default application.
It would be convenient to be able to make phone calls/dial numbers.
Example API:
Shelly.phone()
.number("1234 123 123")
.dial()
Shelly.phone()
.number("1234 123 123")
.call()
Where call would call the provided number, and dial would dial the number but not the call.
The documentation for Intent.ACTION_SENDTO
doesn't list any supported extras.
EXTRA_EMAIL
, EXTRA_CC
, etc are only valid for ACTION_SEND
and ACTION_SEND_MULTIPLE
even though some apps also support them with ACTION_SENDTO
. Receiving apps that only implement what is documented won't read the extras.
The documentation also doesn't mention a type for ACTION_SENDTO
intents. While it is unlikely that setting the type to message/rfc822
is causing any problems today it might in the future.
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.