2013-01-01から1年間の記事一覧

How to show buttons in notification area

Introduction In my test project *1, I wanted to show some buttons in notification area of the Android device. So I googled for a while and I found that Notification.Builder#addAction *2 might help me. Result I implemented a button on notif…

How to display a dialog with Apache Cordova

Motivation I wanted to display a dialog in my application *1 to show text of OSS (Open Source Software) licenses. So I read the official site *2 and tried to show a dialog but I got stuck again. Where do I need to execute commands? The off…

How to add an Android native plugin to a cordova project

Motivation I have been developing a very simple music player application for Android using Apache Cordova and jQuery Mobile *1 to learn how to develop a hybrid application. But I think the new version of Apache Cordova, I am using version …

How to call back from java to javascript in cordova

Motivation I wanted to notify changes of play state from the native java plugin to javascript in my project. I struggled the mission and I finally solved it. Let me share the solution. The first implementation First I tried to store the Ca…

Selecting a specified page in ViewPager when starting

Motivation I realized the pages, each of which has some fragments hierarchically, in the previous post. Now I need to add a new feature to the sample application. The feature is to resume the page which was displayed last time when restart…

Separate backstacks of fragment in each tab with ViewPager

As I found how to realize screen transition in each tab using ViewPager (not TabActivity!), let me share it. The beginning and motivation First, I wanted to create the screen transition pattern like below. Screen -+- Tab[1] - Sub screen(1-…