Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web application site fix (Part - 08) #1969

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/application/web/guides/cordova/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can write messages to the system console for debugging purposes.

The Console API is mandatory for Tizen Mobile, Wearable, and TV profiles, which means that it is supported on all mobile, wearable, and TV devices. All mandatory APIs are supported on the Tizen emulators.

The main features of the Console API include:
The main features of the Console API include the following:

- Writing log messages and errors

Expand All @@ -18,7 +18,7 @@ The main features of the Console API include:

You can [measure the time elapsed during an operation](#measuring-timing).

> **Note**
> [!NOTE]
> To see the message writing results, use the system console in the Tizen Studio or use the `sdb dlog` command.

The global `console` object contains some additional features defined by Cordova.
Expand All @@ -38,7 +38,7 @@ function onDeviceReady() {

The `console` global object is available earlier, but it points to a default system console.

## Writing Log Messages and Errors
## Write log messages and errors

To write simple log and error messages to the system console, use the `log()` and `error()` methods:

Expand All @@ -47,12 +47,12 @@ console.log('console.log works well');
console.error('console.error works well');
```

> **Note**
> [!NOTE]
> To see the writing results, use the system console available in your Tizen Studio or use the `sdb dlog` command.

## Formatting Objects
## Format objects

To print a JavaScript representation of a specified object:
To print a JavaScript representation of a specified object, follow these steps:

- To print without formatting:

Expand All @@ -68,9 +68,9 @@ To print a JavaScript representation of a specified object:
console.dir('my object %o', john);
```

## Measuring Timing
## Measure time

To measure the time elapsed during an operation:
To measure the time elapsed during an operation, follow these steps:

1. Start the timer and give it a label (a string), which is used to identify the timer:

Expand All @@ -97,7 +97,7 @@ To measure the time elapsed during an operation:
```


## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down
4 changes: 2 additions & 2 deletions docs/application/web/guides/cordova/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Cordova defines a common interface for success and error callbacks:
- `name`: Short text representing the type of the error
- `message`: Text containing information about the error

> **Note**
> [!NOTE]
> To perform any Cordova-related operations, you must wait until Cordova is fully set up (the `deviceready` event occurs):
> ```
> document.addEventListener('deviceready', onDeviceReady, false);
Expand All @@ -35,7 +35,7 @@ Cordova defines a common interface for success and error callbacks:



## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down
6 changes: 3 additions & 3 deletions docs/application/web/guides/cordova/device.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ function onDeviceReady() {
```

<a name="loginfo"></a>
## Accessing Device Properties
## Access device properties

To retrieve information on the device, Cordova, and operating system, and output it in the system log:
To retrieve information on the device, Cordova, and operating system, and output it in the system log, follow these steps:

1. Prepare a handler for the `deviceready` event:

Expand All @@ -56,7 +56,7 @@ To retrieve information on the device, Cordova, and operating system, and output
```


## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down
14 changes: 7 additions & 7 deletions docs/application/web/guides/cordova/devicemotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can access the [acceleration values](#acceleration-values) from the device a

The Device Motion API is mandatory for Tizen Mobile, Wearable, and TV profiles, which means that it is supported on all mobile, wearable, and TV devices. All mandatory APIs are supported on the Tizen emulators.

The main features of the Device Motion API include:
The main features of the Device Motion API include the following:

- Getting the current acceleration

Expand All @@ -14,7 +14,7 @@ The main features of the Device Motion API include:

You can [get the acceleration along the X, Y, and Z axes at regular intervals](#monitoring-the-acceleration-values).

## Acceleration Values
## Acceleration values

The acceleration data is captured into the `Acceleration` interface (in [mobile](../../api/latest/device_api/mobile/tizen/cordova/device-motion.html#Acceleration), [wearable](../../api/latest/device_api/wearable/tizen/cordova/device-motion.html#Acceleration), and [TV](../../api/latest/device_api/tv/tizen/cordova/device-motion.html#Acceleration) applications). The acceleration values include the effect of gravity (9.81 m/s2), so that when a device lies flat and facing up, the x, y, and z values returned must be 0, 0, and 9.81.

Expand All @@ -41,9 +41,9 @@ function onDeviceReady() {
}
```

## Getting the Current Acceleration
## Get the current acceleration

To get the current acceleration along the X, Y, and Z axes:
To get the current acceleration along the X, Y, and Z axes, follow these steps:

1. Define a callback method to be invoked with the current acceleration values:

Expand All @@ -70,9 +70,9 @@ To get the current acceleration along the X, Y, and Z axes:
navigator.accelerometer.getCurrentAcceleration(onSuccess, onError);
```

## Monitoring the Acceleration Values
## Monitor the acceleration values

To retrieve the acceleration along the X, Y, and Z axes at regular intervals:
To retrieve the acceleration along the X, Y, and Z axes at regular intervals, follow these steps:

1. Define a callback method to be invoked with the current acceleration values:

Expand Down Expand Up @@ -115,7 +115,7 @@ To retrieve the acceleration along the X, Y, and Z axes at regular intervals:
```


## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down
14 changes: 7 additions & 7 deletions docs/application/web/guides/cordova/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ window.onload = function() {
};
```

## Adding Event Listeners
## Add event listeners

The applications typically use the `document.addEventListener()` method to attach an event listener once the `deviceready` event fires. This means that event listeners for other events (such as `pause`, `resume`, and `backbutton`) are added during or after the `deviceready` event handler:

Expand All @@ -59,13 +59,13 @@ function onVolumeUp() {
}
```

## Handling Pause and Resume Events
## Handle pause and resume events

The pause event signals that the application is put into the background. This happens typically when the screen is being locked or when the user switches to a different application. The resume event signals that the application returns from the background to the foreground.

To handle the `pause` and `resume` events:

1. Define the event handlers for the `pause` and `resume` events:
1. Define the event handlers for the `pause` and `resume` events, follow these steps:

```
function onPause() {
Expand All @@ -84,7 +84,7 @@ To handle the `pause` and `resume` events:
document.addEventListener('resume', onResume);
```

## Handling Button Press Events
## Handle button press events

You can add event listeners for specific button press events, as defined in the following table.

Expand All @@ -102,7 +102,7 @@ You can add event listeners for specific button press events, as defined in the

Events are triggered when the corresponding button is pressed.

To add event listeners for the menu, volume up, and volume down buttons:
To add event listeners for the menu, volume up, and volume down buttons, follow these steps:

1. Define the event handlers for the `menubutton`, `volumeupbutton`, and `volumeupbutton` events:

Expand All @@ -118,7 +118,7 @@ To add event listeners for the menu, volume up, and volume down buttons:

2. In the `deviceready` event handler, [add the listeners](#adding-event-listeners).

In this example, the same listener is used for both the volume up and down buttons.
In this example, the same listener is used for both the volume up and down buttons:

```
document.addEventListener('menubutton', onMenuButton);
Expand All @@ -128,7 +128,7 @@ To add event listeners for the menu, volume up, and volume down buttons:

When you press the buttons, the result is shown in the system console.

## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down
32 changes: 16 additions & 16 deletions docs/application/web/guides/cordova/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You can perform operations on files and directories stored in the device filesys

The File API is mandatory for Tizen Mobile, Wearable, and TV profiles, which means that it is supported on all mobile, wearable, and TV devices. All mandatory APIs are supported on the Tizen emulators.

The main features of the File API include:
The main features of the File API include the following:

- Resolving the filesystem

Expand All @@ -28,7 +28,7 @@ The main features of the File API include:

## Prerequisites

To enable your application to use the file functionality:
To enable your application to use the file functionality, follow these steps:

1. To perform any Cordova-related operations, you must wait until Cordova is fully set up (the `deviceready` event occurs):

Expand All @@ -49,9 +49,9 @@ To enable your application to use the file functionality:
<tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
```

## Resolving Filesystem Entries
## Resolve filesystem entries

To resolve the initial root for other filesystem operations:
To resolve the initial root for other filesystem operations, follow these steps:

- Use the `requestFileSystem()` global async method:

Expand All @@ -67,7 +67,7 @@ To resolve the initial root for other filesystem operations:
};
```

- Call the method with the created callbacks. The filesystem request can use a temporary or persistent filesystem with a defined size.
- Call the method with the created callbacks. The filesystem request can use a temporary or persistent filesystem with a defined size:

```
requestFileSystem(TEMPORARY, 1024*1024, successCallback, errorCallback);
Expand Down Expand Up @@ -106,9 +106,9 @@ To resolve the initial root for other filesystem operations:
Entry name example.txt
```

## Operating on Directories
## Operate on directories

To create directories and files, delete directories, and read entries within directories:
To create directories and files, delete directories, and read entries within directories, follow these steps:

- To create a directory, you can use the `getDirectory()` method:

Expand Down Expand Up @@ -189,9 +189,9 @@ To create directories and files, delete directories, and read entries within dir
success
```

## Operating on Entries
## Operate on entries

To move, copy, and delete entries, or access entry metadata, parent information, and URL:
To move, copy, and delete entries, or access entry metadata, parent information, and URL, follow these steps:

- To look up metadata about an entry, you can use the `getMetadata()` method:

Expand Down Expand Up @@ -283,7 +283,7 @@ To move, copy, and delete entries, or access entry metadata, parent information,
});
```

> **Note**
> [!NOTE]
> You cannot delete a non-empty directory or the filesystem root directory.

The following output is shown in the system log:
Expand All @@ -309,9 +309,9 @@ To move, copy, and delete entries, or access entry metadata, parent information,
URL: file:///home/owner/apps_rw/WfigBlWDyf/tmp/testDirectory/
```

## Operating on Files
## Operate on files

To create files, see [Resolving Filesystem Entries](#resolving-filesystem-entries). To create a writer for a file and access file details:
To create files, see [Resolving Filesystem Entries](#resolving-filesystem-entries). To create a writer for a file and access file details, follow these steps:

- To create a `FileWriter` object (in [mobile](../../api/latest/device_api/mobile/tizen/cordova/file.html#FileWriter), [wearable](../../api/latest/device_api/wearable/tizen/cordova/file.html#FileWriter), and [TV](../../api/latest/device_api/tv/tizen/cordova/file.html#FileWriter) applications), use the `createWriter()` method:

Expand All @@ -328,7 +328,7 @@ To create files, see [Resolving Filesystem Entries](#resolving-filesystem-entrie
created fileWriter object for testFile.txt
```

- To access a `File` object (in [mobile](../../api/latest/device_api/mobile/tizen/cordova/file.html#File), [wearable](../../api/latest/device_api/wearable/tizen/cordova/file.html#File), and [TV](../../api/latest/device_api/tv/tizen/cordova/file.html#File) applications), use the `file()` method. The object represents the current state of the file.
- To access a `File` object (in [mobile](../../api/latest/device_api/mobile/tizen/cordova/file.html#File), [wearable](../../api/latest/device_api/wearable/tizen/cordova/file.html#File), and [TV](../../api/latest/device_api/tv/tizen/cordova/file.html#File) applications), use the `file()` method. The object represents the current state of the file:

```
var f; /* Must be a FileEntry object resolved using methods presented before */
Expand All @@ -343,9 +343,9 @@ To create files, see [Resolving Filesystem Entries](#resolving-filesystem-entrie
created file object for example.txt
```

## Reading and Writing File Content
## Read and write file content

To read and write file content:
To read and write file content, follow these steps:

- To read a file and return the data as a base64-encoded data URL, you can use the `readAsDataURL()` method:

Expand Down Expand Up @@ -528,7 +528,7 @@ To read and write file content:
abort
```

## Related Information
## Related information
* Dependencies
- Tizen 3.0 and Higher for Mobile
- Tizen 3.0 and Higher for Wearable
Expand Down