I'm still new to BlackBerry development but I am trying to find a way that if I have a WebWorks Application (Application A) and a native Application B, I would like to launch Application B with some data provided from Application A. Once Application B, it then needs to be able to pass some more data back to Application A.
I have started looking around and read through the blackberry.launch api
https://origin-bdsc.webapps.blackberry.com/html5/documentation/ww_webrefs/blackberry_launch_971534_1...
but from there I only see that you are able to launch specific applications.
Any advice here is appreciated.
Kind Regards,
Michael
If this is a real WebWorks applicaton, use blackberry.invoke.invoke with JavaArguments:
<script type="text/javascript">
var args = new blackberry.invoke.JavaArguments('net_rim_bb_memo_app');
blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args); // Java
</script>
EDIT:
I didn't read the part about passing data back to Application A. You'll either need:
Write a JavaScript Extension in Java to return data
Make the Application B write to the filesystem and have the webworks app read it.
Related
Trying to find information on how to implement deferred deep linking in electron app but can't find it in the official electron documentation.
We have an electronic application. I need the following behavior: when a user tries to open a link of this type -> custom-protocol: // some-data in the browser, if the application is not installed, then automatically download the application and, after installation, pass the parameters contained in the link (some-data) to the application. Can anyone suggest how to implement this in electronic or a link to the documentation or show some abstract example of implementation
On Windows, custom protocols are stored in the registry. This is a chicken and egg problem because your application already has to be installed on the system for the registry entry to exist.
If you rewrite your application as a UWP app (lol) you might be able to check with getInstalledRelatedApps to see if the app is already installed.
If you want to streamline how your application is installed from the web, consider using ClickOnce.
So basically you just want a way to pass some query params to your application when installed from your website.
You can do this if you package your electron application as an MSIX. Check out the article below from Microsoft, that documents the process:
Passing query params to an MSIX packaged app
I am working on automating a iOS app using Appium-Java.
While writing the Page objects we need to find identifiers (driver.findelement) or when UI changes.
Currently its tedious job, as manually need to traverse through till required screen & then write the selectors( n CSS / XPath / XCUnit based Xpath)
Currently, there's no easy way to test CSS selectors / XPath (unlike web where we can test it then & there on Firefox / chrome using browser add-ons)
Is there any way to invoke certain screen directly instead of traversing from the starting point in iOS/Android native app or Cordova based app, while writing the selectors?
Kindly advise. Thanks.
For a Cordova-based iOS app, you can use wd and wd-bridge to provide a mechanism to allow Appium to communicate directly with the Webview, enabling you to use CSS selectors.
This blog post gives a great tutorial on how to setup such a test environment using Protractor/Jasmine.
You can then write Protractor tests which allow you to reference your app UI elements as HTML components, e.g.:
describe('Testing the app', function () {
it('01. should have a header', function () {
var header = element(by.id('header'));
expect(header.getAttribute('class')).toContain('toolbar');
});
});
Is there a way to easily distribute an electron.atom.io app as a static site?
I don't need all the functionality, I just want to allow the client to view the latest updates.
-- edit --
Perhaps a better way to ask the question is; "How do I build a web app that can be hosted online and run on electron with minimum rewriting" - similar to the Slack app that works the same way on web or electron app.
As long as your main use of Electron is to create a 'native browser wrapper' for a web-app this is entirely possible.
You will have to implement a check if your application is running inside a browser or inside Electron and wrap your electron specific code in it:
if (window && window.process && process.versions['electron']) {
const {BrowserWindow} = require('electron').remote
}
You'll probably have to step through your application and disable Electron specific functionality at multiple places.
You have other options to do a long distance demo of an Electron app
Electron is basically a shell to run node.js apps on the desktop. This means if you want to move it to the web, you have to give up all the Electron APIs that access the local system and you're left with a basic node.js app, which is most likely not desirable.
To demo your desktop app to an off-site client, you can either make a presentation with screenshots detailing the current user flow, or compile a sandboxed demo version of your app and send it over to them.
Screen presentation
This is your quickest and easiest solution if your client just wants to be kept in the loop and see some eye candy. You can just record how the app works with some example data, add some written or audio explanation to it, and let them enjoy the smooth ride.
Build a demo
If your client wants to actually have a hands-on demo with the app, you need to have some form of basic code distribution. The cleanest way to do this would be to tie up all loose ends in your current app flows, block all unfinished roads in it and compile it for whatever platform your client requested the demo for.
Take a look at the electron-packager and electron-builder docs to get an idea how to build an .exe, .dmg or whatever file from your Electron app, then send that file to them with some basic instructions.
i am develop a application based on log in and log out for my students. when my user logged in, the start up application will be load. during the start up!
My Question : all my desktop icon and other application should be disabled when my start up application load.Any one suggested me i really owe to you guys.
What language are you using? Here is an example of C#:
How to hide desktop icons programatically?
anyway you can use the windows API with C# or C++ don't know about java. Try and see if it works.
public BrowserFieldDemoScreen()
{
BrowserField mybroBrowserField=new BrowserField();
add(mybroBrowserField);
mybroBrowserField.displayContent("
<html><body><h1>hello world! This blackbery apps
</h1></body></html>", "http://localhost");
}
I'm new in Blackberry application development, I have load html in browser and I have write code for that it works perfectly for more than OS version 5.
But I have create app for 4.6.1.310 model number 8900 not working giveing some uncaught Exception. Please tell me what I have to change so that it should work on 4.6.1.310 version also,
You cannot use BrowserField class below Blackberry OS 5.0
Before running application go through sdk docs.
The BlackBerry Facebook SDK was written to use embedded browser functionality, before (5.0) BrowserField was available. I believe that code is free to use and modify to your needs.
see the project here
Look in the sample code (scroll down the page) at his LoginScreen class.
You should be able to modify that class to serve your purposes. This particular class, of course, has a hardcoded URL that points to Facebook. You will obviously change that to accept whatever URLs you like, and remove other references to facebook classes you don't need. You will definitely need more than just the LoginScreen class, but all its dependencies should be available on that site.
Post a comment if there's any problems getting this to work. I have some other legacy code that does this successfully, but I'm not free to post it ... but quickly looking at the Baskoro code I linked to appears like it does basically the same thing.