The Age Old Fedora Movie Player Issue

July 9, 2011 § Leave a comment

Its been so long since I posted! But believe me I have been busy, I want to post about the happenings of the past month too but right now I have something else to talk about. So, I just joined an internship at Arista Networks, Bangalore. Along with a plethora of technical terminology being thrown around me (which includes BGP, STP, context switching and so on), people actually talk with Linux commands. I mean, I have been using Linux (Ubuntu actually, which is really nice and easy) and I have done courses on Operating Systems and Computer Networks still I have been finding my engineering knowledge funnily inadequate.

Everyone here uses Fedora. Let me confess, my past experiences with Fedora haven’t been so charming. The last time I tried Fedora, I grabbed a Fedora 13 iso and honestly there are somethings I just wanted my OS to do for me that Fedora stubbornly refused to. Life was hard with Fedora 13. I struggled to even to get the media player working. So I stuck to a dual-boot with Ubuntu and used Fedora only while writing system calls for the operating systems course that shoved Fedora into my life in the first place.

With no choice, I installed Fedora 15 on the new company laptops given to us interns. After the surprisingly short installation process, I realized that Fedora 15 with Gnome 3 actually looks impressive! I wanted to listen to some bash scripting lectures so I played them using the default movie player option and the same error that I saw on Fedora 13 Movie Player popped. It made me want to pull my hair out then. But I will limit this post to telling how to fix the issue.

If your Movie Player refuses to play your media files saying that it requires additional plugins and then when you ask to search for the plugins it says that ‘Plugins couldn’t be found’, here is what you should do:

Step 1: Download these rpms:

http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

These rpms enable access to the free and non-free repositories. So, after you download them just install them (double-click on the files works 😉 ). First install the first rpm (free repo) and then the non free one.

Step 2: If you let Movie Player do the search now, it does find the plugins and installs them!

Optional: In case you are too fond of VLC, you could also ‘yum install vlc’ from the command line after enabling access to free and non free repos’ (Step 1)

It worked then!

GTap Working Application: Development Stage 1

May 11, 2011 § 1 Comment

Based on the plan in the previous post, we started to code the app. Now, like it always is with planning, we had set our goals very high. So we decided to build the first version of the app. In this, we use authentication through twitter, we don’t have information about the election candidate from his/her blog, news articles etc even though the goal was to provide feed from many places. As yet, we provide his twitter timeline (which, by the way should also reflect upon his views on issue of importance). We have not yet implemented the part where a user can interact with the the larger community, comment on the candidate’s agenda, his/her campaign etc.

So, without all of this, here it is, GTap v1.0!

Here are some screenshots of the app:

The Main Screen with a gallery of candidate pictures.

