Skip to content
Browse files

Updated licensing and functionality.

  • Loading branch information...
1 parent ae942dd commit a6eadf41bf6cc37cdc7042b62b0b81d5483920d8 Erik Oros committed Dec 7, 2012
Showing with 142 additions and 43 deletions.
  1. +7 −5 bbm/LICENSE
  2. +33 −0 bbm/NOTICE
  3. +2 −0 bbm/config.xml
  4. +21 −4 bbm/index.html
  5. +44 −6 bbm/js/bbm.js
  6. +13 −28 bbm/menu.htm
  7. +22 −0 bbm/notes.htm
View
12 bbm/LICENSE
@@ -309,12 +309,14 @@
Subway Icons Set for RIM BB10 Dev Samples
=============================================================
- This is small Subway Icons Set released specially for RIM BB10 Dev Samples under CC BY 3.0 license.
-
- Included icons in three size - 81px, 71px and 61px
+ Subway Icons Set for RIM BB10 Dev Samples by Pixle is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
+
+ By downloading and using these files, you are agreeing to be bound by the
+ terms of the license corresponding to each package. If you do not agree to the terms of any of the enclosed licenses you must delete all copies of these files from your computer or computers.
+
+ Additionally, please provide a credit line and link back to my site at:
- Full set is available on Subway website:
- http://subway.pixle.pl/rim/
+ http://subway.pixle.pl/
Creative Commons Attribution 3.0 Unported
View
33 bbm/NOTICE
@@ -0,0 +1,33 @@
+=============================================================
+ Plastique Icons
+=============================================================
+
+ Plastique Icon Set by Iconify.it, LLC is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
+
+ By downloading and using these files, you are agreeing to be bound by the
+ terms of the license corresponding to each package. If you do not agree to the terms of any of the enclosed licenses you must delete all copies of these files from your computer or computers.
+
+ Additionally, please provide a credit line and link back to my site at:
+
+ http://iconify.it
+
+ I hope you find the files useful. If you would like to help support my work, you
+ can make a donation to my PayPal account - scott.catalyst@gmail.com
+
+ Thank You,
+ Scott Lewis
+ Iconify.it, LLC
+
+
+=============================================================
+ Subway Icons Set for RIM BB10 Dev Samples
+=============================================================
+
+ Subway Icons Set for RIM BB10 Dev Samples by Pixle is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.
+
+ By downloading and using these files, you are agreeing to be bound by the
+ terms of the license corresponding to each package. If you do not agree to the terms of any of the enclosed licenses you must delete all copies of these files from your computer or computers.
+
+ Additionally, please provide a credit line and link back to my site at:
+
+ http://subway.pixle.pl/
View
2 bbm/config.xml
@@ -27,6 +27,7 @@
<name>BBM APIs</name>
<author>Oros</author>
<content src="index.html"/>
+ <icon src="img/avatar-128x128.png" />
<!-- Required features for BBUI.js. -->
<feature id="blackberry.app" />
@@ -36,6 +37,7 @@
<!-- Additional features. -->
<feature id="blackberry.bbm.platform" />
<feature id="blackberry.invoke" />
+ <feature id="blackberry.invoke.card" />
<feature id="blackberry.system" />
<!-- Required permissions. -->
View
25 bbm/index.html
@@ -19,6 +19,7 @@
-->
<head>
+ <title>BBM APIs</title>
<link type="text/css" rel="stylesheet" href="./css/bbui-0.9.5.css" />
</head>
@@ -55,7 +56,7 @@
}, false);
/* Set Display Picture. */
- element.querySelector('#setdispla').addEventListener('click', function () {
+ element.querySelector('#setdisplay').addEventListener('click', function () {
if (bbm.registered === true) {
bbm.setDisplayPicture();
}
@@ -77,9 +78,14 @@
bbm.inviteToBBM();
}, false);
- /* Set Avatar. */
- element.querySelector('#setavatar').addEventListener('click', function () {
- bbm.setAvatar();
+ /* Set Avatar, local:// file. */
+ element.querySelector('#setavatarlocal').addEventListener('click', function () {
+ bbm.setAvatarLocal();
+ }, false);
+
+ /* Set Avatar, file:// file*/
+ element.querySelector('#setavatarshared').addEventListener('click', function () {
+ bbm.setAvatarShared();
}, false);
/* Start Chat. */
@@ -96,7 +102,18 @@
element.querySelector('#shareimg').addEventListener('click', function () {
bbm.shareImage();
}, false);
+
+ /************************************************/
+ /* Action bar. */
+ /************************************************/
+
+ /* Notes and Known Issues. */
+ element.querySelector('#notes').addEventListener('click', function () {
+ bb.pushScreen('notes.htm', 'notes');
+ }, false);
+
} else if (id === 'profile') {
+
/* Populate the profile. */
bbm.populate(element);
View
50 bbm/js/bbm.js
@@ -63,9 +63,9 @@ var bbm = {
},
/**
- * setAvatar: Invokes the avatar selector on the specified image.
+ * setAvatarLocal: Invokes the avatar selector on the specified local:// image.
*/
- setAvatar: function () {
+ setAvatarLocal: function () {
blackberry.invoke.invoke({
target: 'sys.bbm.imagehandler',
action: 'bb.action.SET',
@@ -74,6 +74,28 @@ var bbm = {
},
/**
+ * setAvatarShared: Invokes the avatar selector on the specified file:// image.
+ */
+ setAvatarShared: function () {
+ blackberry.invoke.card.invokeFilePicker({
+ mode: blackberry.invoke.card.FILEPICKER_MODE_PICKER,
+ type: [blackberry.invoke.card.FILEPICKER_TYPE_PICTURE, blackberry.invoke.card.FILEPICKER_TYPE_MUSIC]
+ }, function (path) {
+ blackberry.invoke.invoke({
+ target: 'sys.bbm.imagehandler',
+ action: 'bb.action.SET',
+ uri: 'file://' + path[0]
+ });
+ }, function (reason) {
+ /* Cancelled. */
+ console.log(reason);
+ }, function (error) {
+ /* Error. */
+ console.log(error);
+ });
+ },
+
+ /**
* startChat: Invokes a BBM chat with an existing BBM contact.
*
* Specifying a PIN that is not already in the user's contacts will result in the Invite To BBM screen.
@@ -102,12 +124,24 @@ var bbm = {
/**
* shareImage: Starts a chat session with attached image.
+ * Must be a file:// uri.
*/
shareImage: function () {
- blackberry.invoke.invoke({
- target: 'sys.bbm.sharehandler',
- action: 'bb.action.SHARE',
- uri: 'local:///img/avatar.png'
+ blackberry.invoke.card.invokeFilePicker({
+ mode: blackberry.invoke.card.FILEPICKER_MODE_PICKER,
+ type: [blackberry.invoke.card.FILEPICKER_TYPE_PICTURE, blackberry.invoke.card.FILEPICKER_TYPE_MUSIC]
+ }, function (path) {
+ blackberry.invoke.invoke({
+ target: 'sys.bbm.sharehandler',
+ action: 'bb.action.SHARE',
+ uri: 'file://' + path[0]
+ });
+ }, function (reason) {
+ /* Cancelled. */
+ console.log(reason);
+ }, function (error) {
+ /* Error. */
+ console.log(error);
});
},
@@ -138,13 +172,17 @@ var bbm = {
document.querySelector('#available').getChecked() === true ? 'available' : 'busy',
document.querySelector('#statusmessage').value,
function (accepted) {
+ /* Complete. */
+ console.log(accepted);
}
);
/* Update personal message. */
blackberry.bbm.platform.self.setPersonalMessage(
document.querySelector('#personalmessage').value,
function (accepted) {
+ /* Complete. */
+ console.log(accepted);
}
);
}
View
41 bbm/menu.htm
@@ -18,34 +18,19 @@
<div style="background-color: #202020" data-bb-type="screen">
<div data-bb-type="image-list">
<div data-bb-type="header">blackberry.bbm.platform</div>
- <div id="register" data-bb-type="item" data-bb-img="./img/Large/White/icon_127.png" data-bb-title="Register"></div>
- <div id="myprofile" data-bb-type="item" data-bb-img="./img/Large/White/icon_186.png" data-bb-title="My Profile"></div>
- <div id="setdispla" data-bb-type="item" data-bb-img="./img/Large/White/icon_273.png" data-bb-title="Set Display Picture"></div>
- <div id="invitedl" data-bb-type="item" data-bb-img="./img/Large/White/icon_194.png" data-bb-title="Invite to Download"></div>
+ <div id="register" data-bb-type="item" data-bb-img="./img/Large/White/icon_127.png" data-bb-title="Register" data-bb-accent-text="See Notes"></div>
+ <div id="myprofile" data-bb-type="item" data-bb-img="./img/Large/White/icon_186.png" data-bb-title="My Profile" data-bb-accent-text="See Notes"></div>
+ <div id="setdisplay" data-bb-type="item" data-bb-img="./img/Large/White/icon_273.png" data-bb-title="Set Display Picture" data-bb-accent-text="See Notes"></div>
+ <div id="invitedl" data-bb-type="item" data-bb-img="./img/Large/White/icon_194.png" data-bb-title="Invite to Download"></div>
<div data-bb-type="header">blackberry.invoke</div>
- <div id="invitebbm" data-bb-type="item" data-bb-img="./img/Large/White/icon_212.png" data-bb-title="Invite to BBM"></div>
- <div id="setavatar" data-bb-type="item" data-bb-img="./img/Large/White/icon_086.png" data-bb-title="Set Avatar"></div>
- <div id="startchat" data-bb-type="item" data-bb-img="./img/Large/White/icon_280.png" data-bb-title="Start Chat"></div>
- <div id="sharetext" data-bb-type="item" data-bb-img="./img/Large/White/icon_242.png" data-bb-title="Share Text"></div>
- <div id="shareimg" data-bb-type="item" data-bb-img="./img/Large/White/icon_209.png" data-bb-title="Share Image"></div>
- <div data-bb-type="header">Notes and Known Issues</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;">Registration must occur before any of the <b>blackberry.bbm.platform</b> functionality becomes available; working as intended.</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;"><b>Set Display Picture</b> is not properly initiating an update. As a workaround, the <b>Set Avatar</b> invocation can be used.</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;"><b>Start Chat</b> is not properly initating a chat when no URI is provided; expected to provide <b>Contact Picker</b>. As a workaround, <b>Share Text</b> can be invoked with an empty <b>data</b> property.</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;"><b>Start Chat</b> will invite the contact to BBM if the provided PIN <b>does not exist</b> in your <b>Contact List</b>; working as intended.</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;"><b>Start Chat</b> will immediately start a chat session if the provided PIN <b>exists</b> in your <b>Contact List</b>; working as intended.</div>
- </div>
- <div style="background-color: #202020" data-bb-type="round-panel">
- <div style="color: white;">There are currently some issues while saving modified <b>status</b> and <b>personal message</b> values.</div>
+ <div id="invitebbm" data-bb-type="item" data-bb-img="./img/Large/White/icon_212.png" data-bb-title="Invite to BBM"></div>
+ <div id="setavatarlocal" data-bb-type="item" data-bb-img="./img/Large/White/icon_086.png" data-bb-title="Set Avatar" data-bb-accent-text="local://"></div>
+ <div id="setavatarshared" data-bb-type="item" data-bb-img="./img/Large/White/icon_086.png" data-bb-title="Set Avatar" data-bb-accent-text="file://"></div>
+ <div id="startchat" data-bb-type="item" data-bb-img="./img/Large/White/icon_280.png" data-bb-title="Start Chat" data-bb-accent-text="See Notes"></div>
+ <div id="sharetext" data-bb-type="item" data-bb-img="./img/Large/White/icon_242.png" data-bb-title="Share Text"></div>
+ <div id="shareimg" data-bb-type="item" data-bb-img="./img/Large/White/icon_209.png" data-bb-title="Share Image" data-bb-accent-text="file://"></div>
</div>
+ <div data-bb-type="action-bar">
+ <div id="notes" data-bb-type="action" data-bb-style="button" data-bb-overflow="false" data-bb-img="./img/Large/White/icon_180.png">Notes</div>
+ </div>
</div>
View
22 bbm/notes.htm
@@ -0,0 +1,22 @@
+<div style="background-color: #202020" data-bb-type="screen">
+ <div data-bb-type="title" data-bb-caption="Notes and Known Issues"></div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;">Registration must occur before any of the <b>blackberry.bbm.platform</b> functionality becomes available; working as intended.</div>
+ </div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;">There are currently some issues while saving modified <b>status</b> and <b>personal message</b> values.</div>
+ </div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;"><b>Set Display Picture</b> is not properly initiating an update. As a workaround, the <b>Set Avatar</b> invocation can be used.</div>
+ </div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;"><b>Start Chat</b> is not properly initating a chat when no URI is provided; expected to provide <b>Contact Picker</b>. As a workaround, <b>Share Text</b> can be invoked with an empty <b>data</b> property.</div>
+ </div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;"><b>Start Chat</b> will invite the contact to BBM if the provided PIN <b>does not exist</b> in your <b>Contact List</b>; working as intended.</div>
+ </div>
+ <div style="background-color: #202020" data-bb-type="round-panel">
+ <div style="color: white;"><b>Start Chat</b> will immediately start a chat session if the provided PIN <b>exists</b> in your <b>Contact List</b>; working as intended.</div>
+ </div>
+ <div data-bb-type="action-bar" data-bb-back-caption="Back"></div>
+</div>

0 comments on commit a6eadf4

Please sign in to comment.
Something went wrong with that request. Please try again.