Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7851] Android: Database - Expose a method for accessing the path of where the database file is stored.

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMichael Pettiford
AssigneeUnknown
Created2012-02-29T13:29:39.000+0000
Updated2018-03-06T18:58:00.000+0000

Description

If possible, expose a method similar to iOS that allows a user to get the path of where the database file is being stored. For example on iOS if I use the following code
var d = Ti.Database.open('testdb.db');
var f = d.file;
alert(f.path);
I will get the path to where the db file has been stored on the filesystem.

Comments

  1. Dawson Toth 2013-06-05

    In TiDatabaseProxy.java:
       	@Kroll.getProperty
       	@Kroll.method
       	public TiFileProxy getFile() {
       		return new TiFileProxy(TiFileFactory.createTitaniumFile(db.getPath(),  false));
       	}

JSON Source