The candidate Profile Page in a tabbed layout(this was a pain to make :()

First tab shows the profile:

The Second tab has Agenda Points:

The next stage was authenticating the user when (s)he clicks ‘Show Support’ icon(that’s the green icon with a thumb)

To authenticate, we take the user to Twitter’s webView where (s)he can enter their username and password.

Now, loading the tweets!

And finally, the current statistics along with the recent tweets by a dummy candidate we made (The name is ab_lincoln11 and he tweets about Anna Hazare and Jan Lokpal bill 😐 )

This is it for now, though we are planning to code in the missing features I highlighted in the beginning of the post, over this summer. For now, its just CS exams and GRE preparation. Though I am planning to post detailed tutorials about how parts of this app was built. So check the blog in a few weeks!

GTap: Development Plan

May 8, 2011 § Leave a comment


I had posted a few weeks back about the motivation behind the Android application GTap. So this post is about the detailed plan for the application’s structure. After intense discussions I and Emaad decided that there has to be something, apart from the ‘I-want-to-be-an-informed-citizen’ , ‘I-want-to-choose-the-best-fit-candidate’  and other altruistic emotions, that would arouse the curiosity of people and spur them to use this application.

Having seen many elections on a smaller platform that is our university campus, we knew that most people indulge in gossip, trying to predict the outcome of the elections. Adding spice to the entire situation, the rumors make the audience wait in anticipation for the declaration of results. We thought, we should capitalize on this basic instinct of the people by giving them some sort of a prediction regarding the probability of success of a particular candidate. To make these predictions, we would use statistics elucidating the growing popularity of a candidate. The question was: How do we obtain the statistics?

Our solution is simple, we add a feature called ‘Show Support’ on the profile page of each candidate. On clicking this button, the user(which is a common man/woman) would be led to an authentication page (to avoid exploitation of this feature by repeated show of support by bored and jobless people). After authenticating, the application would increment a count of the number of  ‘Show Supports’ a candidate has received. These Show Support values would then be plotted on a graph, showing the growing/decreasing trends in the popularity of a candidate. Now, while discussing the possibility of Mr. X’s success to the position of college president, an Android device owner will flash GTap’s predictions in his fellowmen’s faces. And hence, more people using the application!

I got very smart-art-ish while writing a report on GTap’s development for an Android Development course running in our college, so I am going to flood this (and next few) posts with outcomes of my recent crush on MS Word’s Smart Arts! So lets get started!

APPLICATION STRUCTURE


The application flow consists of the main screen shown initially to the user, in the form of a dashboard containing the election candidates. Tapping an election candidate brings up a short profile view, which gives some quick information about the candidates current agenda, profile and popularity statistics. An action to show support for the candidate requires authentication via Twitter to prevent spam support votes.

Authentication with Twitter is done via OAuth, and open authentication protocol. The authentication settings, username and password are stored on the phone so the user doesn’t need to enter them every time he wishes to interact with the application. After authentication, the candidate’s full profile and statistics are loaded, with a live feed and popularity bar. It is from this screen that the voter can comment and view complete and live popularity statistics.

LIBRARIES USED

  • Android Plot
    AndroidPlot is a pure Java API for creating dynamic and static charts within your Android application. Unlike multi-platform plotting libraries that must cater to the lowest common denominator, AndroidPlot is designed from the ground up exclusively for the Android platform. The AndroidPlot developer library is compatible with virtually all versions of Android. We decided to use the Simple XY chart provided by AndroidPlot to graph the relation between time and the number of supporting vote received by the candidate. AndroidPlot is still in its nascent stages and is a closed library, but the Javadocs and support on the forums helped us style the graph to our liking to blend with the theme of the application.
  • Twitter4j
    Twitter4j is a pure Java library that provides a simple wrapper to the Twitter API. They also provide a trimmed down version suitable for Android, which we have used in our project. Twitter4j is used to first initiate the authentication process, but takes a back seat after the initiation so we have to write our own interface to handle the user procedure of entering the username and password. Twitter4j also provides functions to obtain the home and public timeline in the form of an ArrayList<Status>, but it was up to us to take this raw feed and transform it to something presentable via custom a ListView.

In will post the stages of development that the application has gone through next!

PS: Looking at the prospects and development of Open/Libre Office makes me feel I am never going to get over MS Office (hence living with a dual boot Linux/Windows system 😦)

Credits: Co-Developer for the project. Special thanks to him for the logo too!

BlueLink: Bluetooth Coupling based Theft Detection Application

April 5, 2011 § 1 Comment

BlueLink was the idea that I had suggested during the initial discussions on the OpenIntents discussion group. OpenIntents is the GSoC 2011 mentor organization under which I am applying for the program. They added BlueLink as an idea on their idea’s page for GSoC 2011 with the name ‘Device Theft Detection Intent’.

I had begun my search regarding the implementation of this application’s functionality with a vague idea of what I wanted it do. I wasn’t very aware of the ‘how’ part of it. So I will put a description of the app ( Its actually a part of my GSoC 2011 proposal) :

”  This project aims at developing an application that is intended to function as a passive anti-theft tool for Android devices. The concept embodied by the application is that Bluetooth-or-wireless-enabled devices in close proximity with each other  for a period of time can be made aware of each other’s presence, and hence react to each other’s absence when separated. The devices would agree to connect to each other and on the course of action that they would like to take in each other’s absence. ”

The work on this application has begun! There is a simple and intuitive User Interface. The User Interface highlights the options that the user would face:

  1. He would either start the application on his Android device.
  2. Or he would modify his setting for the application.

I device screen captured a couple of screen shots from the DDMS perspective in Eclipse and here they are:

The main Activity layout:

The Asking for Bluetooth permission Dialog:

When ‘Play’ Button is pressed!

Toast showing current device MAC address:

As yet, I have been working on the bluetooth device discovery and recognition part. Though the project is in its nascent stage, the detailed road-map and time-line for it have been laid out.

The discussions on the OpenIntents discussion group have shaped the road-map for the application and also brought me closer to the actual implementation of the functionality.

As the application deadline of student proposals for GSoC 2011 draws near, my nervousness regarding the results increases!

As for the application, I will be posting soon about latest developments as and when the implementation reaches the next stage!

GSoC 2011 : OpenIntents Proposal

April 5, 2011 § Leave a comment

About Me:

Name: Rachee Singh

Current Occupation: Computer Science Undergraduate (BITS Pilani Goa Campus, India)

Email ID: rachee.singh@gmail.com

IRC Handle: rachee

Goal of the Project:

The concept underneath this application resembles the simple mechanism adopted by crying children that quite effectively minimizes the probability of losing family members in crowded malls. The application intends to reduce the possibility of losing a mobile device on account of carelessness and forgetfulness on the part of the user.

OI Safe Patch for Issue #297

I made a tiny patch for issue 297 . The fix works this way:

  1. When the text (username/password) is copied to the clipboard, it is also copied to a static string variable in Safe.java.
  2. When the safe is locked, the clipboard is compared to this static variable, and if it is the same as the last stored password, the clipboard is cleared.

Safe.java isn’t terminated until the application terminates, so the static variable we need is retained.

The patch was applied here.

This fixed the issue #297.

This is link to the post on the discussion group.


Experience with Android Development

I have been involved with Android Development for the past 4 months. Although I had been well acquainted with Java for a much longer span, I have worked on the Android platform rigorously in these past 4 months. Here’s a list of android projects that I am working on:

  1. Route My To-Do
    This application is a location based To-Do list (integrated with Google Maps) with the capability to make a route on the Google Maps, displaying the route that you need to take from where you are to start checking tasks off the list!The idea behind this application is that f you are unavailable to perform all the tasks in person, someone else (for instance your driver) could finish the tasks for you.
  2. GTAP
    This application aims at enabling voters to make smarter decisions while choosing amongst candidates contesting for public offices in any organization, a university campus or at a bigger stage. Knowing the candidate’s general image, his own statements on issues of importance would enable a voter to play smart.


BlueLink, the work has begun!

As a result of the intense discussions on the lively discussion group of OpenIntents, BlueLink is not a mere thought on paper! The work has begun; so much so that the application has a face, it hunts for Bluetooth adapters in the vicinity, recognizes its old friends and raises alarms to neighboring application OI Safe.

You can download the android project here.

Here’s the OI Safe patch for integration with BlueLink.


Pick Me!

I had suggested a crude form of this project idea on the OpenIntents discussion group weeks before the application process for mentor organizations had begun. The acceptance of this idea by OpenIntents was more than what I could ask for. My eagerness to build this application is evident from the early communication with my prospective mentors. The regular discussions on the group led into the development of a fine roadmap and proposal that deals with every minute detail of each aspect of the application. Through my early start, contributions, past experience with Android programming and the half baked application ‘HelloBluetooth’, I think I have conveyed that I am the most motivated candidate for this project. Given the opportunity, I would carry this project on to a successful conclusion and continue to work for its improvement after the GSoC tenure.


Contribution beyond GSoC

This project involves integration with existing OpenIntents applications, for instance OI File Manager. Since I would be working closely with these applications, it would require me to delve into their source code. This puts me in a better position to work on the issues that the applications face. Apart from providing patches that would integrate BlueLink’s functionality into the existing OI apps, I would like to keep the link between me and the organization intact by making these apps issue-free.

Proposal Timeline

First Phase: May 23 – July 10

Week 1: Device Discovery and Recognition

(This part is almost implemented in the course of the discussions on the group. So I would build upon and improve any existing issues. This would also provide a good span to get ahead of the proposed timeline. )

Week 2: Pairing Devices

  1. Storing Paired Device data.
  2. Recognizing devices previously paired with.

Week 3: Synchronizing timer action of paired devices.

  1. Confirmation sending from paired device.
  2. Receiving confirmation and starting polling.
  3. Timer function to turn Bluetooth On/Off.

Week 4: Passive Polling Mechanism

  1. Configurable polling interval options to user
    a)
    Providing options to the user to choose polling interval.
    b)
    Testing power consumption with varying time intervals.
  2. Optimum polling interval as default.

