Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Next #8

Merged
merged 1 commit into from Feb 2, 2012
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions .gitignore
Expand Up @@ -40,6 +40,12 @@ FallingBlocks/arm/o.le-v7-g/FallingBlocks
FallingBlocks/arm/o.le-v7/FallingBlocks
FallingBlocks/x86/o-g/FallingBlocks
FallingBlocks/x86/o/FallingBlocks
GLES11Template/arm/o.le-v7-g/GLES11Template
GLES11Template/arm/o.le-v7/GLES11Template
GLES11Template/x86/o-g/GLES11Template
GLES20Template/arm/o.le-v7-g/GLES20Template
GLES20Template/arm/o.le-v7/GLES20Template
GLES20Template/x86/o-g/GLES20Template
Geolocation/arm/o.le-v7-g/Geolocation
Geolocation/arm/o.le-v7/Geolocation
Geolocation/x86/o-g/Geolocation
Expand Down Expand Up @@ -76,10 +82,6 @@ NetworkStatus/arm/o.le-v7-g/NetworkStatus
NetworkStatus/arm/o.le-v7/NetworkStatus
NetworkStatus/x86/o-g/NetworkStatus
NetworkStatus/x86/o/NetworkStatus
OpenGLES11Template/arm/o.le-v7-g/OpenGLES11Template
OpenGLES11Template/arm/o.le-v7/OpenGLES11Template
OpenGLES11Template/x86/o-g/OpenGLES11Template
OpenGLES11Template/x86/o/OpenGLES11Template
PaymentService/arm/o.le-v7-g/PaymentService
PaymentService/arm/o.le-v7/PaymentService
PaymentService/x86/o-g/PaymentService
Expand Down
2 changes: 1 addition & 1 deletion Accelerometer/NOTICE
@@ -1,5 +1,5 @@
Accelerometer
Copyright (c) 2011 Research In Motion Limited.
Copyright (c) 2011-2012 Research In Motion Limited.

