android

Are there any good ORMs (preferably JPA implementations) that support SQLite (on Android)?

I found a post from a while ago that addresses a similar question but I think it's a bit outdated. I realize implementations of JPA tend to be more on the heavy/dense side, so if you know of any lightweight (non-JPA) ORMs I'll most certainly appreciate your input. I did see the answer about ActiveAndroid in the other post and am curious ...

Tunning up Activity with dialog theme

I need to launch a Dialog from home screen widget, so I created an Activity with android:theme="@android:style/Theme.Dialog" The problem is, that I would like make it look like standard dialog window ( buttons on the gray background, font and text size, paddings etc), like here: This is how my "dialog" Activity looks like: Is ther...

How insert the contact info on the existing contact in Android 1.6?

Hi folks, I have name, phone number and E-mail infomation of a contact. I just want to insert the additional email and phone for the existing contact. My questions are How to find the contact is already existing or not? How to insert the values on the additional or secondary address option? Thanks in Advance. ...

Android-iPhone single codebase cross development

Is there a way, apart from using HTML and JavaScript on a web control, to have an (almost) single codebase for an application that should run on iOS and Android? The big issue is of course that they use a different language (Java for Android, Objective-C for iOS) for application development. It would be nice to have some sort of meta-la...

Further explanation about IntentService

Hi all, I was trying to get the purpose of the IntentService, and when should I use it? I tried to understand from the API, but not enough details on that one. Is there any analogy between this and running long-task on a working thread? Any further explanation and samples on why I would use IntentService would be very welcome. Thank...

Android - Over 3g which ports to use and is TCP best connection method?

As a communications method is TCP best way to get lots of data through to multiple android devices from another android device over 3g? Also are there recommended ports to use for 3g data transfer? I want to rule out using a web service intermediary as I want this app to be decentralised if possible. Cheers, James ...

How to set up dynamically Part in MultipartRequestEntity

Hello, I'm using commons-httpclient-3.1 inside my android application. And I would like to know if it possible to manipulate Part (org.apache.commons.httpclient.methods.multipart.Part) dynamically? Essentially adding new FilePart and new StringPart at runtime before sending the request. Every example I've found until now suppose that y...

How can i use RotateAnimation to rotate a circle?

I want my circle image (ImageView) to rotate as the user touch and drag it. If the user drags it to the right, it should spin right and vice versa. Like when you spin a DJ disc, if you know what i mean. I've played around a bit with OnTouchListener and RotateAnimation but i'm getting nowhere. Any ideas? ...

ListView and Buttons inside ListView

I want to display a button inside the listview. The goal should be to click on the listview line or on the button. Click on the line it shows more info. Click on the button it shows at the bottom more buttons. The same as the GMAIL app. On the right there is a checkbox and after clicking on the checkbox at the bottom the button bar ap...

Access message inbox without Content UrI (content//:sms)

Hi, I want to access the messages stored in inbox through my android project. I have tried the method of forming URI for sms (content://sms/ inbox) and then quering it for various parametres. But I cannot find any documentation for reading inbox sms in the standard Android Developr Docs. It was mentioned at various websites that this c...

NullPointerException on Activity Testing Tutorial

Hello, I am currently trying the activity testing tutorial (Found here), and have a problem. It seems that whenever I try to call something inside the UIThread, I get a java.lang.NullPointerException. public void testSpinnerUI() { mActivity.runOnUiThread( new Runnable() { public void run() { mSpinner.request...

Can I use a drawable as a shadowColor in a TextView?

I have a TextView and I want to give it a glowing effect using an image from the res/drawable folder. How can I do this? ...

Android: Associating Browser to File Type in App

I'm attempting to write a simple app that associates a file type to the browser; this is assuming the browser will open the file locally... If this doesn't work, the local file - editor will be fine. I have an option of auto-mailing .ELC files from a custom app, they are basically html formatted TEXT or TXT only files; I would like to a...

How to use intent between tabs in java/Android?

I would need to know how to handle the intent between tabs. For example, I have a tab activity with two tabs. First on content is a text view. another one is a map view. When i click that text view it redirects to the tab2. it can be easily achieved by setCurrentTab(1) or setCurrentTabByTag("tab2") methods. But i want to pass lat and lo...

HTTP Post requests using HttpClient take 2 seconds, why?

Update: Found the answer myself, see below :-) Hi, I'am currently coding an android app that submits stuff in the background using HTTP Post and AsyncTask. I use the org.apache.http.client Package for this. I based my code on this example. Basically, my code looks like this: public void postData() { // Create a new HttpClient ...

Web service recieves null parameters from application using ksoap method

I've seen topics discussing this but no one has seemed to post a solution. At the moment, I'm testing passing parameters to my .Net web service. When the parameters reach the web service it adds it with an additional string then returns it too my application; but all I'm returning is the string message, not the parameter I passed. Is the...

How to use openSSL Library in the ANDROID application

Hi i am trying to openssl library in my Android application using Android NDK but i don't know how to use exactly that library and so please any one can tell me how to use that please send a source code for my reference....... ...

How to adjust line height in TextView with multiple type sizes?

I have a TextView that holds a Spannable string. The string contains a bunch of text, the first word of which is double the typesize as the rest of the string. The problem is that the line spacing between the first and second line is much larger than the line spacing between subsequent lines due to the increased size of the first word....

Android hide soft keyboard from compound drawable

Hi, I have an EditText with a compound drawable at right. I want to hide the soft keyboard when i press the drawable and clear the text. For that, i have the following code: filterText.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { if (filterText.getCompo...

Android - Where to store generated bitmaps?

I've got an app which dynamically generates anywhere from 6 to 100 small bitmaps for the user to move around the screen in a given session. I currently generate them in onCreate and store them to the sd card, so that after an orientation change I can grab them out of external storage and display them again. However, this takes time (th...