MobileIntent
link to start application. full of fuck'n shit.
Installation
Add this line to your application's Gemfile:
gem 'mobile_intent'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mobile_intent
Usage
setup
in config/initializer/mobile_intent.rb
MobileIntent.setup do
register :myapp, :android => 'com.example.myapp', :ios => 'myappname'
end
link_to
in your view
<%= launch_app 'open app', :myapp, 'mypage', :class => 'btn' %>
<%= launch_app :myapp, 'mypage', :class => 'btn' do %>
<i class="icon-app" />
open app
<% end %>
it create A-tag to start application with "myapp://mypage" or redirect to store.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request