This project is a native Android module for Titanium that allows you to get Android's native playlists and their contents.
The module is very similar to a web service in the sense that it returns JSON strings.
There are only two methods:
Returns an array of objects:
[
{name:'Playlist Name 1',id: '1234'},
{name:'Playlist Name 2',id: '4321'}
]
Returns an array of objects:
[
{index:0,path: '/storage/extSdCard/ArtistName/SongName.mp3'},
{index:0,path: '/storage/extSdCard/ArtistName/SongName.mp3'}
]
Grab the file from this repo, located at: /dist/com.alcoapps.androidplaylists-android-1.zip
// instantiate module
var plmod=require('com.alcoapps.androidplaylists');
// get all playlists. This will return a JSON string as described above
var playlists=plmod.getPlaylists();
// assuming you got a playlist ID from the previous call, you could get its songs
var songs=plmod.getSongs(1234);
This project is licensed under the MIL License. http://alco.mit-license.org/
This is my first native Android module for Titanium, and my first attempt at Java coding in MANY years. If you see something that could be improved or something that simply I shouldn't do in code, feel free to let me know. :)