Re: [android-developers] Selected a contact phone number

2013-11-17 Thread Mohd Arshi Khan
try this
-
Cursor phones;
try {
phones = getContentResolver().query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
null, null,
null,
ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME+" ASC ");

while (phones.moveToNext()) {

String name = phones
.getString(phones

.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));

String phoneNumber = phones
.getString(phones

.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));

objContact = new ContactFields();
objContact.setName(name);
objContact.setPhoneNumber(phoneNumber);
list.add(objContact);



}

} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
phones.close();
}



On Sun, Nov 17, 2013 at 6:36 PM, Michael Banzon  wrote:

> Hi all,
>
> I am trying to get a contact with a phone number and so far I haven't
> found a reliable way to do this. I launch the standard activity for picking
> a contact using this snippet:
>
> Intent intent = new Intent(Intent.ACTION_PICK,
> ContactsContract.Contacts.CONTENT_URI);
> startActivityForResult(intent, REQUEST_CONTACT_NUMBER);
>
> In my onActivityResult method I do this (from examples from SO etc.):
>
> if (REQUEST_CONTACT_NUMBER == requestCode) {
> if (resultCode == Activity.RESULT_OK) {
>  Uri contactData = data.getData();
> Cursor c = getContentResolver().query(contactData, null, null, null, null);
>  if (c.moveToFirst()) {
> String id =
> c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts._ID));
>  String hasPhone =
> c.getString(c.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));
>
> if (hasPhone.equalsIgnoreCase("1")) {
>  Cursor phones = getContentResolver().query(
> ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,
>  ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = " + id,
> null, null);
> if (phones.moveToFirst()) {
>  String number =
> phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
> this.numberEditText.setText(number);
>  return;
> }
> }
> }
>  }
> Toast.makeText(this, "No number", Toast.LENGTH_SHORT).show();
> }
>
> The activity that launches show a lot more contacts than expected - every
> person is shown once per phone number or email eg. - many of the contacts
> is shown three to five times - and only one of these will result in an
> actual phone number being returned. Some contacts even return the email
> address!
>
> If I launch the activity using this:
>
> Intent intent = new Intent(Intent.ACTION_PICK,
> ContactsContract.Contacts.CONTENT_URI);
> intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE);
> startActivityForResult(intent, REQUEST_CONTACT_NUMBER);
>
> It seems that every contact is only shown once - and if chosen the contact
> picker prompts to select the correct part (phone, email, etc.) - but no
> matter what I select nothings actually gets returned - it always "toasts"
> the text "No number".
>
> I just need a reliable and simple (to the user) way to pick a contact and
> get the phone number into the app - any help or reference for more
> information would be much appreciated ;-)
>
> --
> Michael Banzon
> http://michaelbanzon.com/
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] chek the image

2012-12-09 Thread Mohd Arshi Khan
in image -
1.  list with header.
   In header "
 a button for speech and
 a relative layout with edit box   & button for plus. "
2. list items are -
a imageview, check box, textview and a button for call.
3. quick action on item long click in list.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] need client-server example

2012-11-19 Thread Mohd Arshi Khan
hello


   1. I need a client server example,
   2. I am using eclipse and i have tomcat7.0 and wamp server in my PC,
   3. I have a device (samsung mobile) that i want to use as server/client
   and emulator(AVD) as client/server.
   4. How to create a server side app in eclipse? please explain with all
   steps.
   5. How test / run app?

Thank you

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] how to save high-score in database

2012-02-11 Thread Mohd Arshi Khan
I want to save my game high-score with update existing user score in sqlite
database.
I'm facing problem for update only score of existing user
please provide me a good highscore class.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: can use ATM cum debit card of State Bank of India (SBI) for registration.

2012-01-16 Thread Mohd Arshi Khan
Thank you friends.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] can use ATM cum debit card of State Bank of India (SBI) for registration.

2011-12-31 Thread Mohd Arshi Khan
I'm student. so i don't have credit card. so
it is possible to use ATM cum Debit Card of State Bank of India (SBI) for
registration on android Market for publish my App.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] How to pass a web link to a button.

2011-11-22 Thread Mohd Arshi Khan
When the button is clicked (e.g., android:onClick attribute), call
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); where
url is the URL you want to link to.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to decompose .apk file

2011-11-22 Thread Mohd Arshi Khan
cmd prompt command
dex2jar classes.dex  or dex2jar classes.dex
show error: " *java is not recognized as an internal or external command,
operable program or batch file.* "

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to decompose .apk file

2011-11-22 Thread Mohd Arshi Khan
nice site
http://apkdecompile.com/

Thank u all friends...:)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] how to decompose .apk file

2011-11-22 Thread Mohd Arshi Khan
yes I want to extract java files from .apk but when i use Win Rar or 7zip
its extract only folowing files:

   - META-INF
   - res
   - AndroidManifest.xml
   - classes.dex
   - resources.arsc

i think java files are in classes.dex file but how to extract it and get
main coding file?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en