This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Windsor
committed
Dec 9, 2011
1 parent
d65af09
commit ebc2728
Showing
17 changed files
with
749 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="res"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/net.rim.ejde.BlackBerryVMInstallType/BlackBerry JRE 6.0.0"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>YouTube Client</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>net.rim.ejde.internal.builder.BlackBerryPreprocessBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>net.rim.ejde.internal.builder.BlackBerryResourcesBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>net.rim.ejde.BlackBerryPreProcessNature</nature> | ||
<nature>net.rim.ejde.BlackBerryProjectCoreNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
3 changes: 3 additions & 0 deletions
3
YouTube Client/.settings/net.rim.browser.tools.debug.widget.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#Fri Nov 26 11:24:32 EST 2010 | ||
eclipse.preferences.version=1 | ||
outputfolder=build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Fri Nov 26 11:24:32 EST 2010 | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 | ||
org.eclipse.jdt.core.compiler.compliance=1.4 | ||
org.eclipse.jdt.core.compiler.source=1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- This file has been generated by the BlackBerry Plugin for Eclipse v3.7.100. --> | ||
|
||
<Properties ModelVersion="1.1.2"> | ||
<General Title="YouTube Client" Version="1.0.0" Vendor="Tim Windsor @ RIM" Description="Sample showing the YouTube Data API accessed through the BlackBerry 6 Communication API"/> | ||
<Application Type="BlackBerry Application" MainMIDletName="" MainArgs="" HomeScreenPosition="0" StartupTier="7" IsSystemModule="false" IsAutostartup="false"/> | ||
<Resources hasTitleResource="false" TitleResourceBundleName="" TitleResourceBundleRelativePath="" TitleResourceBundleClassName="" TitleResourceBundleKey="" DescriptionId=""> | ||
<Icons> | ||
<Icon CanonicalFileName="res/img/iconLowlight.png" IsFocus="false"/> | ||
<Icon CanonicalFileName="res/img/iconHighlight.png" IsFocus="true"/> | ||
</Icons> | ||
</Resources> | ||
<Compile OutputCompilerMessages="false" ConvertImages="false" CreateWarningForNoExportedRoutine="true" CompressResources="false" AliasList=""> | ||
<PreprocessorDefines/> | ||
</Compile> | ||
<Packaging PreBuildStep="" PostBuildStep="" CleanStep="" OutputFileName="Youtube_Client" OutputFolder="deliverables" GenerateALXFile="true"> | ||
<AlxFiles/> | ||
</Packaging> | ||
<HiddenProperties> | ||
<ClassProtection/> | ||
<PackageProtection/> | ||
</HiddenProperties> | ||
<AlternateEntryPoints/> | ||
</Properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# YouTube Client Sample | ||
|
||
This sample application was featured on our developer blog and included in the Knowledgebase. It shows how to use the Communication API in BlackBerry SDK 6.0 with the YouTube Data API to search for videos, read the XML data feed and extract data from it. | ||
|
||
The project can be imported with the BlackBerry Java Plugin for Eclipse. Once it has been imported, build it and run to test it on a simulator or device. | ||
|
||
The sample code for this application is Open Source under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html). | ||
|
||
**Applies To** | ||
|
||
* [BlackBerry Java SDK for Smartphones](http://us.blackberry.com/developers/javaappdev/) | ||
|
||
|
||
**Author(s)** | ||
|
||
* [Tim Windsor](https://github.com/timwindsor) | ||
|
||
|
||
**Dependencies** | ||
|
||
1. BlackBerry Java SDK 6.0.0 or higher required. | ||
2. Youtube Data API 2.0 | ||
|
||
|
||
|
||
**To contribute code to this repository you must be [signed up as an official contributor](http://blackberry.github.com/howToContribute.html).** | ||
|
||
|
||
## Contributing Changes | ||
|
||
Please see the [README](https://github.com/blackberry/Samples-for-Java) of the Samples-for-Java repository for instructions on how to add new Samples or make modifications to existing Samples. | ||
|
||
|
||
## Bug Reporting and Feature Requests | ||
|
||
If you find a bug in a Sample, or have an enhancement request, simply file an [Issue](https://github.com/blackberry/Samples-for-Java/issues) for the Sample and send a message (via github messages) to the Sample Author(s) to let them know that you have filed an [Issue](https://github.com/blackberry/Samples-for-Java/issues). | ||
|
||
|
||
## Disclaimer | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions
46
YouTube Client/src/com/blackberry/toolkit/sample/youtube/BitmapFieldButton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2011 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. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.blackberry.toolkit.sample.youtube; | ||
|
||
import net.rim.device.api.system.Bitmap; | ||
import net.rim.device.api.ui.UiApplication; | ||
import net.rim.device.api.ui.component.BitmapField; | ||
|
||
public class BitmapFieldButton extends BitmapField { | ||
|
||
private Runnable _commandAction; | ||
|
||
public BitmapFieldButton(Bitmap bitmap, long style) { | ||
super(bitmap, style); | ||
} | ||
|
||
protected boolean invokeAction(int action) { | ||
if (_commandAction != null) { | ||
UiApplication.getUiApplication().invokeLater(_commandAction); | ||
return true; | ||
} | ||
return super.invokeAction(action); | ||
} | ||
|
||
public void setCommandAction(Runnable commandAction) { | ||
_commandAction = commandAction; | ||
} | ||
|
||
public Runnable getCommandAction() { | ||
return _commandAction; | ||
} | ||
} |
Oops, something went wrong.