/[projects]/android/SmsSend/src/dk/thoerup/smssend/SmsSend.java
ViewVC logotype

Diff of /android/SmsSend/src/dk/thoerup/smssend/SmsSend.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 747 by torben, Tue May 25 18:34:19 2010 UTC revision 748 by torben, Tue May 25 18:54:02 2010 UTC
# Line 32  public class SmsSend extends Activity { Line 32  public class SmsSend extends Activity {
32          final String SMSDAEMON = "42407617";          final String SMSDAEMON = "42407617";
33                    
34          final int OPTIONS_SETTINGS = 1000;          final int OPTIONS_SETTINGS = 1000;
35            
36            final int LOOKUP_PHONENR = 2000;
37    
38          @Override          @Override
39          public void onCreate(Bundle savedInstanceState) {          public void onCreate(Bundle savedInstanceState) {
# Line 81  public class SmsSend extends Activity { Line 83  public class SmsSend extends Activity {
83                  return retval;                  return retval;
84                                    
85          }          }
86            
87            
88    
89          void lookup() {          @Override
90                  /*          protected void onActivityResult(int requestCode, int resultCode, Intent data) {
91                  Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);                  super.onActivityResult(requestCode, resultCode, data);
92                    
93          startActivityForResult(intent, 1);                  switch(requestCode) {
94                   */                  case LOOKUP_PHONENR:
95                            if (resultCode == Activity.RESULT_OK) {
96                                    String phone = data.getStringExtra("phone");
97                                    EditText dest = (EditText) findViewById(R.id.destination);
98                                    dest.setText(phone);                            
99                            }
100                            break;
101                    }
102            }
103    
104            void lookup() {
105                                    
106          Intent intent = new Intent(Intent.ACTION_PICK);          Intent intent = new Intent(Intent.ACTION_PICK);
107          intent.setType(ContactsContract.Contacts.CONTENT_TYPE);          intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
   
108    
109          startActivityForResult(intent, 1);          startActivityForResult(intent, LOOKUP_PHONENR);
110                                    
111    
112    

Legend:
Removed from v.747  
changed lines
  Added in v.748

  ViewVC Help
Powered by ViewVC 1.1.20