[TIMOB-11689] Android: Ti.Filesystem directory object: nativePath and getNetivePath() return different results on iOS and Android. Parity issue.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-04-30T16:59:58.000+0000 |
Affected Version/s | Release 2.1.3, Release 3.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | exalture, parity |
Reporter | Amuktha Akkinepally |
Assignee | Sunila |
Created | 2012-11-07T18:50:23.000+0000 |
Updated | 2017-03-20T20:51:42.000+0000 |
Description
The nativePath property and getNativePath() method for directory objects return differently on Android and iOS.
Steps to reproduce:
1. Load the below app.js
2. Test this on both android and iOS
Expected Result: The path should be the same on both.
Actual Result: It is different on both.
app.js:
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical',
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var newDir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, "testdirectory");
newDir.createDirectory();
var npPropertyLabel = Ti.UI.createLabel({
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
text: 'Native Path Property: ' + newDir.nativePath,
color: 'red',
});
var npMethodLabel = Ti.UI.createLabel({
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
text: 'Native Path Method: ' + newDir.getNativePath(),
color: 'red',
});
var namePropertyLabel = Ti.UI.createLabel({
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
text: 'Name Property: ' + newDir.name,
color: 'black',
});
var nameMethodLabel = Ti.UI.createLabel({
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
text: 'Name Method: ' + newDir.getName(),
color: 'black',
});
win1.add(npPropertyLabel);
win1.add(npMethodLabel);
win1.add(namePropertyLabel);
win1.add(nameMethodLabel);
//
// add tabs
//
tabGroup.addTab(tab1);
// open tab group
tabGroup.open();
Attachments
File | Date | Size |
---|---|---|
iOS Simulator Screen shot Mar 21, 2013 2.14.19 PM.png | 2013-03-21T08:58:46.000+0000 | 47049 |
Screenshot_2013-03-21-14-15-48.png | 2013-03-21T08:58:46.000+0000 | 29146 |
Issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4 iOS iPhone Simulator: iOS SDK version: 6.0 jithinpv
Native path is platform specific and will be different on IOS and Android
Closing ticket as invalid.