android

android app cannot connect to twitter

My android application uses jtwitter and doesn't see api.twitter.com host Twitter twitter = new Twitter("user", "pass"); System.out.println(twitter.getStatus("somebody")); twitter.setStatus("my stat"); But java desktop application works pretty good. What is the problem can be with android? I added even uses-permission INTE...

Is it possible to develop for Android on Android?

Lately I've been doing a lot of web development on my Droid via ssh using the ConnectBot app and a few other apps for reference. I've also been doing a lot of Android development back home in eclipse, and I wondered: would it be possible to develop and test my android projects right on my phone? All I can do at the moment is either wri...

How to select random values from a given range.

I'm trying to create an android application which will generate random series of values (integer numbers in this case) in a given range (but NOT equal between them) and display them in a simple TextView Let's say we have the range R = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] Each time I press the button "Generate" I want to randomly...

Launching service from class without a Context

I'm trying to figure out how to launch a Service from a singleton class I've created. According to the Android documentation, startService is a method of Context. So, in the method call I am making to the singleton class, I figured I would pass on the application Context as a parameter. Easy enough. However, when I try to use that co...

How to create column-like layout for ListView rows?

I have a relative layout which looks like this: Here is the code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/nameText" android:lay...

How to implement a search like the google maps address search?

I would like to create a search in my app which acts like the map search in the Google Maps app. I have creates an an auto complete text view which updates dynamically based on the results of the Geocoder.GetLocationByName() Method. However the results retrieved from this function are really bad and not at all consistent with the text I ...

Encrypt plain text password for GAE <> Android communication

I have an application for Android which communicates with a Google App Engine (GAE) back-end. For authentication I have a user name and password, however I don't wanna store the plain text password on the client and transfer it in plain text on an insecure channel. So I was thinking of hashing the password when the users enters it the f...

Need help with a simple concept in Android

I am a complete newb and know nothing. I'm probably very inefficient at what I have already, but that's the learning curve. I'm making an Android app, using Eclipse to do it. The app will have 3 screens. On the first two screen is a list of buttons. The user taps on the buttons that apply to the situation and then that button disappea...

Custom CursorAdapter problem

Hello, i have a custom CursorAdapter that populates a list view from a database. my problem is that the list view never shows the last entry i made in the database. it always shows the one before the last and for some reason when i scroll down the list, the first entry i made to the database, is always the last entry too. i don't know if...

Android Intent Filters : How do you use Intent.CATEGORY_BROWSABLE correctly?

I have an intent filter to intercept urls from the browser on my domain. This will give the user the the choice of using the native application or the browser. I have setup the following intent filter as so. <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.catego...

android location listener question

Hello all,I am developing an location aware application that needs to know the users location. The problem is that the application doesn't seem to work properly. By properly I mean that every time I have to first open an application (like cardio trainer) in order to get a GPS signal and then run my program, otherwise the GPS icon on the...

Android Parameter Passing Method

Which parameter passing method is used in Android? Pass by reference or Pass by Value? Please provide an Android Specific example for the same. ...

New Line character \n not displaying properly in textView Android

I know that if you do something like myTextView.setText("This is on first line \n This is on second line"); Then it will display properly like this: This is on first line This is on second line When I store that string in a database and then set it to the view it displays as such: This is on first line \n This is on second...

How to send logcat via email?

Is there any library out there that allows me to receive logs from the app via email? ...

GUI Renderer in Android

Hi, just curious to know android Graphical components (View) have their own specific renderer or they are using something like AWT, Swing or...? ...

Android and paypal API integration

All right all you android guys, I'm trying to integrate the Paypal API to make my app donations based. 2 questions: I can see the button, I click it, and it doesn't do anything! (the activity for checkoutIntent doesn't fire?) What are your experiences with donation based android apps? I want to make about $250 a month of this thing, i...

Android Development Missing "drawable" folder (NetBeans IDE)

Hello, I recently switched to Ubuntu and decided to use NetBeans for Java development instead of Eclipse which I used on Windows. The problem is, in the Eclipse I used on Windows, I had a folder named "drawable-hdpi" with the standard app icon in and a few other folders like "drawable-mdpi" (I think). But with NetBeans, there doesn't ...

How to close BluetoothServerSocket while it waiting for connection?

How to force BluetoothServerSocket to stop waiting for incoming connection started with accept()? When i'm calling stop() all i get is "ERROR/BluetoothSppPort(2211): invalid port state for disconnection" in LogCat. I need to stop controlling thread but it can't be destroyed while serversocket waiting for connection. I know about accep...

DatePicker default value

I would like to change the default value of DatePicker programatically, but it seems there is no DatePicker.setMonth\Year\DayOfMonth function or something similar... Any ideas? ...

How do I manage cookies with HttpClient in Android and/or Java?

I am trying to login to a site and maintain that session/cookie so that the server will recognize my login, but I am struggling to figure out a way of extracting the cookie from the response and setting into a request to maintain my login. I'm wondering if I should go about taking the header "Set-Cookie" or using a CookieStore. Any help ...