Installing Target Bar file in Blackberry 10 alpha Simulator - blackberry-simulator

I have question w.r.t BB10 BAR file installation in Alpha Simulator.
I created a blackberry 10 casecade application on QNX Momentics IDE. Application works fine on Blackberry 10 alpha simulator when i use the 'Simulator-Debug' mode.
I also created BAR file using 'Export Release Build' wizard from bar-descriptor.xml. BAR created successfully. Later i cleaned up BB 10 alpha simulator and able to install the bar file using vnBB10 tool. It works great.
The question here is Why the app is not running in the BB 10 Simulator When i create a BAR file using 'Device-Release' mode and signed the BAR? (Actually speaking, i installed the device-release BAR file in Simulator. I can see application icon & Splash screen. it also shows the Blackberry permissions window. But after that it stopped abruptly. There was no logs to explore)
-> do you think 'Device-Release' Bar is only made for BB 10(Z10/Q10/Playbook) devices? not for Simulators ?
-> How can i create a single BAR which can run on both BB 10 Device & Simulator?
I really appreciate you for looking into this query.
~albeee~

Device-Release and Device-Debug will build arm binaries while Simulator-Debug will build x86 binaries. Essentially, the processor between real device and simulators are completely different and you need to tell the cross compiler which architecture you are targeting. That's why Device-Release/Device-Debug will never run on the simulator and why Simulator-Debug will never run on a real device.
There might be a way to package both architectures in one bar, but why would you want to? The simulator doesn't require signed bars and is only for development.

Related

WebkitGtk application is not loading file URL

I am building a kiosk application using webkitgtk on the raspberry pi 4.
This application will not be connected to the internet and all the html,css, javascript for the UI are all located on the local filesystem.
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
I have enabled all the packages needed to get webkitgtk running.
Also, the kiosk application has been tested on my desktop, using the same software stack and it works
However, when i try to launch the application on the raspberry pi, a blank page pops up. I have played around with the WebKitWebSettings object associated with my WebKitWebView by enabling local file access. It still shows up a blank screen.
Also included in my pi4 application bundle is a simple gtk3+ application. This launches successfully!
I will really appreciate some pointers as to why this is happening as i have sort of reached a dead end
UPDATE
I enabled the MiniBrowser app that comes with the Webkitgtk package.
Entering the local url, The page does not load. It only gives me a message at the top saying "Successfully downloaded".
It seems to be treating my input as a download
UPDATE 2
After some more experimenting, i was finally able to get webkitgtk working on the pi 4.
The problem seems to originate from using the webkit_web_view_load_uri() api.
It does not seem to recognize my html document as a web page.
I got around it using the webkit_web_view_load_html() call. This included some hacks by first reading in the contents of the html doc into a character buffer, and passing it to webkit_web_view_load_html().
You also have to provide a base path to this function call to be able to resolve all the urls (scripts, css, images etc) in your html document.
Another problem i haven't been able to work around is, SVG images are not loading in webkitgtk. I have used jpg formats and they work. I suspect this my be due to a configuration switch in building webkigtk
It's hard for me to figure out what might be happening without having access to your environment and settings. My gut feeling is that pages are showing blank because perhaps some shared libraries are missing. You can check that with:
$ ldd WebKitBuild/GTK/Release/bin/MiniBrowser
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
There's a buildroot repository for building WPE for RPi. WPE (WebPlatform for Embeded) is like WebKitGTK but doesn't depend on GTK toolkit. Another important difference is that WPE runs natively on Wayland.
If you're interested in having a webapp embedded in a browser running in a device with limited capabilities, WPE is a better choice than WebKitGTK. The buildroot repo for building WPE for RPi is here:
https://github.com/WebPlatformForEmbedded/buildroot
There's is also this very interesting step-by-step guide on how to build WPE for RPi3:
https://samdecrock.medium.com/building-wpe-webkit-for-raspberry-pi-3-cdbd7b5cb362
I'm not sure whether the buildroot recipe would work for RPi4. It seems to work for all previous versions, so you might be stepping in new land if you try to build WPE on RPi4.
If you have an RPi3 available I'd try to build WPE for RPi3 first, and make sure that works. Then try for RPi4.

How do I run a CodenameOne program on an iPhone?

I successfully ran the CodenameOne HelloWorld program on the simulator with the IntelliJ IDEA compiler on Windows 10. How do I run the program on my iPhone SE?
You need to "Send a Build" as is shown (for Android) in this video: https://www.youtube.com/watch?v=oR3KHYf5OrY&feature=emb_logo (starts at 2:29).
You just right click the project, select "Codename One" and select to send an iOS development build.
But this won't work. As explained a bit later in the same video you need one more thing and that's a certificate from Apple. Apple requires that all iOS apps are signed with a valid certificate even if they're running on your own phone. So you must have a valid iOS developer account and you can generate a certificate/provisioning profile for the phone. We have a simplified wizard in Codename One to generate both without requiring a Mac (which is normally a requirement).

App doesn't work on iPhone 4S

