android

Android Network Programming: IOExceptions and StackOverflowError

Hi Everybody, In my Android app, I try to connect to a port on a local server to get some packets. I've encased to code in some try & catch's but with the following code: address = "192.168.175.82"; public void run() { try { smtpSocket = new Socket(address, 60001); os = new DataOutputStream(smtpSocket.getOutputStream());...

Android TabHost

Hi All, I want to make an Tab Activity. which consists of 3 tabs. but when i create an project with Android 2.2 and API 8 then in Main.XML its showing an null pointer exception. but when i change it to API 4 or 5 den it is showing the layout of tabs. and one more thing i want to clarify is when we create an project we need to specify B...

How to clear old tabs and add new tab on tabhost

Hello All, I have to create tab bar in my application in which i have to navigate between activities under single tag. So that i tried many ways one of which is to clear all tabs from tabhost and create new tabs and add on tabhost but it gives me unexpectedly close error. can you help me... ...

Bing maps on android

I need to use Bing map API on android .As i am not able to get any proper tutorial , Has any body tried it . ...

Change this tutorial to access images from the sd card?

Hey Guys, How would I edit this tutorial so that it will grab images from the SD card? http://developer.android.com/guide/tutorials/views/hello-gallery.html private Integer[] mImageIds = { R.drawable.lol.marker, R.drawable.sample_2, R.drawable.sample_3, R.drawable.sample_4, R.drawable....

Do Android devices scan *actively* for WiFi networks?

hi there! i am programming for google android and i wonder if the scans for wireless 802.11 networks are done passively or actively? i mean: does the device actually emit a beacon request signal on WifiManager.startScan() or does it just listen for beacons sent periodically by the access points? ...

Android MediaPlayer issue

Hi there I have followed the steps to create my media player object but I cant understand why it is not playing the music track. I used the following code: mp = new MediaPlayer(); mp.create(this, R.raw.testmed); mp.setVolume(100, 100); mp.start(); but no sound is playing through the emulator, and furthermore when i che...

KitchenSink not launching

Hi, Please I'm new to Titanium and just installed Titanium and i followed all the steps involved in importing KitchenSink. But when I try and launch the project, nothing happens. The trace shows this error. I'm kinda helpless with this, pls can someone help? I'm running Windows 7 64-bit, Android 1.6, KitchenSink 1.4, Titanium 1.2.1. I h...

KSOAP 2 Android with HTTPS

I am using KSOAP2 to manage SOAP in Android but it use https for the SOAP url and I am getting this error: javax.net.ssl.SSLException: Not trusted server certificate A normal error because the certificate is untrusted, but anyone knows how to workaround with this error? I can not manage the certificate because is from a other company and...

getting exception when inserting events in android calendar.

i am inserting events in my android calendar. the code is following: ContentValues event = new ContentValues(); event.put("calendar_id", calId); event.put("title", "Event Title"); event.put("description", "Event Desc"); event.put("eventLocation", "Event Location"); event.put("allDay", 1); event.put("eventStatus",...

Fetching an image from Server

Here is my code to fetch an image from a server location into a web service folder "web content". // imports removed public class WebService { public int writeToFileImage(int a) throws IOException{ File file =new File("sdcard/myImage.jpg"); file.createNewFile(); URL u = new URL("http://172.29.26.40:8080/E...

getting exception when inserting events in android calendar.

i am inserting events in my android calendar. the code is following: ContentValues event = new ContentValues(); event.put("calendar_id", calId); event.put("title", "Event Title"); event.put("description", "Event Desc"); event.put("eventLocation", "Event Location"); event.put("allDay", 1); event.put("eventStatus",...

Get Country code

Hi! I can get Country code ISO using TelephonyManager function getNetworkCountryIso(), this functions returns country code US for USA, but how can i get numeric country code? I am unable to find any function for it that give me country code in number for example function that will return 92 for Pakistan. ...

Maximum line limits for Textview in android ?

Maximum line limits for Textview in android ? android:maxLines="?" ...

Android library projects custom builds

Hello all, I have a legacy application and need to split it into a library project (common code) and two application projects (paid and free applications). I don't use Eclipse for development, and also don't use Ant builds provided (generated) by Android SDK (there are several reasons for that: different project directory structure, uni...

Reason for getting null value for name field in table

here the code for parsing url.. new Thread(new Runnable() { public void run() { try{ Log.v("Start","Thread"); DBF=DocumentBuilderFactory.newInstance(); DB=DBF.newDocumentBuilder(); URL url_val=new URL("http...

Save android.app.Application state

Hello everyone! I've encountered a problem wile using my own subclass of android.app.Application. I have numerous activities in my application and I'm running a custom ROM which consumes quite a lot of memory. What happens is when I launch a third party activity (Camera) my Application is killed. My Application subclass stores vital dat...

Rotating a bitmap using matrix.

While rotating a bitmap using matrix, vertex is not stable.. Matrix matrix = new Matrix(); matrix.postRotate(mDegree,100,100); mCompasstemp = Bitmap.createBitmap(mCompPic, 0, 0, mCompPic.getWidth(), mCompPic.getHeight(), matrix, true); mCompassHud.setImageBitmap(mCompasstemp); Output of my code is like -bitmap will r...

Android native code profiling..

I am trying to profile native android code, but I am getting the following error.I am running the code on a linux machine. $tracedmdump profile post-processing traces... Static basic blocks: 64525, Dynamic basic blocks: 87073132 Static instructions: 412004, Dynamic instructions: 509641730 Elapsed seconds: 26...

Android : Tagging a certain frame in Video?

Hi, I want to tag certain frames in the video with data in Android. Is there any way to accomplish this in Android? ...