Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Ti.Media.openPhotoGallery is not working on iPad but fine on iPhone

$
0
0

Hi All, Please have a look with below code, I am not getting the iPad Gallery screen while calling Ti.Media.openPhotoGallery

No photo gallery is invoked on iPads whereas photo gallery is successfully invoked on iPhones.

Expected: Photo gallery should be invoked on iPads as well.

// ########## CODE STARTS HERE ########
var self = Titanium.UI.createWindow({
 top : 0, 
navBarHidden : true,
 backgroundColor : "#FFF",
 exitOnClose : false    
});
 
var leftView = Titanium.UI.createLabel({
text : "Click for Gallery", 
width : 80, 
height : 80,
left : 40, 
top : 30, 
zIndex : 2
 }); 
self.add(leftView);
 
leftView.addEventListener('click', OpenPhoneGallery);
 
function OpenPhoneGallery(){
 
Ti.Media.openPhotoGallery({
success : function(ev){ 
SharePageCallFunc(ev);
 },
cancel : function(){ 
alert("Gallery is not opened"); 
},
error : function(err){
var a = Titanium.UI.createAlertDialog({
 title : 'Gallery'
 });    
a.setMessage('Unexpected error: ' + err.code);  
a.show();
},
showControls : false,
mediaTypes : Ti.Media.MEDIA_TYPE_PHOTO,
autohide : true
});
}
 
function SharePageCallFunc(eve,hidecam){
var shareImageView = Ti.UI.createImageView({ 
width : Ti.UI.SIZE, 
height: Ti.UI.SIZE,
image : eve.media,
left : 0, 
bottom : 0, 
autorotate:true, 
top : 100 
}); 
self.add(shareImageView);
}
self.open();

Application type: mobile

Titanium SDK: 3.5.1.GA

Platform & version: iOS 8.2,

Device: iPad Host Operating System: OSX 10.10.2,

Titanium Studio: 3.4.1.201410281727

Jira ticket: https://jira.appcelerator.org/browse/TC-5416

https://jira.appcelerator.org/browse/TIMOB-13240


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>