How to import postal address of contact

Svenja K 20 Reputation points
2024-03-10T13:07:34.9266667+00:00

I'm creating an Android app to write bills.

First step is to import selected contact from address book.

Everything is working fine. I get the contact from selection, but in IContact there is no information about the postal address. I can't find any documentation or explanation, how I can read it.

For me it would also be fine, to request address separately with the Contact-ID, but also about this, I can't find anything.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,015 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 49,536 Reputation points Microsoft External Staff
    2024-03-11T02:46:07.3933333+00:00

    Hello,

    It is not possible to get a postal address from Android contacts, and this item is not included in Android's contact information.

    Please refer to ContactsContract for more detailed information.

    When creating a contact in Android, you do not need to enter your own postal address.

    This is for the purpose of protecting the user's personal privacy. Reading contacts is a common permission, and if this permission can read a user's postal address directly, it can lead to a number of privacy issues.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.