[android-developers] Cancel subscription in unpublished application
Hi! We are testing subscriptions in our application. We have made a test project, uploaded it on Google Play as draft application so nobody could not install it except those who can get our application as apk file. Subcription model was tested and now I wonder how to cancle subscription. Because our application is not published in Google Play, I can not see it in the list my applications in Google Play application on device and I can not press cancel button for subscription. Is there a way to do this? -- 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.
[android-developers] Selected a contact phone number
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.
Re: [android-developers] Selected a contact phone number
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 mich...@banzon.dk 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.
[android-developers] Google seems unresponsive to reports about two adware developers I found
A few weeks ago, I discovered a developer https://play.google.com/store/apps/developer?id=Amazing+Live+Wallpaperswho had an app named identically to my own (Electric Plasma Live Wallpaper, mine https://play.google.com/store/apps/details?id=mjp.android.wallpaper.plasmaand theirshttps://play.google.com/store/apps/details?id=com.hailin.wallpaper.ep). I wouldn't mind too much if theirs was a legitimate app, but it's clearly adware that violates Google's ad policy (based on the permissions it requests, such as installing icons and displaying system notifications, and based on the developer's own description of the app itself.) I am concerned that they're using the relative popularity of my app to trick people into installing their malware. They have several other apps which follow a similar formula - adware named identically to another well-known live wallpaper, or even for trademarked things such as the Ghost Rider comic character. I reported them about three weeks ago, but they're still up. More recently, I discovered another developer https://play.google.com/store/apps/developer?id=Wallpaper+For+AndDroidwho is doing the same sort of thing. -- 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] Selected a contact phone number
Dear Mohd, Thank you for your reply. It seems that the code you provided query to get the name and phone number for all contacts. This is not what I want - I want to user to pick a contact so I can retrieve the number of the contact. As a side note: Please don't use catch with the Exception master class. And e.printStackTrace() won't do much on (standard) Android ;-) On Sun, Nov 17, 2013 at 10:11 PM, Mohd Arshi Khan arshikha...@gmail.comwrote: 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 mich...@banzon.dk 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