Week 5: Settings Activity

  1. UI for the settings Activity
  2. Notification Mechanism Options menu

Week 6: Alert Mechanism

  1. An SMS with GPS coordinates
  2. Vibration/Audio Alerts.
  3. A phone call from either device.

Week 7:Documentation and Testing

  1. Documentation
  2. Testing and Fixing bugs

Mid-Term Evaluations

My deliverables at this stage will be;

  1. A complete UI for the application.
  2. Fully documented and (reasonably) bug free code for the application.
  3. An application capable of:
    • Discovering devices in the vicinity
    • Pairing with devices and storing data (MAC address etc) related to the device to recognize it in future.
    • Starting the polling process simultaneously on both devices on receipt of confirmations.
    • Polling the paired device at regular (configurable) intervals of time.
    • Giving user the options of choosing alert mechanisms in case of device theft.
    • Providing SMS, audio/vibration, phone call on the other device based notifications.

Second Phase: July 11 – August 15

Week 8: Sending Intents to OI File Manager and other applications

(This is another part of the application that I have started to implement during the discussion on the group. This is with reference to the patch for OI Safe that implements a broadcast receiver and listens for the intent ‘BLUE_LINK_BROKEN’.)

  1. Setting up Broadcast Receivers in existing OI apps.
  2. Sending intents from BlueLink.

