android

How to use SharedPreferences in Android to store, fetch and edit values

I want to store a time value and need to retrieve and edit it. Can somebody guide me here with a sample code/project please? Thankyou ...

Control onclicklistener in autolink enabled textview

I am using a TextView for which I have set autolink="web" property in XML file. I have also implemented the onClickListener for this TextView. The problem is, when the text in TextView contains a hyperlink, and if I touch that link, the link opens in browser but simultaneously the onClickListener triggers too. I don't want that. What I...

support iphone,ipad,android

Hi folks. develop android apps that should support iphone,ipad,android.is there any way for developing this kind of generic app or we need to develop aps depending on mobile os ...

jump on specific location in binary file.

I have a binary file which contains image.i have to jump on different locations in file to read the image file. So far i am using mark and reset methods but these are not helping me as i want. please somebody help me about that i,ll be really thankful.and i am using Input Stream to read the file. ...

Custom SoftKeyBoard in Android?

Hi Folks, Does SoftKeyBoard support the Indian Languages(Hindi,Tamil,Telugu,etc) in Android? The packages Locale and UnicodeBlock are used for the Fonts. But how to integrate the Custom IME in it? the sample in the developer site is not enough. can you share some idea or tutorials? Any Guesses. Thanks in Advance. ...

TwitterException with xAuth while posting from Android using Twitter4j

I am using twitter4j-2.1.3.jar to make a simple post to twitter. The code I use is: System.setProperty("twitter4j.oauth.consumerKey", TWITTER_CONSUMER_KEY); System.setProperty("twitter4j.oauth.consumerSecret",TWITTER_SECRET_KEY); Twitter twitter = new TwitterFactory().getInstance(username,password); AccessToken accessToken = twitter.ge...

Examples of android applications that use direct database access instead of content providers?

Just found out that I don't need content providers if I don't need to share data with other applications. But since the examples I've seen all use content providers, I'm not sure how to proceed without them and populate activities with data derived from accessing my application's database directly. ...

gson to POJO object, not working properly

I am developing an Android application and I access a RESTfull web service that returns a JSON. This JSON I want to put it in POJOs but I think I am missing something as it doesn't work. The JSON retuned is as follow: [{"CategoryName":"Food","Id":1},{"CategoryName":"Car","Id":2},{"CategoryName":"House","Id":3},{"CategoryName":"Work","I...

Beep Sound when editext Character limt exceeds in android

Hi, I'm begginer in android, How to play beep sound when charecter limit exceeds in edittext, i have tried by Setting addTextChangeListener but it wont get event after limit exceed so cant play sound and onKeylistener is only works on physicle keys so please give me any hints to solve the problem. This is my code private EditText edit...

How to start a coloring book

Hi.. I'm new in android development. I wonder how can I start to develop a coloring book? I have done a lot of research, but can't get through how to color a bitmap picture. Example: Select orange color and touch on the face to color it. Hope all the expert can help me. Thanks a lot... ...

Designing in XML or Coding UI.Which is better?

Hi I have a small doubt Which is the best way to design UI for Android Coding or Desinging in XML? Which is better in performance? ...

How to detect a tab click

I want to discover an ongoing tab change in Tab view. OnTabChangeListener doesn't work, because I want to discover the change before, not after. Any suggestions? ...

Accessing contact events in Android

I've been trying to access and modify the events data for contacts, with no success. Getting any other data is easy, modifying it is fairly easy, but for the events table seems impossible, it just can't seem to find the data. Here's the code, is there some mistake with it? String genericWhere=ContactsContract.Data.CONTACT_ID + " = ? AN...

Parse HTML in Android

I am attempting to parse HTML for specific data but am having issues with return characters, at least I think that's what the problem is. I am using a simple substring method to take apart the HTML as I know beforehand what I am looking for. Here is my parse method: public static void parse(String response, String[] hashItem, String[][...

Android: 'Splash screen' only once

Hi all, I have a Android application that requires a splash screen. I have a simple activity which shows the splash screen and after a number of seconds, it starts the 'main' activity. Now, when a user presses the back button from that activity, the splash screen shows again. How can I prevent this? I tried keeping a boolean shownSplash...

Android: Passing AppWidgetId to a Service

Hi there I got a Widget on my HomeScreen on which i add an click to a Button. I pass the widget id from the Widget to a Service, but when im reading the WidgetId at the Service it's always 3. Widget: @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { for (int appWidgetId : ap...

Instant Messaging server on Android behind NAT-router

Hi. I am making an IM application for Android. The application consists of a server and client, both residing on the android. At startup, the applications register with a webserver. If a client wants to send an IM to a server behind a NAT router, how this be done? I heard of stun4j and jstun but found nowhere an example of their usage in...

Remove bottom padding on widgets

As you can see in the link below there is an extra padding (around 2mm) below the EditText field. I can't seem to remove this padding in anyway. This occurs with other widgets as well (like Buttons). It looks like Android is default adding this extra padding to all elements. http://img266.imageshack.us/img266/4000/bottompadding.png ...

android how to save an object to file ?

Does someone know how to save and restore an object to a file on android ? ...

What is the best way to handling XML in Android

Android device is much slower and have much lower memory compare to PC/server, So what is the best way to handling XML in Android? And I have a set of very complex xml needed to parse. both SAX or DOM will cause too much code. Anybody have good suggestion? I want to make it clean and fast ...