Class: Apps

Mobizen.Apps

new Mobizen.Apps(mobizen)

Mobizen/Apps API Provider

Name Type Description
mobizen Mobizen(Service)

parent object

Requires

Classes

Dropzone
Transfer
Cloud
Extension

Members

$home jQueryObject

is string

platform string

running boolean

Type Definitions

static Mobizen.Apps.DB Mobizen.Apps.DB

Namespace of DB

Properties:
Name Type Description
Cache Mobizen.Apps.DB.Cache

Based Class

Models Mobizen.Apps.DB.Models

Based Class

CacheSchema Mobizen.Apps.DB.CacheSchema
TableSchema Mobizen.Apps.DB.TableSchema
Utils Mobizen.Apps.DB.Utils
Factory Mobizen.Apps.DB.Factory

static Mobizen.Apps.DB.CacheSchema Mobizen.Apps.DB.CacheSchema

Properties:
Name Type Description
music object

{data: ['albums', 'artists', 'genres'], local: ['albums']}

photos object

{data: ['events', 'albums'], local: ['events']}

videos object

{data: ['albums', 'records'], local: ['albums']}

calllog object

{data: ['events', 'incoming', 'outgoing', 'missed']}

static Mobizen.Apps.DB.Factory Mobizen.Apps.DB.Factory

Properties:
Name Type Description
hasChannelDB Mobizen.Apps.DB.Factory.hasChannelDB
createChannelDB Mobizen.Apps.DB.Factory.createChannelDB
getModel Mobizen.Apps.DB.Factory.getModel
get Mobizen.Apps.DB.Factory.get
remove Mobizen.Apps.DB.Factory.remove

static Mobizen.Apps.DB.Factory.createChannelDB(dbName, channel)

Name Type Description
dbName string

name of db

channel string

name of db channel

static Mobizen.Apps.DB.Factory.get(app, channel, dbName, callback)

Name Type Description
app string

name of app

channel string

name of db channel

dbName string

name of db

callback function

callback function

static Mobizen.Apps.DB.Factory.getModel(channel, app){Mobizen.Apps.DB.Models.<modelName>}

Name Type Description
channel string

name of db channel

app string

name of app

Returns:
Type Description
Mobizen.Apps.DB.Models.<modelName>
  • instance of db models

static Mobizen.Apps.DB.Factory.hasChannelDB(channel){undefined|object}

Name Type Description
channel string

name of db channel

Returns:
Type Description
undefined | object
  • instance of db channel

static Mobizen.Apps.DB.Factory.remove(app, channel, dbName, callback)

Name Type Description
app string

name of app

channel string

name of db channel

dbName string

name of db

callback function

callback function

static Mobizen.Apps.DB.TableSchema Mobizen.Apps.DB.TableSchema

Properties:
Name Type Description
data array
local array
Example
DB.TableSchema.data = [
  {name: 'music', indexes: ['albumId', 'artistId', 'genreId']},
  {name: 'photos', indexes: ['eventId', 'albumId']},
  {name: 'videos', indexes: ['albumId']},
  {name: 'calllog', indexes: ['eventId']}
];

DB.TableSchema.local = [
  {name: 'music', indexes: ['albumId', 'artistId', 'genreId']},
  {name: 'photos', indexes: ['eventId']},
  {name: 'videos', indexes: ['albumId']}
];

static Mobizen.Apps.DB.Utils Mobizen.Apps.DB.Utils

Properties:
Name Type Description
valueDesc Mobizen.Apps.DB.Utils.valueDesc
valueAsc Mobizen.Apps.DB.Utils.valueAsc
idDesc Mobizen.Apps.DB.Utils.idDesc
idAsc Mobizen.Apps.DB.Utils.idAsc
idMap Mobizen.Apps.DB.Utils.idMap
valueUnique Mobizen.Apps.DB.Utils.valueUnique

static Mobizen.Apps.DB.Utils.idAsc(a, b){number}

Name Type Description
a object
b object
Returns:
Type Description
number a.id - b.id

static Mobizen.Apps.DB.Utils.idDesc(a, b){number}

Name Type Description
a object
b object
Returns:
Type Description
number b.id - a.id

static Mobizen.Apps.DB.Utils.idMap(doc){number}

Name Type Description
doc object
Returns:
Type Description
number doc.id

static Mobizen.Apps.DB.Utils.valueAsc(a, b){number}

Name Type Description
a number
b number
Returns:
Type Description
number a - b

static Mobizen.Apps.DB.Utils.valueDesc(a, b){number}

Name Type Description
a number
b number
Returns:
Type Description
number b - a

static Mobizen.Apps.DB.Utils.valueUnique(value, index, self){boolean}

Name Type Description
value *
index number
self array
Returns:
Type Description
boolean true if equal

[module] Apps.<moduleName>

Database Interfaces

Properties:
Name Type Description
drop Mobizen.Apps.DB.Factory.remove

kind of alias

connect Mobizen.Apps.DB.Factory.get

kind of alias

Methods

abToB64(buffer){string}

Name Type Description
buffer arrayBuffer

array buffer

Returns:
Type Description
string base64 string

count($count, count, type){jQueryObject}

Name Type Description
$count jQueryObject

count element

count number optional

number of count

type string optional

type name

Returns:
Type Description
jQueryObject update element

droppable($el)

Name Type Description
$el jQueryObject

jquery element

escape(data, keys){string|object|null}

Name Type Description
data string| object

target

keys array
Returns:
Type Description
string | object | null escaped string

exec(name, cmd, args, open)

Name Type Description
name string

method name

cmd string

command name

args array optional

arguments

open boolean optional

true if with app open

extensionNotice()

history()

instance(){object}

Returns:
Type Description
object instance of a app

launch($icon)

Name Type Description
$icon jQueryObject

icon of app element

open(id, name, icon)

Name Type Description
id string

app id

name string

app name

icon string

app icon

Fires:

request(url, data, callback, channel){object}

Send data to the device or local plugin

Name Type Description
url string
data object
callback function

finish callback

channel string optional

channel name

Returns:
Type Description
object jQuery XHR object

smsDisabled()

tasks(id)

Name Type Description
id string

name of app

Listens to Events:

toBytes(size){string}

Name Type Description
size number

any number

Returns:
Type Description
string human readable string

unread(mod, count)

Name Type Description
mod string

method name

count number optional

unread count

upload(file)

Name Type Description
file File

withCommas(num){string}

Name Type Description
num number

any number

Returns:
Type Description
string number with commas

inner escapeHTML(str){string}

Name Type Description
str string
Returns:
Type Description
string escaped HTML string

inner onclickdropboxclose()

Fires:
Throws:
Will throw an error if not found app instance
comments powered by Disqus