Hi Bro,
I followed the book Appcelerator Titanium Smartphone App Development Cookbook instruction in Chapter5: Connecting your Apps with Social Media and E-mail on P.134, details as bellow:
buttonSelectImage.addEventListener('click',function(e){ //obtain an image from the gallery Titanium.Media.openPhotoGallery({ success:function(event) { selectedImage = event.media; // set image view Ti.API.debug('Our type was: '+event.mediaType); if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) { imageThumbnail.image = selectedImage; } }, cancel:function() { //user cancelled the action from within //the photo gallery } }); }); win1.add(buttonSelectImage);About this line : Ti.Media.MEDIA_TYPE_PHOTO, I look up on api doc. As you mention, I know that only works on iOS system. I’ve tried to find the solution on android system, but haven’t figured that out. Currently, I’m developing Android 4.1 System. Can you give me some advice to solve this problem?
Besides, Everytime when I click “Select Image Button” on this line I mentioned, my android will immediately crash without any error message. Hopefully, I can get the satisfy answers from you.
Thanks!
Your Answer
Think you can help? Login to answer this question!