how to transfer an action(ex:key press) from an Activity to other Activities

by Anh Khoa Nguyen Pham » Fri, 13 Mar 2009 10:38:11 GMT


Sponsored Links
 Thanks for your replies,

Actually, my application will run when incoming call is detected. Because i
do not know how to integrate my application into original dialer so i must
implement my application as a separate application. So when users press
Green Key, i want my application to exit and transfer this EVENT to original
dialer. Do you have any idea to solve my problem?

On Fri, Mar 13, 2009 at 2:12 AM, Streets Of Boston





--~--~---------~--~----~------------~-------~--~----~



how to transfer an action(ex:key press) from an Activity to other Activities

by Anh Khoa Nguyen Pham » Fri, 13 Mar 2009 11:06:28 GMT


 Did you try using PHONEPLUS_CALLBACK application ( I sent this question on
another topic)? I want to do something like this application. Please
download and install this application, then you will see my problem clearly.
I see that a lot of persons on forum asked about this question but up to
now, i do not see any satisfy answer.
Hope to receive more advices from all,

Thanks,
NPAK

On Fri, Mar 13, 2009 at 9:55 AM, Streets Of Boston







--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Google Docs, again

I raise this again because the need is so obvious!  Of all the things
G1 does not have, of all the complaints of its detracters, the lack of
support for Google Docs is the one that has the most traction for me.
I have been able to edit and create Docs on my Palm for many years,
thanks to Documents to Go by DataViz, so doing such things is a part
of my 'smartphone utility'.  I really like Google Docs (though it is a
maturing product), and thought that support for editing and creating
the same on the G1 was a no-brainer -- of course it would be there!
But no!  I have read there are various issues, but they sound like
excuses and can be overcome.

THIS ISSUE NEEDS TO BE RESOLVED!  If I wind up paying DataViz for a
solution, it will be a severe disappointment.

Mark

--~--~---------~--~----~------------~-------~--~----~

2. How get multiple phone number which are associated with a single contact.

Currently i  am getting my contacts like this.


public class InviteFriends {

        Activity activity ;

        public void invite(Activity _activity) {
            activity = _activity;

                String columns[] = new String[] {People.NAME, People.NUMBER};

                Uri mContacts = People.CONTENT_URI;

                Cursor c = _activity.managedQuery(mContacts, columns, //
Which columns to return

                null, // WHERE clause; which rows to return(all rows)

                null, // WHERE clause selection arguments (none)

                Contacts.People.DEFAULT_SORT_ORDER // Order-by clause
(ascending by name)

                );

                String [] contacts = new String[c.getCount()];
                boolean [] contactValue = new boolean[c.getCount()];

             if (c.moveToFirst()) {
                        String name = null;
                        String phoneNo = null;
                        int i = 0;
                do {

                        // Get the field values

                        name = c.getString(c.getColumnIndex(People.NAME));
                        phoneNo = c.getString(c.getColumnIndex(People.NUMBER));

                        Log.i("", " Name  =   " + name+"                   
Number  =
"+phoneNo);
                        contacts[i] = name+"\n"+phoneNo;
                        contactValue[i] = false;
                        Log.i(" I = "+i, ""+contacts[i]);
                        if(i<c.getCount()){
                        i++;
                        }
                } while (c.moveToNext());

                }

         new AlertDialog.Builder(_activity)
            .setIcon(R.drawable.invite_friends_icon)
            .setTitle("Invite Friends")
            .setMultiChoiceItems(contacts,
                        contactValue,
                    new DialogInterface.OnMultiChoiceClickListener() {
                        public void onClick(DialogInterface dialog,
int whichButton,
                                boolean isChecked) {

                                Log.i("Checked ", ""+isChecked);


                        }
                    })
            .setPositiveButton("Invite", new
DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int
whichButton) {

                    String inviteFriendNumList =
VOPUtility.extractDetailsInInternationalFormat(numbers);
                        Log.i("Invite Friends Numbers ",
""+inviteFriendNumList);


                }
            })
            .setNegativeButton("Cancel", new
DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int
whichButton) {


                }
            })
           .show();

                }

}

currently i m getting my contacts using this code snipt and showing
all my contact names with phone numbers
on a Multi choice  alert dialog successfully with all unchecked check
boxes.
My first Question is this:
For example i have a contact name  Jonas and i have saved three phone
numbers against this contact like first is Mobile number, second   is
Home number and third is Work number .How i can get these there
numbers in my list which is showing on dialog ?
and My second question:
if user checked some contacts on alert dialog how i can get checked
contact numbers  ? and how i can store them in a string array seprated
by comma.

any one can help me regarding this.

--~--~---------~--~----~------------~-------~--~----~

3. Perf and usability : How to lazy load an image from the web ?

4. Rendering the G1 screen on a computer screen via VNC software?

5. Touch mode again (CRUD application context).

6. How to change the ListView black top/bottom fade effect color.

7. Perf and usability : How to lazy load an image from the web ?