I have an iOS application codename One, which is running in normally iPhone 5 and 6, which use the iOS operating system version 10.
However, that my app is not working on iPhone 4 and 4s, which use the iOS operating system 9.
Any idea what might be happening?
Thanks in advance.
Apps should work fine all the way back to OS 6.0 without a problem (Apple made the cutoff of 6.0 mandatory).
I'm guessing you failed at the install stage which could mean one of the following:
Missing or incorrect UDID setting - if you got the device UDID from an app it's probably incorrect if it's not in the provisioning well... it's missing.
Previously installed app with the same package/id either from the appstore or a previous build with a difference certificate
Parental control settings or corporate restriction limiting installs
Apple OTA install bug - the workaround for this is simple, connect the device with a cable and try to install the IPA thru itunes. Sometimes it starts working OTA after doing this once (FYI: OTA == Over the air)

Smartphone browser emulator

Im trying to test my website on different kind of devices, for example iphone, tablets or androids. The problem is i do not have access to all of those devices and every so called online emulator doesnt really emulate anything else besides resolution.
So say iphone related issue doesnt appear on my computer.
My question would be whats the best paid or free service that would provide me the tools needed to test my website on as many different devices as possible?
Just to name a few so far i tried:
http://mobiletest.me/
http://www.mobilephoneemulator.com/
http://www.brickandmobile.com/mobile-emulator/
None of them displayed same issues that im having on the actuall device.
For Android, you can install the SDK, which includes a device emulator that runs Android in (basically) a virtual machine. This virtualized copy of Android includes the browser, so you can use it for testing your site. You can create virtual Android devices with a variety of screen sizes, so you can test your design on both phones and tablets.
Note that if you want decent performance from the emulator, you should configure it to run an x86 system image (as opposed to ARM), and install the HAXM add-on (available through the SDK manager app) that enables the emulator to use your processor's virtualization support. This allows the emulator to run the Android system directly on your real processor, instead of having to emulate a processor. You should also enable the "use host GPU" option so that graphics in the emulated Android device can be hardware-accelerated instead of rendered in software.

How to modify the TI SensorTag Firmware to advertise indefinitely?

When the side button of the TI SensorTag is pressed, pairing with a device is possible for approx. 2-3 minutes. How do you modify the SensorTag's firmware so that it advertises forever and pressing the side button is not necessary every time?
And how do you upload the firmware with an iOS device, so without using CC-debugger?
How I did it, with help of Chris Innanen (thanks!!)
You will need a Windows virtual machine if you do it on a Mac.
Download IAR Embedded Workbench for 8051 (http://supp.iar.com/Download/SW/?item=EW8051-EVAL). Make sure to take the 30-day evaluation copy and not the 4k limited.
Download BLE-STACK from Texas Instruments (http://www.ti.com/tool/ble-stack) and install it on a Windows (virtual) machine. By default, the installer will install here: "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\SensorTag.eww".
Open this SensorTag.eww file with IAR Embedded Workbench.
Select "CK2541DK-Sensor-OAD-ImgA" in the dropdown menu in the "workspace" section on the left
To prevent a compiling error later on: go to Project -> Options... and change the value for "Number of virtual registers" from 16 to 8.
Find "SensorTag.c" in the filetree in the workspace section on the left: "SensorTag - CK2541DK-Sensor-OAD-ImgA/APP/SensorTag.c"
Search for GAP_ADTYPE_FLAGS_LIMITED and change it to GAP_ADTYPE_FLAGS_GENERAL to enable indefinit advertising
Make the build with Project -> Make. Wait until it's done
By default, the new firmware image (.bin file) is now in "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\CC2541DK-Sensor-OAD-ImgA\Exe" (Make sure to place it somewhere you can reach it from Mac OS X later, if you use a virtual machine)
Repeat steps 4 to 10, but now for "CC2541DK-Sensor-OAD-ImgB"
Now get the app to upload the new firmware over the air. Get it here: https://itunes.apple.com/us/app/ti-sensortag/id552918064?mt=8
Open iTunes in Mac OS X and open your iOS device, go to the 'Apps' section, scroll to the bottom to see the apps with filesharing possibilities. "SensorTag" should be in that list. Click on it and add the two new firmware files, both Image A and B.
If that's done, open the SensorTag app on your iOS device and connect it to the SensorTag. Then in the bottom of the app tap "Update FW" -> "Select FW file" -> Shared Files > And then tap Image B and upload it. It takes a few minutes. A firmware with type A is already on your SensorTag by default. Because you've put a B Image on it just now, with any new changes you would need to upload an Image A.
Good luck!
Additional: changing the signal strength
1) Find "HCI_EXT_ClkDivOnHaltCmd" and you'll add a new line (and optional comment) after it:
// ADDITION Adjust TX power level
HCI_EXT_SetTxPowerCmd( HCI_EXT_TX_POWER_0_DBM );
1b) You can change "_0_DBM" to "_4_DBM" or "_MINUS_6_DBM" or "_MINUS_23_DBM" as well
2) Find "GAP_ADTYPE_POWER_LEVEL" and change the value on the next line to match the above power level
The above solution didn't work for me until I changed:
initial_advertising_enable = TRUE;
In SensorTag_Init().
I am using this firmware and it will start broadcasting whenever it's not connected. The side button acts as an on and off switch.
http://www.myweathercenter.net/installing-a-new-firmware-for-ti-sensortag/

Resources