What's in the name anyway

I would rather keep this post short.

Recently heard that the new chief of Indian Intelligence Bureau (IB, as they call it) will happen to be a Muslim guy.

A quick Google search to learn more got me to this article on a daily called "The Siasat Daily" (Indian daily). Quite a neutral reporting, I don't know the source they took the text from (if they did) but quite neutral.

Then reads a comment:
If any muslim is offered higher position it means government wants to use his shoulder to target muslims. Take an example of Abu Kalam and supereme court judge taking decision of babri mosque. If he get position he has to do his job what a common muslim get from him. Most of them are puppits. If he raise voice for equal rights of muslims in india than we can feel better. Letus see what will he do. It is too early to congratulate him now. you are in test Asif sahab be fair and be strong. Follow the straight path like Omer Bin Kattab Razi allah hu ta'alan. if you need to scrifice your job for right thing you should do it. May Allah help you.
I may be irrelevant, but a few thoughts crossed my mind and irked me:

a) Why is it being made in a news if a 'Muslim' man is appointed as the chief?
b) Why some of us Muslims think they need a Godfather or a figure who can 'fight' for equal rights?
c) On different occasions, why it becomes a special news citing 'Muslim' as a keyword if something happens in the world?
d) Why Muslims rather don't take an example from people like the one the article talked about, and try to learn his way to achieve success?
e) Why do we Muslims, or other people in general, keep waiting for opportunities to be served to us in a plate, why don't we strive (do we)?

A few months ago, a Hijabi woman appearing in Egyptian national news as a news reader, made headlines as "First veiled woman appears on Egyptian news channel". First off, she wasn't veiled, her face was visible, face is visible in most of the Hijab forms; second, it was Egypts own news channel, probably isn't seen outside of the country,  they're completely free to appear whatever way they want to appear in a television, and if that whole nation doesn't have a problem with it, doesn't find anything to make a news about it, why anybody else should?
Why does it matter to the international world (particular to this scenario) if something happens related to Muslims living in a Muslim country?
Different countries have different cultures, and the people of those countries live with it. It shouldn't be something we should be reading in news.

I've lived a life so far, where I got equal opportunities as anyone else (or probably more) because I worked hard for it. My religion, my name hasn't mattered so far in an incident large enough to be remembered forever.

My reply to this gentleman, which is awaiting moderation at the article, hence goes like this:
Its only us who can help ourselves.Mr. Asif, studied, worked hard, and that's the only reason why he's there.Not because some other Muslim guy was on top raising voice for Muslim community.Stand up for your own self, study, work hard, strive to resolve differences, and the country gives equal opportunities to every single person regardless of cast, creed or religion.And yes, this comes from a Muslim himself who's seen equal opportunities in India as any other citizen.
As articulate as I could be.

Smart Again

(This post is in continuation of an older post titled On a smartness diet : Back to Basics which discussed about my experiment of moving from a smart phone towards a feature phone)

This rather took long but has been an experience. I had planned to use the feature phone for a week and write down my experience but for some reasons, I decided to stretch that period of a week to several weeks:

  • - The smartphone's (Sony Ericsson Xperia X10 Mini Pro) headset speaker failed and I couldn't hear anything from it.
  • - I had decided to buy an Android phone which is more developer friendly - Galaxy Nexus (till that time)
  • - Most importantly, I was having no problem using that Nokia 1202
Still, after a few more weeks, I realized the strengths and weaknesses of having a smartphone.

The main reasons why I left the smartphone were:

Technical Reasons:
a) The phone not being able to perform basic operations of telephony. Making one call after another was a real job and used to take almost 3 minutes. Miserably slow
b) The phone had become miserably slow
c) The battery performance was pretty bad.
d) It was still using Android 2.1, keeping me from trying and developing new apps, not good for a developer

Psychological Reasons:
a) The constant connect, the sync, emails landing on the phone as soon as they arrive, whatsapp, viber, twitter, facebook.. too much of involvement which is often not required.
As with emails, I would rarely be able to do something about them even if I read them on the phone, but they kept giving that feel of urgency alive all the time, adding to anxiety and stress.
Similarly, facebook notification, whasapp chats, all are something that can wait until I get to a computer, and don't require my immediate attention. These all bared me from living in the moment, focusing on what was happening around me right at the moment.

b) Google Maps : Although a perfect application for travelers, but I realized my natural way of path-finding was becoming weaker the more I used the maps and navigation. When I switched to a phone and had to find ways on my own, this realization occurred.

What I noticed:
Although I guess I would enjoy the disconnect, and I somehow did, but it wasn't a phenomenal change. I never felt that I was too addicted to the connection I talked about above and I should go back to the smartphone as soon as I can. No, it just didn't happen. What I did notice I was missing was quite surprising.

