Je veux montrer l'image des contacts (liste de contacts de formulaire) dans mon application. Comment faire?Comment afficher la photo de contact dans mon application?
1
A
Répondre
3
Je suis la réponse
public static Bitmap loadContactPhoto(ContentResolver cr, long id) {
Uri uri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, id);
InputStream input = ContactsContract.Contacts.openContactPhotoInputStream(cr, uri);
if (input == null) {
return null;
}
return BitmapFactory.decodeStream(input);
}
0
Examinez le code affiché sur cette page et votre problème devrait être résolu:
+0
Oui, il travaille pour moi, mais je ne suis pas gagné utiliser des API déchiffrées. – Vivek
Questions connexes
- 1. Iphone contact photo
- 2. détecter si le contact a photo
- 3. Comment lier nom de contact, téléphone et photo de contact dans SimpleCursorAdapter?
- 4. Comment puis-je obtenir la photo enregistrée dans le téléphone portable Android dans mon application
- 5. Comment intégrer le contact android à mon application
- 6. Comment puis-je obtenir le contact Gmail de mon compte dans mon application .NET?
- 7. Comment puis-je prendre une photo avec mon application iPhone?
- 8. Android: insertion par lots contact photo
- 9. Comment afficher les erreurs de mon application dans JSF?
- 10. Comment puis-je obtenir les données photo (le blob de photo de contact) si je photo_ids
- 11. Android - afficher des informations de contact spécifiques
- 12. Android: aide de l'appareil photo, prendre une photo et l'utiliser sur mon application
- 13. Comment afficher un UIProgressView pour un téléchargement dans mon application?
- 14. Afficher l'image de mon serveur Web à mon application iPhone
- 15. comment afficher les fichiers * .mpp dans mon application iphone?
- 16. application de cadre photo iphone
- 17. Comment ajouter un contact depuis une application?
- 18. Comment afficher l'image capturée en utilisant l'appareil photo dans Android
- 19. je veux afficher la photo avec le rapport de cristal
- 20. Comment puis-je télécharger une photo pour un contact en utilisant la bibliothèque client Contact Google .NET
- 21. iPhone SDK - Comment afficher une photo prise avec l'appareil photo dans un UINavigationController?
- 22. Application appareil photo Android
- 23. Comment puis-je libérer ces ressources dans mon application iPhone?
- 24. Comment accéder à la caméra dans mon application
- 25. Comment afficher les paramètres de la synthèse vocale dans mon application?
- 26. Comment utiliser UIImagePickerController uniquement pour afficher l'appareil photo et ne pas prendre de photo?
- 27. Comment afficher une application dans Application Loader?
- 28. Comment afficher une photo vcard XMPP (Jabber) dans Delphi?
- 29. Service Web WCF: comment puis-je afficher la requête et la réponse XML dans mon application?
- 30. Comment afficher mon application Silverlight après le chargement des données?
Comment avez-vous mis ceci à une imageview? – SpicyWeenie
convertir bitmap en drawable définir – Vivek