Skip to content

Commit

Permalink
added Bada and fixed readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengill committed Apr 28, 2011
1 parent 31aa420 commit 514b7cb
Show file tree
Hide file tree
Showing 71 changed files with 10,421 additions and 2 deletions.
Binary file added Bada/Icons/PhoneGap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Bada/Icons/Splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions Bada/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
PhoneGap is available under *either* the terms of the modified BSD license *or* the
MIT License (2008). As a recipient of PhonegGap, you may choose which
license to receive this code under (except as noted in per-module LICENSE
files). Some modules may not be the copyright of Nitobi. These
modules contain explicit declarations of copyright in both the LICENSE files in
the directories in which they reside and in the code itself. No external
contributions are allowed under licenses which are fundamentally incompatible
with the MIT or BSD licenses that PhoneGap is distributed under.

The text of the MIT and BSD licenses is reproduced below.

-------------------------------------------------------------------------------
The "New" BSD License:
**********************

Copyright (c) 2005-2010, Nitobi Software Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Phonegap/Nitobi nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------
The MIT License
*****************

Copyright (c) <2010> <Nitobi Software Inc., et. al., >

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

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.
45 changes: 45 additions & 0 deletions Bada/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
PhoneGap implementation for Samsung Bada
========================================

Support for: Acceleration, Geolocation (native and browser), Network, Device, Compass

Missing support: Camera, File

Steps to build a PhoneGap app
-----------------------------
1. Download Source Code (clone the repository)
2. Import in bada C++ IDE
3. Put your HTML/CSS files in the Res/ folder
4. Build&Run!

Runnning in the simulator
-------------------------

1. Right click on your project and select Build Configuration => Set Active => Simulator Debug in the Bada IDE
2. Build&Run

Running on a target device
--------------------------

1. Follow [instructions](http://bit.ly/dK44XJ)
2. Generate a new app on developer.bada.com, download the manifest.xml file and put it in the root dir of your app (overwritting the existing one).
3. Right click on your project and select Build configuration => Set Active => Target Debug in the Bada IDE
4. Build&Run

Known Issues with target devices:
=================================

### Issue 1
Console shows ERROR and app doesn't install and run

Install [Samsung Kies](http://bit.ly/hERlsu) that somehow updates the drivers and makes it magically work.

### Issue 2
Target already launched
Make sure it is not already launched :) Click on console and press the red square and/or quit the app from the phone
If it is but you still get the error message, close and restart the Bada IDE.

### KNOWN ISSUE
alerts in callbacks freeze the application. DO NOT USE ALERT DIALOGS IN YOUR CALLBACKS

Happy Coding!
5 changes: 5 additions & 0 deletions Bada/Res/eng-GB.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
This XML file was automatically generated by UiBuilder - do not modify by hand.
-->
<string_table Bversion="1.2.1.v20101224" Dversion="20100701"/>
87 changes: 87 additions & 0 deletions Bada/Res/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>PhoneGap Test App</title>
<style type="text/css">
div { text-align: "center"; display: "block"}
</style>
</head>
<body>
<h2>PhoneGap Sample</h2>
<ul id="debuglist">Debug Output</ul>
<!-- Camera -->
<h3>Camera</h3>
<div>
<input onclick="getPicture()" type="submit" value="Camera.getPicture">
<img src="" id="picture" width="128">
</div>
<!-- Geolocation -->
<div>
<h3>Geolocation</h3>
<input onclick="getCurrentPosition()" type="submit" value="GeoLocation.GetLastKnownLocation">
<input onclick="toggleWatchPosition(this)" type="submit" value="GeoLocation.StartWatching">
<div id="geolocation" style="display:none;">
altitude: 0,longitude: 0, altitude: 0
</div>
</div>
<!-- Accelerometer -->
<div>
<h3>Accelerometer</h3>
<input onclick="getCurrentAcceleration()" type="submit" value="Accelerometer.getCurrentAcceleration">
<input onclick="toggleStartAcceleration(this)" type="submit" value="Accelerometer.watchAcceleration">
<div id="accelerometer" style="display:none;">
x: 0, y: 0, z: 0, timestamp: 0
</div>
</div>
<!-- Compass -->
<h3>Compass</h3>
<div>
<input onclick="getCurrentHeading()" type="submit" value="Compass.getCurrentHeading">
<input onclick="toggleStartCompass(this)" type="submit" value="Compass.watchHeading">
<div id="compass" style="display:none;">
x: 0, y: 0, z: 0, timestamp: 0
</div>
</div>
<!-- Network -->
<div>
<h3>Network</h3>
<input onclick="hostIsReachable('http://phonegap.com')" type="submit" value="Network.isReachable">
<div id="network" style="display:none;">
Network Information
</div>
</div>
<div>
<!-- Device -->
<div>
<h3>Device</h3>
<input onclick="getSystemInfo()" type="submit" value="Device.GetSystemInfo">
<div id="system" style="display:none;">
System Information
</div>
</div>
<!-- DebugConsole -->
<div>
<h3>DebugConsole</h3>
<input type="text" id="log_statement" />
<input onclick="Log()" type="submit" value="console.log">
</div>
<!-- Contact -->
<h3>Contact</h3>
<div>
<input onclick="createContact()" type="submit" value="Contact.create">
<input onclick="saveContact()" type="submit" value="Contact.save">
<input onclick="findContact()" type="submit" value="Contact.find">
<input onclick="removeContacts()" type="submit" value="Contact.remove">
</div>
<!-- Notification -->
<h3>Notification</h3>
<div>
<input onclick="notificationAlert()" type="submit" value="Notification.alert">
<input onclick="notificationConfirm()" type="submit" value="Notification.confirm">
<input onclick="notificationVibrate()" type="submit" value="Notification.vibrate">
<input onclick="notificationBeep()" type="submit" value="Notification.beep">
</div>
</body>
<script type="text/javascript" src="phonegap/phonegap.js"></script>
<script type="text/javascript" src="main.js"></script>
</html>
Loading

0 comments on commit 514b7cb

Please sign in to comment.