Detect BlackBerry devices and their PIN's programmatically - java

I'm looking for a programmatic way to obtain a list of BlackBerry devices connected to the computer. For *nix there's an open-source toolkit called Barry. It can display a list of connected BlackBerry's along with their PIN's (unique identifiers). Is JavaLoader or any other Windows tool capable of serving the same task?
BlackBerry Desktop can detect device and it's PIN, but I need a way of programmatic access to this information.
Any suggestions?
UPDATE: Apparently, JavaLoader.exe has an option named "enum". I'm checking whether it works as expected.

"enum" command works perfectly.

Related

Installing Teamviewer silently on android device from a remote location using java

I want to install the TeamViewer software automatically on client's android device remotely using java. I have researched about a number of third party tools for automatic installation of software but the problem is that each one of them needs user interaction/permission in one or the other way.
In my app I will disable the touch of the device after the user logs in and an animation will be displayed based on the real time data from the server. I want to install the software assuming that no user is present at the other end and no response should be needed to install teamviewer.(My app will not there be on Google play.)
I am very new to android development, but through my research I found that .exe file can not be installed on Android as its a Linux based OS.I was planning to keep the Application(.exe) file at server and then try to install it issuing some adb command from my code.
Can someone please tell me how is it possible? How should I proceed? Please help.
Thanks in advance for any help.
There are two way for installing an App on an Android device:
Via ADB. This requires Debugging to be enabled on the device, and the computer the Java program is executed on requires an USB connection to the device (and proper USB drivers) and the device must be "ADB-paired" with the computer if the device has at least Android 4.2. Furthermore you need ADB which is part of the Android SDK and therefore not present on a regular PC. You could ship a version of ADB with your program but ADB is platform specific (Windows, OSX, Linux, ..) therefore you would have to include multiple versions and select on.
Vis Google Play. Once the user is logged-in any app from the play store can be installed to the users's device via web interface. As the Google log-in credentials are required a user must be present to enter them.
Conclusion: What you want is nearly impossible, especially the "without user interaction" part.
You can't install a app from other app without user interactions, that would a big security problem.
The one app that can it is Google Play for obvious reasons.

Possible to Run a Java GUI on a computer from an Android?

If an Android device were connected to a computer via USB charger, would it be possible to launch a java GUI on the computer from the device (i.e. by pressing a button in an android app)?
Also, would this be a platform dependency nightmare?
Possible yes, not easy though and there may be some platform issues.
You would already need to have something running on the destination computer which detected the message from Android and then launched the GUI.
In fact the simplest way to do that may be to ignore the USB and just do the whole thing over the network.
You can't just run arbitrary code on the computer by plugging the phone in though, if you think about it that would be a massive security hole!

Check whether an app is installed in a paired device

Is there a way to search another devices installed application using bluetooth? Actual requirement is, is there a way to search the paired devices installed applications.
Any help is really appreciated.
Sorry, but this is not possible, unless you specifically have your own app on both sides and are somehow enabling this yourself. There is nothing built into Android to allow an arbitrary device to attack another arbitrary device (e.g., get at private information like installed applications).

how can I detect and display all hardwares of a computer using java program?

Is there any way to detect hardwares plugged to a computer using java?For example,The program will be able to detect if a usb mouse is connected immidiately and show a message that an usb mouse is connected.
it is not possible with pure java. but you can use a native lib available on all important platforms, e.g. SIGAR lib from hyperic hq
This depends very much on the plattform your programm is running on.
in linux you can use the dbus api to register hardware changes
if you are only interestet in usb devices you should have a look at jusb (afaik there is even a windows port)

SWT: Getting notified of a system device change (USB device connection / disconnection)

I'm writing an SWT application which needs to sit in the system tray and pop up automatically whenever the user connects some USB device (the application serves as its control panel).
The way to do this in the native environment (win32 in this case, but I should be platform-independent ultimately) is to listen to the WM_DEVICECHANGE event, then checking if my device has been disconnected.
Googling the subject, it seems like SWT does not in fact handle this type of event. Does anyone have any idea as to how to achieve this? My fallback solution would be sampling the USB port every n seconds, looking for the device, but this is a no-no solution as far as I'm concerned...
Thanks and cheers
Shai
EDIT: J-16 SDiZ reported that the API exists for Windows too
Here is a very good article about Access USB devices from Java applications
The described jUSB module contains a USBListener object.
Interface implemented by objects that want to monitor USB structure. The order in which these changes are reported is not necessarily going to be the order in which the changes were seen in the real world, and delays also occur.
Youre SWt object can implement this listener and do something, when the method
deviceAdded(Device dev)
is fired
Java does not provide direct interaction with the devices and with USB. There are several third-party libraries for Java that provide USB-related features (read/write from USB port). For example: http://www.icaste.com/ (commercial)
Your comment for Zorglub suggests that you have some (presumably) JNI/JNA code to call the 3rd party DLL you mentioned. I assume you could also write a JNI wrapper to the Windows API where you can register to be notified for the _WM_DEVICECHANGE_ event you mentioned.
There is a jUSB port for windows at http://www.steelbrothers.ch/jusb/

Categories

Resources