Change incoming name in Dialer

by viktor » Wed, 09 Mar 2011 18:58:53 GMT


Sponsored Links
 Hi,

Is it any tricks to change name in Dialer on the fly (when dialer is
in Ringing state )?

In dialer we can see Name with label "Unknown", I want to replace it
on my own label.

Thanks

-- 



Re: Change incoming name in Dialer

by dirk » Thu, 10 Mar 2011 01:23:05 GMT


 I don't believe so. If it's a known number, the only thing I can think
of is to add a contact for that number (with the user's approval, of
course).

Dirk




-- 


Sponsored Links


Re: Change incoming name in Dialer

by viktor » Thu, 10 Mar 2011 02:55:00 GMT


 Thank, I can add contact without approval, but I don't know if Dialer
sync contact by change or only at Dialer startup.







-- 



Other Threads

1. Overriding user sms request

Is it possible to know when a user tries to send an sms message, and
preventing him from doing so?

-- 

2. Memory Leaking problem

Hi,
I'm facing a serious Memory Leaking problem. The code below is a ImageAdapter 
for android.widget.Gallery.
After I rotate the screen for several times, the Application crashes and report 
a "out of memory error: bitmap size exceeds VM budget."
I wrote a finish() but it doesn't work either.
Really grateful to any suggestions.

Code:

public class ImageAdapter extends BaseAdapter {
 
 private Context mContext;
 private ImageView[] mImages;

 public ImageAdapter(Context context, Bitmap[] bitmaps) {
  if (mContext == null) {
   mContext = context;
  }
  if (mImages == null) {
   mImages = new ImageView[bitmaps.length];
  }
  createReflectedImages(bitmaps);
 }

 public ImageAdapter(Context context, int[] imageIds) {
  if (mContext == null) {
   mContext = context;
  }
  Bitmap[] bitmaps = new Bitmap[imageIds.length];
  if (mImages == null) {
   mImages = new ImageView[imageIds.length];
  }
  int i = 0;
  for (int imageId : imageIds) {
   bitmaps[i++] = BitmapFactory.decodeResource(
     mContext.getResources(), imageId);
  }
  createReflectedImages(bitmaps);
 }


 private boolean createReflectedImages(Bitmap[] mBitmaps) {
  // The gap we want between the reflection and the original image
  final int reflectionGap = 0;
  int index = 0;
  Bitmap reflectionImage = null;
  Bitmap bitmapWithReflection = null;
  BitmapDrawable bd;
  Paint paint = new Paint();
  for (Bitmap originalImage : mBitmaps) {
       int width = originalImage.getWidth();
       int height = originalImage.getHeight();
       Matrix matrix = new Matrix();
       matrix.preScale(1, -1);
   
       reflectionImage = Bitmap.createBitmap(originalImage, 0, height / 
2,width, height / 2, matrix, false);
       bitmapWithReflection = Bitmap.createBitmap(width,(height + height / 2), 
Config.ARGB_8888);
      
       Canvas canvas = new Canvas(bitmapWithReflection);
       canvas.drawBitmap(originalImage, 0, 0, null);
       
       paint.reset();
       canvas.drawRect(0, height, width, height + reflectionGap, paint);
       canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);
      
       final LinearGradient shader = new LinearGradient(0, 
originalImage.getHeight(), 0,bitmapWithReflection.getHeight()+ reflectionGap, 
0x70ffffff, 0x00ffffff, TileMode.CLAMP);
     
       paint.setShader(shader);
       paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
       canvas.drawRect(0, height, width, bitmapWithReflection.getHeight() + 
reflectionGap, paint);
  
       bd = new BitmapDrawable(bitmapWithReflection);
       bd.setAntiAlias(true);
       
       final ImageView imageView = new ImageView(mContext);
       imageView.setImageDrawable(bd);
       imageView.setLayoutParams(new GalleryFlow.LayoutParams(120, 120));
     
       mImages[index++] = imageView;
   
       originalImage.recycle();
  }
  
  reflectionImage.recycle();
 
  return true;
 }

 public int getCount() {
  return mImages.length;
 }
 public Object getItem(int position) {
  return position;
 }
 public long getItemId(int position) {
  return position;
 }

 public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
   convertView = mImages[position];
  }
  return convertView;
  }

 public void finish() {
 for (ImageView v : mImages) {
    v.setImageDrawable(null);
    v = null;
  }
  
 }
 }

2010-10-22



kearnel_android

-- 

3. How can I access data from SD card?

4. mediaplayer's onCompletionListener never called on playing 3gpp/amr audio files

5. Searchable dictionary results are not being shown in global search

6. One night with the gurus

7. Why doesn't AlarmManager allow querying or browsing of alarms or pending intents?