Week 9: Deletion of Data from OI File Manager (on receiving BLUE_LINK_BROKEN intent)

  1. Implementing deletion of data (deletion of pictures). (This functionality will be implemented in the Broadcast Receiver of OI File manager)
  2. Deleting notes from Notepad application with [secure] word in the title.
  3. Patch for OI File Manager for the inclusion of the aspects mentioned in 1 and 2.

Week 10: Password Protection of data

Week 11: Device Lock down functionality

Week 12: Documentation and Testing (Wrapping up the project)

  1. Documentation
  2. Testing and fixing bugs

Final Evaluations

My deliverables at this stage will be;

  1. A fully functional application, implementing the desired functionality.
  2. Procedure to send intents to applications and suitable reactions to the intent BLUE_LINK_BROKEN.
  3. Patches for existing OI applications, integrating them with BlueLink.
  4. Fully documented code for the application.

(Week 1 and Week 8 are both buffer weeks to make up for any loss of time during the tenure of the project.

Route My To-Do

April 4, 2011 § 3 Comments

This is an android application that’s basically a location-based To-Do list manager which also makes a route from the locations of the tasks on the to-do list. It was my mini Project for the Software Development for portable Devices Course being conducted at BITS Pilani Goa Campus. Here are a couple of screen shots from the emulator!

The Splash Screen:

The layout for the activity that looks for a Location using Google Map API. It displays a Toast on finding the Address.

The application is meant to facilitate the instances when you are unavailable to perform the tasks on the to-do list then with appropriate routes and directing SMSs, another person ( for instance your driver ) could check these tasks off the list for you!

I am yet to finish the last aspect of the application which would implement sending of an SMS on the phone, directing the user towards the next location once the previous task is finished.

Towards Better Governance: GTap

April 4, 2011 § 1 Comment

 

A history of uninformed and careless exercise of voting power by the vast majority of our citizens has led to a shaky form of governance in the nation. Recent events of national and international importance highlight the blunders that could have been avoided if each citizen had been smarter in choosing his/her representative.

We have recognized an urgent need to improve the status quo. We want to engineer the relationship between the principal and the agent, the governed and the government official by a series of applications. We start from the very root of the issue: Choosing the right representative.

The application, GTap aims at enabling voters to make smarter decisions while choosing amongst candidates contesting for public offices. The application provides the voter with a variety of information including each candidate’s election agenda points, his past achievements (in the previous tenures of holding a post, if any), policies implemented, projects undertaken, descriptions from his blog, recommendations from other politicians, details from Facebook and Twitter accounts and more. Knowing the candidate s general image, his own statements on issues would  enable a voter to play smart.

To begin with, we intend to make use of this application for election on our University campus. The long-term plan includes finding a way to use it to the benefit of voters at a bigger level.

The application is under development. We have decided to develop it for Android devices as of now. All new developments including code snippets and resources would be posted here soon!