blackberry / bb10-webworks-samples Goto Github PK
View Code? Open in Web Editor NEWWebWorks Samples for the BlackBerry 10 Platform
License: Apache License 2.0
WebWorks Samples for the BlackBerry 10 Platform
License: Apache License 2.0
When the following is executed, "Error 500 The server is experiencing technical difficulties" is displayed instead of a Facebook login page:
var url = 'https://www.facebook.com/dialog/oauth?client_id=' + facebookOptions.clientId + '&redirect_uri=' + facebookOptions.redirectUri + '&scope=publish_stream,read_stream';
childWindow = window.open(url, '_blank');
It used to work. I am now testing in BlackBerry 10 Dev Alpha Simulator BB10_0_10.261.
I am not sure if it's a temporary glitch at Facebook or they have changed something that it no longer likes the HTTP request sent from BB10 to it. I have tried to invoke the same URL in the BB10 browser with the same 500 error.
There is a missing <"html"> tags in "fileTransfer" Sample app in below files :
fileUpload.html ,fileDownload.html, index.html, xhr2.html . This should be fix it in order to follow "html5 W3C spec" standard.
I tried the setwallpaper sample app, it says "wallpaper changed!" but it doesn't actually change the home screen wallpaper !
any suggestions ?
Well, I have started with WebWorks in the lasts days and I'm learning how to use the bbUI.js . In trying make a screen transition with bb.pushScreen() and it doesn't work, I've this error:
https://dl.dropboxusercontent.com/u/85402777/screen5.png
When I click in the arrow that is a button for another screen this error is shown, well, I can't find the problem. Can someone help me, please?
To call the new screen I'm using:
onclick="bb.pushScreen('secondScreen.html', 'secondScreen');"
In the arrow div
Hi,
I'm trying to get access token from Facebook, with following the procedure mentioned in FaceBook-OAuth-2. Getting 'authcode' successfully after that unable to perform Ajax with following url,
'https://graph.facebook.com/oauth/access_token?client_id=' + facebookOptions.clientId + '&redirect_uri=' + facebookOptions.redirectUri + '&client_secret=' + facebookOptions.clientSecret + '&code=' + authCode'.
Getting Error getting access_token: alert.(calling Ajax Error function).
Hi @ctetreault , the last example works great and i already success with my app, very nice...
Now, i wish to ask for a logout method, do You know how to close the session ?
because, appear the webkit open they own session, then if you close the app, open the web navigator and logout to facebook (if you already login previously, of course) this is a separate session of the app, when You open the app again and request to facebook they link directly, until now is all ok, but if You wish to change the user?
I open a window inside the app with the facebook address and yes the session is open , so i logout (inside the app with this window) and so the login screen reapear.
Will be great to know a method to logout via OAuth without any additional window. :)
Thanks Chad !
The file:// protocol has an extra space at the end of it : "file:// "
https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/fileTransfer/app/xhr2.html#L61
WebWorks example "pimcalendar" is not working properly after changing bbui to version 0.9.6, option Find Events. After entering any search info and pressing button Search nothing really happens, the app stays on the same screen (findEvents), findResult screen is never displayed. When pressing the Back button there is an empty findEvents screen.
I followed the instructions and set up the redirect script on my server. I am able to go past successfully requesting a token, but when i am redirected to the facebook login screen I get a popup window which says: "Access to "http://facebook.techadvantage.ca/redirect.php?code=AQBHnO3CJpOo...._=_" not allowed "
In extending the Maps sample I found a leaflet rendering problem with polylines that the Leaflet team has closed as a BB10 issue:
From the original bug, polylines look like this on the Dev Alpha C:
I am trying to build a project using blackberry10 platform for cordova 3.2.0
. I think it is using this project internally, so I thought maybe you would have some clue what this error is about.
How can I debug this issue and figure out what is causing the build to fail?
$ cordova build
Generating config.xml from defaults for platform "android"
Preparing android project
Generating config.xml from defaults for platform "blackberry10"
Preparing blackberry10 project
Compiling app on platform "android" via command "/home/zooby/Projects/Email2MobileApps/cordovaBuild/platforms/android/cordova/build"
Compiling app on platform "blackberry10" via command "/home/zooby/Projects/Email2MobileApps/cordovaBuild/platforms/blackberry10/cordova/build"
[Error: An error occurred while building the blackberry10 project.[ERROR] Native Packager exception occurred
[ERROR] Native Packager exception occurred
An error has occurred
]
I am using Ubuntu Linux with 64bit. I have installed blackberry SDK and momentus IDE and the emulator is running as well. I can compile and run apps directly from the IDE, so I am guessing the above error has to do with my configurations, but I am not sure what is wrong or how to identify it.
Im using pimcalendar on bb10 and successful create an event and get their id, then, how can i invoke the calendar with this id to open the event? Thx
Hi, im using the invoker example to test invoke app, and in the object i receive this data onInvokedInfo.data: "SGVsbG8sIEkgaW52b2tlZCB5b3U="
in place of data: "Hello, I invoked you"
last DevAlpha update
Thanks
cc @ctetreault
The actionbar menu will not work when loaded in with
$('#footer').load('includes/footer.html');
Hi, may be @ctetreault Chad can figure out why I receive this in place of login and authorization... Im using the new invocation card from the new example (and isn't send any callback uri there) (and the uri on the foursquare app page is correct and working with REST)...
may be another limitation of my Dev Alpha A ?
The README files are telling us to send a private message (via github messages) to the sample author(s) if we've filed a new issue:
Bug Reporting and Feature Requests
If you find a bug in a Sample, or have an enhancement request, simply file an Issue 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.
But private messaging has been removed about a year ago:
Private Messaging
The Fork Queue was a stepping stone towards a bigger and better feature. Private Messaging, however, was a step backwards: nobody wants another inbox. And a sub-par one, at that. Email is still the best way to contact someone.
Today we're removing Private Messaging from GitHub. If you want people to contact you, please provide a public email address for your profile.
I have tried the demo on Blackberry Z10 with BBOS 10.2.1.3062, version STL100-2 and I cannot open a pdf into Acrobat reader. It's always displaying INVOCATION_BAD_REQUEST_ERROR.
Hi,
in the EXIF-Data-Reader sample the index.html wants to add the script "js/lib/canvas2blob.js". It does not exist :)
Cheers,
bert
Sorry if this is not the right channel to ask for help, but I am not able to find any working examples or get help about this issue. I am trying to run my cordova app for blackberry. The app now builds and starts in the simulator, however cross origin XHR calls fail right away. I put more details about my particular issue here: http://stackoverflow.com/q/20506440/527559
But this makes me believe that cross origin XHR is completely broken in phonegap 3.2+blackberry10. This is a pretty big deal, because many apps need this permission to run. I am hoping you can point me to a working example or provide some advice.
I'm not sure if it is intentional or not, but if you don't have buttonText in the toast options, then the dismissCallback is not called.
This example works fine,
var toastId = blackberry.ui.toast.show('text', {
timeout : 20000,
buttonText : 'button',
buttonCallback : function() {
alert('hey');
},
dismissCallback : function() {
alert('hiya');
}
})
but this example does nothing on dismiss:
var toastId = blackberry.ui.toast.show('text', {
timeout : 20000,
dismissCallback : function() {
alert('hiya');
}
})
Hi Team,
I am trying to implement push notification with BES10 for Webworks App.
For implementing push notification, i am using https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/pushCapture demo app.
After installing app in BB Z10 device. Doing below steps
I am not able to understand, i am selecting BES (Enterprise / BDS) not BIS. Then why i am receiving PPG error.
Thanks,
Nirav
The pushCapture example is trying to load a file that doesn't exist.
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:9910/pushCapture/Scripts/webworks-1.0.1.8.js
pushCapture sample:
in line 121 and 125 should it not be .setChecked(true); instead of .setChecked();
Hi,
I am trying to download an image from an URL to the shared path on the device using FileTransfer. This results in Error code 4 "Permission error'. As per the API documentation it is not required to specify any permission but not understanding what kind of permission it is asking for. Please find the code below.
I have added the filetransfer feature in config.xml.
try {
blackberry.io.filetransfer.download(
obj.results.resultsList.item[0].images.image,
blackberry.io.sharedFolder + "/downloads/1.jpg",
function (result) {
alert("Download successful");
alert("fullPath: " + result.fullPath);
},
function (result) {
alert("Download failed");
alert("Error code: " + result.code);
alert("HTTP status: " + result.http_status);
alert("Source: " + result.source);
alert("Target: " + result.target);
});
}
catch(e) {
alert("Exception in download: " + e);
}
Please provide some help to achieve this.
Thanks in advance.
Samples need to be updated to add a listener for 'webworksready' after the load event is received, to ensure they work properly on later 10.1 and 10.2 OS builds. The following samples add a listener for 'webworksready' without guaranteeing the document has loaded. The result is typically a white screen.
To be updated:
Hi, any of you has already probe the new function window.open that suppouse to open in a card?
I done, if i invoke window.open ('uri') in a direct call from, for example, in an onclick works fine, but in a callback function don't ... in the inspector appear to successful ocurrs but still open on background and we can't see it...
Additionally, I can't understand how or where to use target='_blank'
Regards
On pushClient.js
Line 38 appears:
'ppgUrl': 'http://cp@@@@.pushapi.eval.blackberry.com'
correct is:
'ppgUrl': 'http://pushapi.eval.blackberry.com'
Line 196 appears:
if (pushClient.PushService) {
correct is:
if (pushClient.pushService) {
Reported by developer:
"In the map sample, if you add a title to the screen, and run it in the simulator, the app crashes and the whole screen is painted black. I can't confirm that it happens on the dev alpha"
https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Maps
[ ] confirmation required
Now that we've published the new boilerplates, can we deprecate the old one here? https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Built-For-BlackBerry
Hi,
Is there anyway to use invoke card or invoke to view external files such as pdf without having to download it?
I'm trying to use child web view, but when it encounters pdf files, it just shows blank.
Can one combine child web view with invoke card ?
Thanks!
Hi, i receive...
Error code: 1
Source: file:///accounts/1000/shared/photos/Simple.jpg
Target: http://www.gipegasus.com.ar/simple/uploadimg.php
HTTP Status: undefined
In the example i saw that php extension was omitted on target, why?
Ive write all exactly the example except that extension. (If I commit via my form all work)
blackberry.io.filetransfer.upload(img, "http://www.gipegasus.com.ar/simple/uploadimg.php", uploadSuccess, uploadError, options);
Thanks
The toast disappears so quickly that anything longer than 2 words is unreadable. Certainly the button version does not give enough time for somebody to click on it unless the user has the reflexes of a cat :).
Are there settings available to lengthen the time that the toast appears for? I'm not quite sure I understand the purpose of the toast implementation in applications.
The following error message was generated when trying to save the configuration with "enterprise/bds" selected and the "subscribe"- and "launch" checkboxes deselected: "Error: An internal error occurred while calling blackberry.push.pushservice.create. Try restarting the application."
The public push permission had already been removed.
I was following all the instructions on setting up a push enabled application using the sample code from the bb10 sample git repository. I got push server evaluation credentials and I went to set up the application. I typed in all the settings (Public/BIS, disabled subscribe) and the error message I receive is "An internal error occurred calling blackberry.push.PushService.create. Try restarting the application". I get this error every time. The APIs do not have any additional info for the error code returned (blackberry.push.PushService.INTERNAL_ERROR). I could not find any reference to this online.
Possible causes:
Thanks,
Nick
The WebWorks Weather sample makes calls to the 1.0/2.0 version of the Window Covers API and has not been updated to the new 2.1 method calls. If you run it against the newer plugin, you get a black screen, and the console shows an error message.
Problem lines are here: https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/WebWorksWeather/www/js/init.js#L150-L166
On disappear toast, dont call te dissmissCallback function
https://github.com/blackberry/BB10-WebWorks-Samples/blob/master/Toast/js/app.js#L50
@erikj54
< content src > tag points to index.htm, should be index.html
Please can you help update the Facebook and Twitter OAuth samples to work in Webworks SDK 2.2.
When i try to run it, Childbrowser opens but does not load the web page and returns an error
Hi there, a request: can you create an example of using the NFC or port the NFC Tool example from Cascades? Would be very helpful. Maybe in the next Webcast it could be part of and explained together with the difference between Device code signing keys and NFC keys to access the Secure Element.
I followed the instructions to build the WebWorksWeather. It's installed on my Z30. Once I open it, the splash screen is showing ok, but then it went to a blank black screen, and nothing else is showing. What am I missing here?
We discovered an issue with the Localization Sample, where the home screen icon is not being updated when the user changes the language in the setting. The application name is changing according to the locale of the device, but the icon is not updating. The issue has been raised and filed and the team is looking in to it. We will provide with a resolution as soon as we can.
Previous technique to redirecting to local:///index.html doesn't work with the new SDK:
From Web Inspector, we got an error message:
Not allowed to load local resource: local:///index.html
Is it still possible with the Gold SDK?
The following whitelisting doesn't seem to fix it:
<access uri="local://" subdomains="true" />
What he ^ said
I already have apps build using cordova. Recently I tried adding blackberry10 platform as per customer request. I got a lot of very unhelpful errors, I will open another ticket for that. But I am mostly wondering why BB is working on a separate project instead of just contributing to the cordova blackberry10 platform and making sure it works?
the examples Notify not work correctly and it not create the notification on BlackBerry Hub.
https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/notify
My application i tried to convert from webworks 1.0 to webworks 2.0 also have this issue.
Please help!
Could we create an example extension that invokes the MAPS application and passes it a valid rim mime type: application/vnd.rim.map.action-v1
I did some research into it, as well as created an example in the forums here: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Webworks-BB10-Invoke-Maps-w-directions/m-p/2036267/highlight/false#M32135
I got the format through the wikis.rim.net. Seems strange to hide this information from developers. Topics that might be useful:
Some of us are having problems with the navigator.geolocation.getCurrentPosition in Webworks for BB10 Gold Edition as it does not trigger either the success or fail callbacks. Please also read this as other developer are encountering the same issues:
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Geolocation-always-times-out/td-p/2020591/highlight/true
Here is the code I'm using that never triggers either callbacks:
var gpsOptions = {enableHighAccuracy:true, timeout: 1000, maximumAge:300000}
if(navigator.geolocation!==null){
if(debug==true) console.log("GPS API found. Getting GPS coordinates");
navigator.geolocation.getCurrentPosition(myGPS.updateGPSCallbackSuccess, myGPS.updateGPSCallbackFailed, gpsOptions); // CODE NEVER EXECUTES EITHER SUCCESS OR FAIL CALLBACKS!
}
Also tweak to use getSensors list, and change options on the fly.
Hi, I'm trying to use the windowcovers sample but it doesn't appear to be working. I get a white screen, not like the screenshots. I have a feeling I'm missing something fundamental. Should I be able to clone this git repo, build WindowsCovers and deploy without any modification?
I see there are three html files, index, app and setLabel, but a quite look through the code I don't see where app or set get called. Also body is empty.
Advice please? I'm looking to get this working for my app. Thanks.
Hi @ctetreault do you know if it is possible to cache the Google Maps API?
It's very slow to load and I haven't found a way to load it async. Can you help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.