# BJ Listener Events
These events are in bjListener.js
file.
# Ti.App.fireEvent('tweet')
Used for tweeting content. Photo is not required.
Example:
Ti.App.fireEvent('tweet', {
photoURL: 'myPhotoURL',
title: 'myPostMessage'
})
photoURL
- URL for the photo. First searched in local.title
- Text of the tweet.
# Ti.App.fireEvent('facebook')
Used for posting content to Facebook. Photo is not required.
Example:
Ti.App.fireEvent('facebook', {
photoURL: 'myPhotoURL',
title: 'myPostMessage'
})
photoURL
- URL for the photo. First searched in local.title
- Text of the post.
# Ti.App.fireEvent('startPaintMode')
Starts paint mode by allowing painting on screen.
Example:
Ti.App.fireEvent('startPaintMode', {})
# Ti.App.fireEvent('stopPaintMode')
Stops painting mode.
Example:
Ti.App.fireEvent('stopPaintMode', {})
# Ti.App.fireEvent('drawOnPaint')
Draws while on paint mode.
Example:
Ti.App.fireEvent('drawOnPaint', {
parameters: 'X|Y|X|Y'
})
parameters
- Coordinates of the start and end points.
# Ti.App.fireEvent('updateRemoteColor')
Update drawing color.
Example:
Ti.App.fireEvent('updateRemoteColor', {
parameters: 'myColor'
})
parameters
- New color value.
# Ti.App.fireEvent('changePDFPage')
Changes currently opened PDF file's page to the mentioned parameter. On vAnnotateView, this will call goToPageNumber method. On wView, this will scroll to page.
Example:
Ti.App.fireEvent('changePDFPage', {
page: 5
})
page
- To be opened page number.
NOTE
iOS: Fired only from internal native code, so there will be no change if one uses on UI.
# Ti.App.fireEvent('closeModalWindow')
If there is an opened modal window, this event will close it.
Example:
Ti.App.fireEvent('closeModalWindow', {
page: 5
})
page
- To be opened page number.
# Ti.App.fireEvent('oP')
Toggles chart on scrollView.
Example:
Ti.App.fireEvent('oP', {})
# Ti.App.fireEvent('videoPaused')
Pause the active video.
Example:
Ti.App.fireEvent('videoPaused', {})
# Ti.App.fireEvent('videoPlaying')
If active video is paused, resume it.
Example:
Ti.App.fireEvent('videoPlaying', {})
# Ti.App.fireEvent('gotRemote')
Fired after remote data is retrieved, i.e. the connection with the remote is established.
Example:
Ti.App.fireEvent('gotRemote', {})
# Ti.App.fireEvent('takeNoteshot')
Takes a screenshot of the paint view.
Example:
Ti.App.fireEvent('takeNoteshot', {})
NOTE
iOS: After screenshot is gathered, paint mode is stopped.