Showing posts with label android. Show all posts
Showing posts with label android. Show all posts

Friday, May 31, 2019

Google Maps current location is weird after moving office

See where my "Work" place is showing. And see where my phone's current location is showing.


Our office has moved this week. I am sitting at my desk in our new office location now. But Google Maps in my phone shows that my current location is still at my old office location.

However, when I restart my phone with WiFi turned off and with only 3G data enabled, then Google Maps shows my current location correctly in the new location.

Thursday, August 25, 2011

Calling Android Resources Dynamically by passing String names

Suppose you have 3 types of resources (String, Drawable and Raw) for 50 kinds of animals like the following:

And suppose you want just 3 resources (String, Drawable and Raw) to be loaded for the ONE specific animal which the user will choose ONE at a time - that's gonna be like 50 if-else conditional statements with 3 resource definitions each = 150 lines of code.

With the following example, you can reduce it down to just about 36 lines of code to do exactly that.

Sunday, February 27, 2011

how to get width and height dimensions of a customView (extends View) in Android

So what I was trying to do is get the following dimensions of ONE out of the TWO framelayouts that I had put on my android application.





As obvious as it is, I went to the Android Developer's website to look up the available methods for finding width and height. And it said android.view.View.getWidth() and android.view.View.getHeight() will do just the thing. But..... it did NOT do the thing that way.


I had been looking around all over the forums and sites to find the solution.... LOTs of people are asking this questions, but i couldn't find that absolute solution from any of the forums. So, once I figured out the way, I thought of putting the solution up on my blog.



Tuesday, September 28, 2010

Preferred IDEs for various programming languages

so............ over the last one month i had been trying out several IDEs (Integrated Development Environments) for different kinds of programming.... and here is what i figure out to be the best IDEs for the various programming languages. My judgement is based on:
  • quickness of code-completion suggestions, 
  • quick search through Docs, 
  • ease of program execution and deployment
  • ease of handling GUI (graphical user interface)
  • ease of installation of plugins or add-ons
Programming LanguagePreferred IDE
        Java        PHP
Net Beans
Android
Eclipse
Adobe AIR
Aptana

Disclaimer: All logos and icons used in this blog post are registered contents of the respective projects and/or organizations



Friday, May 21, 2010

Android Development using Eclipse on Linux

0. pre-requisites for Android development on linux

i am using the following platforms and environments. i shall guide you through the setup process of Android ADT Plugin for Eclipse

i have used
-----------------
OS: Linux Ubuntu 9.10 karmic koala
Java: Java 6 JDK
SDK: Android SDK r05 from the site developer.android.com
IDE: Eclipse 3.5 galileo
ADT: AndroidDevelopmentToolkit plugin for developing android apps on eclipse - ADT 0.9.6



1. setup JAVA and Eclipse on your linux machine

for android development, you need to have the JAVA Development Kit installed on your machine.
to setup JAVA on your linux machine for android development-
1. go to terminal
2. command "sudo apt-get install sun-java6-bin";
3. command "sudo apt-get install sun-java6-jdk";
4. follow instructions and your JAVA environment for Android Development will be created
If you are on a x86_64 system, you must also install ia32-libs by the command:

"sudo apt-get install ia32-libs"

Eclipse is the most recommended IDE for android development. all resources and tutorials of Android in developer.android.com refer to the usage of Eclipse IDE. Nonetheless, developers can choose to use a different IDE out of their own comfort.