Page 2 of 2

Re: Android to Samsung (proof of concept)

Posted: Sun Mar 06, 2011 9:06 pm
by arris69
leftysloft wrote:...
I am having great difficulty with the caller ID (lack of understanding).
...
works on emulator (don't forget permission android.permission.READ_CONTACTS and android.permission.READ_PHONE_STATE):

Code: Select all

                        } else if(intent.getAction().equals("android.intent.action.PHONE_STATE")){
                                // but just if RING?
                                Toast.makeText(context,"android.intent.action.PHONE_STATE", Toast.LENGTH_LONG).show();
                                String Num = intent.getStringExtra(EXTRA_INCOMING_NUMBER);
                                String Name = Num;
                                Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(Num));
                                Cursor cur = context.getContentResolver().query(uri,
                                                new String[] { PhoneLookup.DISPLAY_NAME },
                                                null, null, null );
                                if( cur.moveToFirst() ) {
                                        int nameIdx = cur.getColumnIndex(PhoneLookup.DISPLAY_NAME);
                                        Name = cur.getString(nameIdx);
                                }
                                Intent mSendToSamy = new Intent(context, SendToSamy.class);
                                mSendToSamy.putExtra("message_from", "Incoming Call");
                                mSendToSamy.putExtra("message", "Call from: " + Name + "(" + Num + ")");
                                mSendToSamy.putExtra("category", "Incoming Call");
                                context.sendBroadcast(mSendToSamy);
                        } else {
hth
arris

Android app for Samsung - TVCallNotifly

Posted: Fri Aug 19, 2011 7:14 pm
by moras86
This project is probably not development now. You can use alternative application with similar functionality - TVCallNotifly.