a) I missed the ToDo app that I used the most. THE MOST.
b) After that I missed the full qwerty keyboard.
c) Then I missed the non-volatile call-log memory of smarter phones
d) Then the (almost) unlimited memory for storing Text Messages

Then there were some limitation with that phone specifically (the poor quality microphone, used to catch too much noise; the poor headset speaker), because it was a very inexpensive phone (Nokia 1202)

What I learned:
I had quite some discussion with one of my dear friend over G+ about how he manages his emails and stuff, and am now following those tips plus some of my own when I have moved back to Galaxy Nexus.
a) Stop syncing emails, mark a time, and read your emails on the phone then.
b) Proactively check if you're falling into the always connected trap again. I keep the viber and whatsapp activity as low as possible now, restrict it to the particular times, adjust notification so that it doesn't remind me of stuff way too much
c) Stop using Maps. This phone has a better GPS and a better Map (because of the multi-touch, and a better screen), so I can get my location whenever I want it, quicker. So I start with finding my way without the maps, and if I have to use Maps I use them only when I am stuck, not always.

What I enjoyed:
a) The battery life is great. 3 days on a single recharge just feels awesome.
b) It was very light-weight, you almost forget its in your pocket.
c) It was pretty small and sleek too, very easy to handle.
d) And the speed, oh boy, everything used to happen at an instant, although there was not much I could do :P

It was good 60 days spent with the Nokia phone.
So far so good and it has surely helped in improving focus. More to go, more to see, but good lessons learned.

On a smartness diet : Back to Basics

Last weekend, I took a decision to switch back to an old, basic, non-smart phone from this Monday for a full week, just to see the differences. I have been using this Sony Ericsson Xperia X10 Mini Pro (long name, right? Yes, and confusing too!) for more than a year. This one:

Sony Ericsson Xperia X10 Mini Pro

There were a few reasons why I bought it:
  1. - The qwerty keyboard
  2. - The small size, fits in the pocket perfectly
  3. - Sony Ericsson's UI has been quite good consistently.
  4. - Speaker quality was very good
  5. - Camera quality was impressive
  6. - Touch was smooth
  7. - Easier to hold and operate
  8. - Last, I've been a Sony Ericsson user all my life :)

All these reasons are still pretty much here, except the fact that after the latest upgrade, it has become dead slow.
The cons of this phone were:
  • - Battery died in a year
  • - Battery was quite less powerful
  • - Internal memory too low
  • - And this small guy never got any update past Android 2.1

And when a phone isn't able to perform its basic tasks related to Telephony, I can't use it anymore. This little guy had become too slow to get things done. Apart from this, I wanted to disconnect myself a bit from the Internet a bit. Too much connection (emails, whatsapp, twitter) every time, kind of invaded my personal space and overfed me with information without which I was doing fine before.

This is the Monday, and according to the plan, I have changed my SIM card to the backup phone, a Nokia 1202:

Nokia 1202

I am surely going to miss one thing, Google Maps, but then too, I want to brush my natural path-finding skills a bit more, the way I used to do before.

During this week, I'll stick to the very basics of the telephony, and will minutely note the differences in how happy or sad I feel, in the end. And once I am done, I'll come back on the next Monday with the results here.

(Update: I am back to a smarpthone, a better one, Galaxy Nexus. The experience log is blogged with the name Smart Again)

Apple, Samsung and the lawsuit

I am an Android developer, and I love Android devices.
It's no secret that Samsung's making some really cool Android devices and that's why they're the biggest phone manufacturers in the world, and I am happy about that.

But then there's Apple and their lawsuit against Samsung, claiming that the latter has copied Apple device's appearances. They've also got solid proof for that now (here too).

Should I be angry at Apple for suing one of our favorite manufacturer? from a fanboy's point of view, perhaps yes, but since Apple has got some valid points, I don't think I should envy Apple at all.

I was just going through some devices at work and realized that not just the device's appearance, the accessories too seem to have a lot in common. I was going through the device's data-cables cum charger-cables, and the Samsung device in consideration is Galaxy Tab 10.1 16GB (GT-P7500) which is a nice device otherwise.

I took some pictures to support my point, here they are:

The front 'look' of the cable port, that goes into the device (left: Samsung, right:Apple)

The other end of the cable:
 Except the rounded corners, and a dent in the metallic area, it looks quite similar.

And the port's configuration:
A difference can be noticed in the placement of the pins actually, but everything else remains almost the same.

Okay, I get that there are some certain stuff that always looks the same for the sake of functionality, like the locking mechanism present in the side of the port, but there are others who are doing it differently.

I don't know if its intentional or a mistake or if its really a cable standard that everyone else follows/has to follow, but Apple's points do hold true to some extent if you pay attention to the details while looking at Samsung stuff from the perspective that they copied things from Apple.

