|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Object
Component
Camera
public class Camera
Camera component shows the camera preview feed
and provides the logic to take a snapshot.
See Camera-example.
| Constructor Summary | |
|---|---|
Camera(Style style)
Creates a new Camera component. |
|
| Method Summary | |
|---|---|
ByteArray |
capture(List types)
Takes a photo using phone's camera, with the given format specifications. |
void |
close()
Closes camera and release allocated resources. |
boolean |
isAvailable()
Checks if the platform supports camera |
| Methods inherited from class Component |
|---|
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size |
| Methods inherited from class Object |
|---|
toString, equals, hashCode |
| Methods inherited from |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Camera(Style style)
style - Style to use| Method Detail |
|---|
public boolean isAvailable()
capture(List) will
always return null.
public ByteArray capture(List types)
Takes a photo using phone's camera, with the given format specifications.
Note that it is very likely that phone will ask user's permission to take the photo.
types - List of capture type Strings.
When capture is requested by user the system
attempts to use the image types contained in list,
starting from first and returning the first
successful capture. Only required format for
Multimedia API is PNG. Type strings examples:
encoding=png&width=320&height=200 encoding=jpg&width=160&height=120 encoding=png
null if capture failed.public void close()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||