This product includes software developed at
Research In Motion Limited (http://www.rim.com/).
24 changes: 12 additions & 12 deletions Accelerometer/bar-descriptor.xml
Expand Up @@ -11,19 +11,19 @@
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>com.example.Accelerometer</id>

<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>Accelerometer</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.

<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
<versionNumber>1.0.0</versionNumber>

<!-- Fourth digit segment of the package version. First three segments are taken from the
<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
<buildId>1</buildId>

<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->

Expand All @@ -37,17 +37,17 @@
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
<author>Example Inc.</author>
<splashscreen>sample-splashscreen-landscape.png:sample-splashscreen-portrait.png</splashscreen>

<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->

<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>

<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<asset path="icon.png">icon.png</asset>
Expand All @@ -71,18 +71,18 @@
<platformArchitecture>x86</platformArchitecture>
<asset path="x86/o-g/Accelerometer" entry="true" type="Qnx/Elf">Accelerometer</asset>
</configuration>

<!-- The icon for the application, which should be 86x86. -->
<icon>
<image>icon.png</image>
</icon>

<!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
<!-- <splashscreen></splashscreen> -->

<!-- Request permission to execute native code. Required for native applications. -->
<action system="true">run_native</action>

<!-- The permissions requested by your application. -->
<!-- <action>access_shared</action> -->
<!-- <action>record_audio</action> -->
Expand All @@ -96,5 +96,5 @@

<!-- Ensure that shared libraries in the package are found at run-time. -->
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>

</qnx>
2 changes: 1 addition & 1 deletion Accelerometer/dialogutil.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Accelerometer/dialogutil.h
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ void destroy_dialog();

/**
* Displays a message to the dialog created by create_dialog() and
* outputs that message to stderr. This means it will get added
* outputs that message to stderr. This means it will get added
* to the log file in the sandbox and output to the console.
*
* @param msg the message to be displayed.
Expand Down
2 changes: 1 addition & 1 deletion Accelerometer/main.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
20 changes: 10 additions & 10 deletions Accelerometer/readme.txt
Expand Up @@ -2,33 +2,33 @@ Accelerometer

========================================================================
Sample Description:
The Accelerometer sample is an application that is designed to show you how to

The Accelerometer sample is an application that is designed to show you how to
handle updates from the accelerometer sensor

When you run the application, the value of the pitch and roll of the device is
printed to the console, and updated every 25 milliseconds.

Feature summary
- Handling navigator events
- Handling accelerometer updates

========================================================================
Requirements:

- BlackBerry Native SDK for Tablet OS 1.0 or later
- BlackBerry Native SDK for Tablet OS 2.0 or later
- One of the following:
- BlackBerry PlayBook tablet running BlackBerry Tablet OS 1.0 or later
- BlackBerry Tablet Simulator 1.0 or later
- BlackBerry PlayBook tablet running BlackBerry Tablet OS 2.0 or later
- BlackBerry Tablet Simulator 2.0 or later

========================================================================
Importing a project into the Native SDK:

1. From the the Sample apps page, download and extract the sample application.
2. Launch the Native SDK.
3. On the File menu, click Import.
4. Expand General, and select Existing Projects into Workspace. Click Next.
5. Browse to the location where you extracted the sample app, and click OK.
The sample project should display in the the Projects section.
The sample project should display in the the Projects section.
6. Click Finish to import the project into your workspace.

2 changes: 1 addition & 1 deletion AudioControl/NOTICE
@@ -1,5 +1,5 @@
AudioControl
Copyright (c) 2011 Research In Motion Limited.
Copyright (c) 2011-2012 Research In Motion Limited.

This product includes software developed at
Research In Motion Limited (http://www.rim.com/).
24 changes: 12 additions & 12 deletions AudioControl/bar-descriptor.xml
Expand Up @@ -11,19 +11,19 @@
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>com.example.AudioControl</id>

<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>AudioControl</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.

<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
<versionNumber>1.0.0</versionNumber>

<!-- Fourth digit segment of the package version. First three segments are taken from the
<!-- Fourth digit segment of the package version. First three segments are taken from the
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
<buildId>1</buildId>

<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->

Expand All @@ -37,17 +37,17 @@
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
<author>Example Inc.</author>
<splashscreen>sample-splashscreen-landscape.png:sample-splashscreen-portrait.png</splashscreen>

<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->

<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
<systemChrome>none</systemChrome>
<transparent>false</transparent>
</initialWindow>

<!-- The category where the application appears. Either core.games or core.media. -->
<category>core.games</category>
<asset path="icon.png">icon.png</asset>
Expand All @@ -71,18 +71,18 @@
<platformArchitecture>x86</platformArchitecture>
<asset path="x86/o-g/AudioControl" entry="true" type="Qnx/Elf">AudioControl</asset>
</configuration>

<!-- The icon for the application, which should be 86x86. -->
<icon>
<image>icon.png</image>
</icon>

<!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
<!-- <splashscreen></splashscreen> -->

<!-- Request permission to execute native code. Required for native applications. -->
<action system="true">run_native</action>

<!-- The permissions requested by your application. -->
<!-- <action>access_shared</action> -->
<!-- <action>record_audio</action> -->
Expand All @@ -96,5 +96,5 @@

<!-- Ensure that shared libraries in the package are found at run-time. -->
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>

</qnx>
2 changes: 1 addition & 1 deletion AudioControl/dialogutil.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions AudioControl/dialogutil.h
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@ void destroy_dialog();

/**
* Displays a message to the dialog created by create_dialog() and
* outputs that message to stderr. This means it will get added
* outputs that message to stderr. This means it will get added
* to the log file in the sandbox and output to the console.
*
* @param msg the message to be displayed.
Expand Down
66 changes: 33 additions & 33 deletions AudioControl/main.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011 Research In Motion Limited.
* Copyright (c) 2011-2012 Research In Motion Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -144,38 +144,38 @@ main(int argc, char *argv[])
if (BPS_FAILURE == audiomixer_request_events(0)) {
show_dialog_message("Unable to request audio mixer events.");
} else {
/*
* Retrieve and display the current audio mixer status
*/
float headphone_volume;
audiomixer_get_output_level(AUDIOMIXER_OUTPUT_HEADPHONE, &headphone_volume);
float speaker_volume;
audiomixer_get_output_level(AUDIOMIXER_OUTPUT_SPEAKER, &speaker_volume);
float input_gain;
audiomixer_get_input_level(AUDIOMIXER_INPUT, &input_gain);

bool is_headphone_muted;
audiomixer_get_output_mute(AUDIOMIXER_OUTPUT_HEADPHONE, &is_headphone_muted);
bool is_speaker_muted;
audiomixer_get_output_mute(AUDIOMIXER_OUTPUT_SPEAKER, &is_speaker_muted);
bool is_input_muted;
audiomixer_get_input_mute(AUDIOMIXER_INPUT, &is_input_muted);

char tmp[MSG_SIZE];
snprintf(msg, MSG_SIZE, "Audio Mixer Status\n");
snprintf(tmp, MSG_SIZE, "Headphone Volume: %f\n", headphone_volume);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Speaker Volume: %f\n", speaker_volume);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Input Gain: %f\n", input_gain);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Headphone Muted: %s\n", bool_str(is_headphone_muted));
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Speaker Muted: %s\n", bool_str(is_speaker_muted));
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Input Muted: %s\n\n", bool_str(is_input_muted));
strlcat(msg, tmp, MSG_SIZE);
show_dialog_message(msg);
/*
* Retrieve and display the current audio mixer status
*/
float headphone_volume;
audiomixer_get_output_level(AUDIOMIXER_OUTPUT_HEADPHONE, &headphone_volume);
float speaker_volume;
audiomixer_get_output_level(AUDIOMIXER_OUTPUT_SPEAKER, &speaker_volume);
float input_gain;
audiomixer_get_input_level(AUDIOMIXER_INPUT, &input_gain);

bool is_headphone_muted;
audiomixer_get_output_mute(AUDIOMIXER_OUTPUT_HEADPHONE, &is_headphone_muted);
bool is_speaker_muted;
audiomixer_get_output_mute(AUDIOMIXER_OUTPUT_SPEAKER, &is_speaker_muted);
bool is_input_muted;
audiomixer_get_input_mute(AUDIOMIXER_INPUT, &is_input_muted);

char tmp[MSG_SIZE];
snprintf(msg, MSG_SIZE, "Audio Mixer Status\n");
snprintf(tmp, MSG_SIZE, "Headphone Volume: %f\n", headphone_volume);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Speaker Volume: %f\n", speaker_volume);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Input Gain: %f\n", input_gain);
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Headphone Muted: %s\n", bool_str(is_headphone_muted));
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Speaker Muted: %s\n", bool_str(is_speaker_muted));
strlcat(msg, tmp, MSG_SIZE);
snprintf(tmp, MSG_SIZE, "Input Muted: %s\n\n", bool_str(is_input_muted));
strlcat(msg, tmp, MSG_SIZE);
show_dialog_message(msg);
}

/*
Expand Down