02-27-2013 06:31 PM - edited 02-27-2013 06:45 PM
I was wondering if anyone here has had experience porting a BB10 app written in cascades to webworks (for BB10) and then back-porting even further to BB 7.0 devices? If so, do you have any tips?
Also, would I have to use a different signing key/debug token combination? I'm still fairly new at publishing apps to BlackBerry World, so I'm not sure what route people usually take when creating apps for multiple versions of BlackBerry. I'm assuming it's usually the other way around (going from BB7 to BB10), and not what I'm trying to do right now. Haha!
FYI, language isn't an issue for me. I find both webworks and cascades fairly easy to understand and use. Reason I chose cascades was because I found the momentics ide really easy to work with compared to running scripts to build/deploy an app to a device if I'd gone with webworks initially.
03-01-2013 12:15 PM
It's fairly rare to go the approach that you are doing, but not unheard of.
When you go from WebWorks on BB10 to BB7, you'll find you may need to reduce the complexity of the content somewhat and you'll need to be careful of memory use as WebWorks apps have a lot less room to work with on BB7. Using bbUI.js, it will automatically scale some things back based on the device it's running on, and will use a look and feel that matches the device - so it's going to look a lot different on BB7.
Your debug tokens and keys will be the same for BlackBerry 10 WebWorks, and also for PlayBook WebWorks. BB7 uses a completely different set of keys. You'll need to request them from the signing key form.
You're probably aware of it, but WebWorks apps are debugged using WebInspector, which is different than what you would use in Cascades. And while you said you didn't like scripts for building and deploying, you may find the Ant Build Script useful to integrate with whatever IDE you want to use.
03-11-2013 04:05 AM
Thanks for the tips! I was planning to use bbUI.js for webworks, and at the moment, I'm actually planning to just keep using both cascades for bb10 and webworks for bb7 as well (as opposed to using webworks for both bb10 and 7).
I don't have too many UI elements in my app, so I don't think it'll be an issue maintaining both versions. Also, I want to add NFC support for my apps later and I think for BB10, there's no NFC api for webworks, only cascades.
Hmm... I'm still a bit confused about the signing keys, but I think I should just ask again in the BB World forum when the time comes. I guess I'm going to have to bundle the webworks and cascades versions separately anyway.
03-11-2013 09:33 AM
At the very least, I'd like to invoke my app and perform specific task(s) within the app depending on the payload stored inside a tag. (Although right now, I haven't decided what the actual payload is going to look like yet.)
Ideally, though, I'd also like my app to be able to write to an NFC tag directly, so other users can save/store app settings or commands by themselves using their own tags.
03-11-2013 09:38 AM
For tag reading and tag writing (via invoke), you can use this code; NDEF tag library
That library will let you parse or construct NDEF tags, with byte access to the payload or record structure.
The sharing/writing uses invoke - so you do jump out of your app for writing.
03-11-2013 09:57 AM
Oooh thanks!!!! Didn't realize there was an NDEF tag reader/writer library for webworks already.
By the way, when constructing NDEF tags, we'll still need to have a pre-formatted NDEF tag, though, right? Or will that library be able to write over an NFC tag regardless of the old formatting, assuming of course the tag type is supported by the device.
03-11-2013 10:09 AM - edited 03-11-2013 10:13 AM
Yeah - the tag needs to be supported, and (for the types where it matters) it needs to be pre-formatted. eg: DESFire...
But once your tag is formatted to appear as an NDEF tag - it'll happily read and write to and from it...