android

How to programatically hide Caller ID on Android

Hi, on Android phones, under Call -> Additional settings -> Caller ID it is possible to hide your caller ID. I want to do that programatically from my code, but was not able to find way to do that. I searched through android.provider android.telephony for 2.1 release and was not able to find it. Has anybody successfully solved th...

Merge two/more image in Android(widget)

Trying to create a widget with custom fonts, but read that widget doesn't support custom font. I thought that I could create 10 png's for every number(0-10, not going to use abc ect). By using that method I need to create several imageviews... that seems a waste of views. So if I want to have the number 1337 I need 4 ImageViews. Isn'...

Problem in updating contact email address

Hi! I am trying to update contact email address using this code String selectEmail = ContactsContract.Data.CONTACT_ID + "=? AND " + ContactsContract.Data.MIMETYPE + "='" + ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE + "'"; String[] emailArgs = new String[]{Id}; ops.add(ContentProviderOperation.newUpdate(Conta...

Compare the bitmaps in canvas

public class DrawView extends View { private ColorBall[] colorballs = new ColorBall[3]; // array that holds the balls private int balID = 0; // variable to know what ball is being dragged /* protected Bitmap getImage(int id) { return BitmapFactory.decodeResource(mContex.getResources(), id); }*/ private Paint m...

How to get a GeoPosition of a clicked position on the map?

Hi all. I'm doing some maths calculations in android map activity and I need to find a position of a GeoPoint which user has clicked on the map. I understand that I need to use onTouch event handler. This is how it looks like at the moment: @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction()...

Screen blackout when performing Pinch Gesture on MPMoviePlayerController

I have this strange issue in iOS4 where in the Video which is playing in MPMoviePlayerController blacks out when the user performs certain kind of gestures over the screen. I'm simply creating a UIViewController and object for MPMoviePlayerController and then setting the View onto the UIViewController. I want to ask if this issue is so...

Optimization proposals for ListView with data from multiple "tables"

Hi, I just encountered the following situation. I have an Android app with a scenario which I guess may happen in multiple apps. It's about tagging/labeling/categorizing, call it as you want. I basically have the following relations in the SQLite DB -------- -------------- --------- | Tags | ...

BitmapFactory.decodeByteArray returns null in android

Hello In my application I am converting base64 string to image.For that I initially converted base 64 file to byte array and later am trying to convert to images. To convert to Images I am using the below code File sdImageMainDirectory = new File("/data/data/com.ayansys.Base64trial"); FileOutputStream fileOutputStream = null; ...

Want to put time gap between two events in Android application

Hello friends, I want put delay between two flips of the same image on ImageView. i.e. (1). Image loads with Animation (2). Wait for 1 or 1.5 seconds (3). Image changes with animation on the same ImageView. I tried to set Thread.Sleep() , didn't work. And yes, these all things I want to be done on android. ...

How to Terminate a App Programmatically in Android?

Hi Folks, when i click a button my app should be terminated. It must not to run at the background. that is when holding the home key, My App should not be alive. For Example, i have to redirect my app to the browser. then My App goes to as a background Task. I want to terminate before the redirection to browser. How is it Possible? Any ...

Get rid of the line under TabWidget

I've got simple tab activity with next layout: <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#ffffff00" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_pa...

Increasing CONSISTENT_DMA_SIZE to 16MB crashes linux kernel

Hi, I am trying to increase the DMA size to 16MB from current 10MB in my arm linux kernel 2.6.29 running on android phone. But my kernel crashes with following error. Phone has total 256MB RAM. I modified following line in file arch/arm/mach-pxa/include/mach/memory.h #define CONSISTENT_DMA_SIZE 16 * 1024 * 1024 But kernel crashed wit...

Android Application On Exit Event

Hi, I need some help in application exit handling. My application has multiple Activity say : - EntryAct, Act1, Act2 .... Act10. When user presses home key on any of these Activities, I need to do some flag setting. Handling home key in every application Activity is not possible! Can someone tell how this can be achieved? Can't chang...

What will happen to existing connections when switch between 3g/wifi

Hey, Assume that, I have a TCP connection that doing heavy data transmitting on my 3G network; and I walked home, Android switch to my home Wifi automatically. Now what happen to the existing connection? is it simply disconnect? or it will keep going, only new connections will use wifi? In addition, what if I walk away from home, wifi ...

Need command line to start web browser using adb.

How can I startup a browser with the adb shell and display a certain web page? ...

Images in ListView over SimpleAdapter are not updatet after change

Hey, I have a list-activity using a row-based layout for elements of the list: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"&gt; <TextView android:id="@+id/exerciseTex...

How to wake up the Camera in Android?

I would need to wake up my camera when i click a button on my App. After that it takes a picture and save it to the sdcard and display the path of that image as Toast? How can this be done? ...

Sending intents from receiver to service with a delay

I have a Receiver for BOOT_COMPLETED intent and it will start a Service by calling startService with an intent and the Service processes that intent in onStartCommand function by spawning a thread that does a HTTP post to a server. On powerup, sometimes it takes 3 to 5 seconds to get the active data connection on phone, when this happen...

Problem running heavy application

I developed an "heavy" application (700 Mb !). With an "apk installer" application, i can install it on the Nexus One SD card (Froyo "installLocation" option). My application is heavy because of the videos it contains (located in /raw directory). The problem I have, is that it crashes when launched, with this error : 08-18 11:22:16.179:...

ListView in PopupWindow,ContextMenu not popping up on Long click

fileListView = new FileListController(this); fileListView.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { pWindow.dismiss(); } }); pWindow = new PopupWindow(fileListView); pWindow.setWindowLayoutMode(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); pWindow...