Currently I am using jad to set the http and Bluetooth permissions.
But I have a problem with this approach. Some of the handsets does not have support for
bluetooth API, so the phone is not allowing the installation of the application as it does not support the bluetooth API.
Is there any alternate way of setting these permissions?
This is the solution:
MIDlet-Permissions-Opt: javax.microedition.io.Connector.bluetooth.client
This is how you can specify optional permission.
If a handset does not have Bluetooth API then the Java Virtual Machine does not have javax.bluetooth package. Because of this the handset may not allow you to install the app.
Create another version of your app without any usage of the javax.bluetooth package and try installing again.
You don't have to specify these permissions at all. The MIDlet will work properly without them.
Related
I have recently bought a Asustor AS-302T NAS, which is an absolutely brilliant solution for the home. One of it's most impressive features is that you can install apps which extends the ordinary behavior of a NAS. And if you are a developer you can also create your own apps.
While apps are fun, I have more interest in using my NAS as a kitchen-sink for my personal nodejs projects. In short I want to run nodejs application that I can then call from various other machines around the house. My own mini-cloud for IOT experiments.
Installing, one click only
Having installed NodeJS through App-Central I am at a loss how exactly to start using NodeJS on my NAS. The whole installation is essentially an on/off switch with no options or visible settings at all. I can find no documentation on practical tasks like uploading a nodejs application, deal with access rights or even execute it.
Under Windows or OS-X I would use npm via the command-line or shell, but Asustor is a purely html based interface (with the exception of XBMC through HDMI).
Why offer to users the option of installing NodeJS -if it's impossible to actually use it?
So my question has three aspects to it:
How do i get access to npm on my Asustor NAS
How do i get my NodeJS application running
Is it possible to run my application as a service (executed when the NAS boots)?
From the ASUSTOR Developer's Guide: apps are installed into
/usr/local/AppCentral/$APP_NAME.
NodeJS executables will be at path /usr/local/AppCentral/nodejs/bin/node and /usr/local/AppCentral/nodejs/bin/npm.
You can login to NAS via SSH and add them to PATH variable, or create symlinks...
I'm also searching for solution how to run them as a service (daemon), maybe an /etc/init.d script might help.
I want to read specific key values from Windows Registry machine from the web server. I'm using jsf and seam. I just wanted to check if there is a certain application that was already installed on the client machine and i want to check it from the server side code.
Is this possible?
Many Thanks.
For accessing registry you need to use Java Native Access (JNA) registry library.
For reading client registry I think you need to use Applet and provide appropriate security permissions
Have a look at this SO post
I create j2me application with codenameone and it works well in Nokia phones, however I wanna install or run it on Samsung devices (for instance S8300) I'll get error.
How can I fix this error?
I searched for this device's details and I found it doesn't have operting system but it can run java with MIDP2.0. What can I do for these device types? How can I run it on these devices?
Thanks in advance.
Check that you didn't use Java 5 language features and limited yourself to the CLDC 1.1 API specification in terms of classes such as java.util.
Codename One includes support for these features which work well on Nokia where the VM is more compliant but fails on some devices when these features are used.
Several things things may be the problem:
1) the jar file is to big. Java device have often constraints for max size of jar file, some of them unbelievable small. try to install a smaller jar file, like a hello world.
If this is problem, make sure you use "obfuscate", as it also removes unused code from the jar file.
2) Depending on operator branding, Samsung devices often do not allow to install the jar file directly from PC (with bluetooth or usb cable) :-(
What is possible only is called OTA-Download. There you need to create a jad file and a jar file, put them on a webserver, and call the url from jad in the mobile browser of the device.
You need to change the MIDlet-Jar-URL inside to have the absolute url of the jar file on your web server.
This is all quite complex. to check that your webserver is correctly set up and that that jad file has no syntax errors, you can use my jad checker:
jadcheck.appspot.com
We must create UI by hard coding not using lwuit or codenameone designer.
cause of some devices that don't have an OS and just support MIDP can't run these type of applcations which are create by lwuit or codenameone desiner.
Maybe it cause of resource file path in devices!
I'd like to incorporate security features in my standalone XULRunner app. Specifically, I'd like to use security certificates to validate the app executable as downloaded by a user. From what I've seen, its called code signing. But I'm very green in this area. Any pointers on how to proceed? Thanks in advance.
The certificate functionality built into XULRunner isn't meant to validate signatures of Windows executables - you would need to use Windows functions for that (e.g. via js-ctypes). Not going to be simple however, here you can see how that check works in C++ code.
However, if you are merely downloading an update to your application then maybe using an HTTPS connection would be sufficient - the origin of the executable is verified then (won't help you if that server is hacked however).
I have implemented following code to upgrade application
platformrequest("URL TO JAR FILE");
I am checking if the jad file residing on server has more value in the custom field Application-Version than the current one then the platformRequest will get called.
every thing fine
but only one problem I have installed my app in memory card and if I updateusing above mentioned technique.
I am having new version installed saperately..
instead of this I want my older version application to be upgraded [replaced by newer]
in jad file ony I change the Application-Version Field rest every thing are same as the local installed appliction..
and I want my app to be replaced in memory card only.
what phone are we talking about?
In essence it should not matter where the app is located, it should update.
Make sure the platform request should point to the jad of course
I don't think you should be using a custom field/attribute for this.
Are you using the MIDlet-Version attribute in your application's manifest/JAD file? This attribute is used by a device's AMS (application management software) to determine if your pointing to a newer version.
See here for a description of the standard MIDlet attributes.