Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Monday, September 8, 2014

Android L presentation

I had shown a little presentation about Android L at N-iX few days ago.
It is available on google drive.
If you like it (or don't like it) you can let me know below in comments :)

Thursday, December 19, 2013

Silence caused by Agenda

As you probably noticed there in no activity on this blog for a long time. 
That's because I've spent almost all my free time working on a little startup - All-in-One Agenda. This is a handy widget for Android devices which displays your agenda (currently events and birthdays) on the home screen. Obviously it has additional paid features which fund further development.
Working on this startup is a great adventure and results in a lot of new experience.
I plan to blog about some interesting things I've learn.

Wednesday, March 6, 2013

Google steals photos from your Android phone

Yesterday Google invaded my privacy. The search giant added new spayware function - Instant Upload - to their social network Google+. They enabled that spyware by default. And Instant Upload silently uploaded photos from my android phone to Google+ without asking my permission!!! Google had stolen my photos!!! I realized that something evil is going on due to small notification on my phone (which many people probably will ignore or dismiss without reading).
All uploaded photos become private and not shared to general public. But still Google took them from me and can now share with their big corporate friends or US government which is unacceptable!
Obviously I deleted all those photos from Google+ and turned Instant Upload off immediately. But how can I be sure that Google did not left the copies on their servers?
What if the photos Google had stolen were intimate?
I hope that EU commission will investigate this issue and fine Google appropriately.

P.S. To turn off Instant Upload launch your "Goggle Settings" app (not "Settings"!), go to "Google+" there and uncheck "Instant Upload".

Thursday, July 21, 2011

Updating versionCode and versionNumber in Android manifest via Gradle

I'm working on Android project which has multiple builds for different customers.
Each build is organized as separate project and is build via Ant script. The problem is that building all those builds and updating versionCode and versionNumber is all manifest files takes a lot of time. So, I decided to use some tool to this for me. Yes, I'm a bit lazy :)
I've chosen Gradle. It leverages the power of Groovy and is able to call Ant scripts.
Groovy has great tools to work with XML, like XmlSlurper. So, updating versionCode and versionNumber in Android manifest files seemed easy. Unfortunately after significant amount of time all I got was ugly formatted Android manifest with tag0 namespaces :(
Then I put XmlSlurper aside and used String.replaceAll(Pattern pattern, String replacement) method. It took me about 5 minutes to do all replacements :)

Wednesday, May 19, 2010

Android's sharedUserId

Android is a wonderful platform for development. It also provides good security framework. Each application has its own user ID and thus application A can't directly access the data of application B. So, Android is quite resistant to viruses plague. In contrast to Windows.
But this security makes it difficult to develop a set of applications which should work tightly with one another, e.g. browser and its plugins, translator and its dictionaries, etc.
To address this problem Android provides the developer with sharedUrerId attribute in manifest. Setting the same sharedUserId to multiple application and signing them with same signature will enable them to access one another's data. Great!
But... but there are two nasty bugs related to sharedUserId which you must take into account.
  1. Issue #3763 messes up if you decide to change the sharedUserId value.
  2. Issue #1227 bites you if you add sharedUserId to your application.
In both cases after upgrade to the new version your application won't be able to access its own data (probably, because its user ID was changed, but chown was not called on its data). You'll see some strange errors in console. Like database can't be opened.
So, if you are developing some application for Android and if there is even a slightest chance that the application might need to use sharedUserId attribute - use it right from the start. Before uploading the application to the Market. And don't change sharedUserId value in the future.

Update. Issue #1227 just celebrated it's 5-th birthday. And people are sill affected by the problem. Looks like Android is getting closer to Java when it comes to anniversaries of important issues.

Saturday, March 20, 2010

Presentation and demo app from my talk about Android

I had a talk on local Java User Group a week ago. I was talking about Android. Here I'm providing the presentation and demo application. 
Presentation mainly contains materials from developer.android.com.
Demo application is a twitter client. It shows:
  • how the project is layed out;
  • what contains the manifest file;
  • how activity is build;
  • how layouting is done (including reusable layouts with <include> tag);
  • how locales are handled (contains Spanish translation);
  • how orientation is handled;
  • how background threads are handled.

Links:
Presentation: Android.odt (yes, that's OpenOffice format).
Demo application: Twitoid.7z (IntelliJ IDEA project, free Community Edition is perfectly fine to check this code).

Twitter4j is used for communication with twitter. Icons are taken from medialoot.com.