Let me know in the comments what you guys think about it (I am not expecting a comment war here, though :D )

UPDATE: I was told about this good infographic about Samsung and Apple by Allison Morris, thought of sharing it here:
(original source: http://www.mbaonline.com/samsung/ Head over to the source to see it in full)

Android Facebook Integration

Okay, I found this a little (but only a little) tougher than integrating Twitter (with Twitter4J library) in your Android applications, but this is how it works:

  • Download the Facebook Android SDK from https://github.com/facebook
  • Extract the zip file.
  • Inside it, there is a folder called 'Facebook' . Its the SDK reference we'll be using.
  • Open up Eclipse and 'Create a new project from existing source' (I hope you know how to do it, if not, add a comment in the end), and select the Facebook SDK folder you just extracted, as the source.
  • Remember, this is just a reference project, thus you cant get an APK out of it.
  • Now create your new project.
  • Right click on your project>Properties>Android>Library
  • Select the above imported Facebook SDK as the library
  • Done, now look at the sample project I have here. It updates your facebook status after asking for login.
(sample project: https://github.com/Sheikh-Aman/Android_Samples/tree/master/3.%20FacebookExample-StatusUpdate)

There are some more IMPORTANT steps to take which are discussed here in detail. Do read them to understand what my project does. Though this sample project works, but that's because I followed all those steps.

Since its a very short and quick post, If you face any problem at any level, just ping me.

You need answers? sure, we need etiquette !

There's one thing about Open Source tradition that everyone should know and care about.
This is specifically for the people who are actively (or maybe not that often) ask questions on Q&A sites (like stackoverflow.com) and other development forums.

The person who answers you, is certainly knowing a particular thing better than you, in some cases knows MANY things better than you. This is the only reason he's able to answer you and perhaps get you out of your biggest problem of the day.

He's sharing his hard-earned knowledge with you, for free!
For which he could have earned serious amount of money if he was selling it. But the spirit of collaborative learning is what drives him.
That's how OpenSource things work.
Consider the case when there was nobody to help him, he dug out things himself, and now is ready to share.
For all this favour, he at least deserves a warm thanks, or at least attention when he's waiting for you to respond.

I have been active into Java and now Android for quite few years, and am seeing as Android is rapidly gaining success, many and many people are jumping into Android development, and obviously, are heading toward forums and Q&A sites for help.

But many of them have behaviours which hurt a lot.
You, as a person asking for help, must understand that you are being given knowledge that can help you gain competitive advantage over your peers in a certain area. Your problems are being solved, your project bottle necks are being resolved, all for free. So you at least can be nice to him, be attentive and respond frequently.

Please ask questions nicely. Provide as much information as you can, thank the person helping you.
If you're in chat, try to be friendly and have appropriate amount of gratitude. Please.

Android: Sign-in with Twitter


Many people use Twitter4J for coding Twitter clients for Android, but I couldn't find a single example of how to implement "Sign-in with twitter" in my Android applications, as Facebook Single Sign-on works.
So I coded my own.

I took references from sign-post methodology and Twitter4J itself, merged goods of both and finally had what I wanted.

Find the project here: https://github.com/Sheikh-Aman/Android_Samples/tree/master/1. Sign-inWithTwitterT4J

The code should be self explanatory, still if you need any help, revert.
my contact details can be found on: www.sheikhaman.com

Happy coding!

Update: I have been seeing many people not getting the idea of all the stuff being done in the code. So here's the simple step by step explanation of what's happening:

  • Make sure your twitter app is set as a Web application rather than a Desktop Client. For this you'll have to specify a callback URL at twitter's end. Don't worry, it won't bother us much.
  • You have the consumerKey and consumerSecret from twitter, you use twitter4j and create an auth URL with helpt of its methods. you specify a callback URL at this level.
  • Then you invoke an intent that opens this URL in device's browser and takes the user to twitter for logging in.
  • Once the user logs in, Twitter asks him/her to allow/deny your app, the access to your twitter profile.
  • Once the user allows/denies permissions to your app, the browser redirects to the callback URL, which you had provided in the second step, and if you're going by my code, that callback URL calls your activity back.
  • When you're activity gains the focus again, you separate the token and secret from it.
  • You then create an AccessToken with those token and secret, and use this AccessToken for interaction with twitter.
  • You can (you should) also save the token and secret and use it to create AccessToken for future interactions with twitter.
  • If the user wants to logout, simply delete the token and secret from your app. Since twitter4j works in complete stateless manner, you don't have to do anything more.
  • Once logged in, you'll have access to user's twitter account untill one of the two things happen: 1) The user logs out, or 2) The user revokes access to your app from twitter.
I hope this was explanatory.
Again, In case of questions, revert.