android

how to manage activities in android

hi friends i identified problem in changing one activity using tab, in on tab activity i am adding data to sqlite in other tab activity i am displaying them using listview(array adapter) but when i come back to add data and after adding new item to sqlite the newly added records are not updated in listview plz forward u r valuable sug...

Android on HTC Legend - Tethering Possible?

If versions of Android prior to the yet-to-be-released Froyo can't support tethering, why does HTC's Europe page say that it is actually possible? "Using your phone as a modem (tethering)": http://www.htc.com/europe/howto.aspx?id=134&type=1&p_id=313 I'm confused. Please educate me about the same. ...

Adding Overlays on Map.

Respected All, I add pins/markers(Overlays) on map to particular location and for each overlay I add onTap event which display pop up information on head of overlay, for that use table layout in which i use some pop image on which i display that location name and image button. following are some problems that i am facing. ...

Get UserId and password in android application?

Hello all.I configure email in Android2.1 emulator(Default email Configuration).Is there any possibility to get the userid and password of that email account in my application? ...

how to refresh a list view when the activity still in active mode

hi, I have a ListView that contains some data from sqllite table. the table is updated by some other process, and I would like to refresh it's data. I tried invalidate, tried doing setAdapter() again and again, nothing helped. it does not reload. Should I close the adapter somehow and re-open it? The strange thing is that if I open ano...

code for video recording on android

Hi, im new on android development. I had a requirement of recording video on an android device.. when i searched for it, i didn't find any proper code that is working. even android developers doesn't provide clear code.. Please, if anyone has links or code.. share with me.. Thank you.. ...

Android G1 ServerSocket I/O Errors on Creation

Hey all, So, I've been trying to learn a bit about programming for Android. I've got past "Hello, World!" and I've got GPS stuff to work. I'm trying to have the device sit on a port and pipe GPS data over the port ( Eventually NEMA std, and have that talk with Marble for long drives ) It throws the I/O Error and Toast-s me "Ohh fuuuuu...

Location of SQLite Database when application is executed on real device

I have trouble with finding my SQLite Database. As we can access the SQLite databases on a running emulator like below: adb -s emulator-5554 shell sqlite3 /data/data/package_name/databases/database_name But what if I am testing my application on real device(HTC Here-Android) ? where does i find my database? ...

Check file is available or not in android?

I use the below code to create a file in my application.I need to check is the file is exist or not from my code ? Help me FileOutputStream fOut = null; OutputStreamWriter osw = null; String data="My file Test "; try{ fOut = openFileOutput("settings.dat",MODE_PRIVATE); osw = new OutputStreamWr...

Android: call custom methods in a ContentProvider

I have a custom ContentProvider I use to store fixes obtained from the GPS into a SQLite database. This class overrides ContentProvider methods (delete, insert, query...), but notice I have also included a method to query the last fix. public class FixesContentProvider extends ContentProvider { @Override public int delete(...) ...

How do I play an automated call to a number in android?

The text to speech API in android is awesome.. Is there any way in which I can play this text to speech content to a call instead of the speaker? As in I call a number automatically and then play text to speech to the callee.. PS: This is not another opening to phone spam if you are wondering.. Working on an automated distress call syst...

Eclipse Android and gitignore

What files/folders can I safely ignore for inclusion with git? I copied a good project, removed its gen and bin folders and tried to run the app. The Android Launch window says, "Your project contains error(s), please fix them before running your application. There is a red X on the icon to the left of the project in the Package Explore...

onStop() not getting called when I press the back button

Is this normal. The docs say "The onStart() and onStop() methods can be called multiple times, as the activity alternates between being visible and hidden to the user" When I press the back button an it will go back to the previous activity which totally covers the old one. What is going on here? ...

How can i draw a rectangle in android and put some text inside it and then place it?

hi i have an activity and in the activity i have some buttons and textviews, and i would like to draw a rectangle with text inside. i saw some examples online but the all say to create my on view , override onDraw and the set this view as my layout, but i have my layout already. public void onCreate(Bundle savedInstanceState) { su...

Android: Activity establish network connection

I have an Activity which looks up data from the web in its onCreate method. The Activity is activated by the user hitting a notification. So it is a common problem that the user will quickly turn on their phone, unlock it, slide open notifications, tap the notification, and the Activity will activate before the phone is done connecting t...

out of memory error dealing with large bitmaps and the android activity life cycle

I have a scrollable map app which for now has a huge bitmap. It loads fine on startup, but when it looses foreground status and the user brings it backs again im getting an out of memory error. In onPause it trashes the bitmap using recycle, and marks it as null. The onResume checks to see if map==null and will load the bitmap back again...

How do I prevent TextView from stretching out it's parent LinearLayout?

It seems that a TextView inside a LinearLayout forces that LinearLayout to be larger. I am trying split my screen top 50% and bottom 50% and also the bottom 50% is split into 3 parts. So I did my weights 3 (for the top), and then 1, 1, 1 (for the bottom) for a total of 6. Here is what it looks like. http://i.imgur.com/3FJSW.jpg As so...

get file location in android?

Hi to all.I use the following code to check file availability File f1=new File("/data/data/com.myfiledemo/files/settings.dat"); if(f1.exists()) textview.setText("File Exist"); If i use the following code it's not responding File f1=new File("settings.dat"); if(f1.exists()) tv.setText("File Exist"); Here com.my...

Android - Please Just Give Me a Decent, Working Animation Frame Code

I've been working on frame animation for a week now, and every code I've used has a tremendous amount of errors and plainly just doesn't work. Can you please give me a code that has worked for you? Please include the exact java code you used, the main.xml code, the mainanim.xml, the android:id's, even the images in the res/drawable-hdpi,...

Are there any huge differences between objective-c and Java, or iPhone and Android?

Edit: My bad, I meant objective-c, not c#. Some reason I got it into my head it was c# the iphone used. So the answers for c# were great, thanks, but theyre a bit irrelevant, sorry about that. I've had a look but can't find anything that answers this, though a few have shortened the question by answering parts of it. Between a small gro...