The Mega App model and API
The Mega App model contains only one JavaScript object that represents the voice and photo memo data, as shown in the following code snippet:
var MemoItem = function(memoItem) { this.id = memoItem.id || "Memo_" + (new Date()).getTime(); this.title = memoItem.title || ""; this.desc = memoItem.desc || ""; this.type = memoItem.type || "voice"; this.location = memoItem.location || ""; this.mtime = memoItem.mtime || ""; };
The MemoItem
object contains the following attributes:
id
: This represents thememo
ID (its default value is unique as it includes a numeric value of the current time in milliseconds)title
: This represents the memo titledesc
: This represents the memo descriptiontype
: This represents the memo type, and it can ...
Get JavaScript Mobile Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.