I am trying to port an Android application to BlackBerry 10 and make it look naitive. I have written all the QML for the app but I cannot seem to get the code to work. Do I need to translate the Java into C++ and if I do, do I have to do it manually or would an automatic one do?
Also my application has many different classes which I am not sure how to integrate with the BlackBerry layout.
I am trying to port the open source messenger Telegram, if that's any use. http://telegram.org/source/
Assuming you want to do a proper port and know C++ and Java, a full rewrite would be best. You can probably copy a lot of code from the Java source, but there's no way an automated converter or direct copy would ever work in C++.
Most of the processes in BlackBerry are the same as in Android, all you'd really need to do is rewrite all the UI code and handlers to fit the BlackBerry Native SDK
Related
I want to develop an app to track people's Whatsapp last seen and other stuff, and found out that there are APIs out there to deal with it, but the thing is they are writen in python and are normally run in Linux I think
I have Java and Android knowledge but not python, and wonder if there's a way to develop the most of the app in Java and get the info I want via calls using these python APIs, but without having to install a python interpreter or similar on the device, so the final user just has to download and run the Android app as he would do with any other
I want to know if it would be very hard for someone inexperienced as me (this is the 2nd and final year of my developing grade), for it's what I have in mind for the final project, thx in advance
Instead of running it as one app, what about running the python script as separate from the original script? I believe it would bee possible, as android is in fact a UNIX based OS. Any readers could give their input on this idea an if it would work.
Is it possible to make a console Android app using the Android API? This application must be hidden in the package manager. Can you give me examples? In C++/Java.
Do you mean you want a console in Android so that you can type in java commands? If so, then no is the answer. Android does not have the option to use reflection. And reflection is needed to create a virtual machine where you can execute commands.
The NDK is a toolset that allows you to implement parts of your app
using native-code languages such as C and C++. For certain types of
apps, this can be helpful so you can reuse existing code libraries
written in these languages, but most apps do not need the Android NDK.
http://developer.android.com/tools/sdk/ndk/index.html
I think this is what you're looking for, but as the description says, make sure it's what you really need.
I'm trying to build a sound toy for Android, and I'm the most familiar with Processing for the visual side, which has been ported for Android. I want to use Puredata for sound, because at the moment it seems like the best option for dsp on Android. I've been told on the Processing forums that the best way to communicate with Processing through Puredata is to use TCP or UDP messages. I have no idea how to do this, because I am creating the .apk in the Processing environment and I don't see how I can launch the Puredata patch through Processing. Would this only be possible in pure Java? Or would I somehow have to launch a separate Puredata app at the same time. And are there any good resources for learning how to send TCP/UDP messages? Any help would be appreciated, and I can clarify if it makes it easier.
EDIT: It seems as if OSC uses the TCP protocol, so I'm not really sure why I can't use OSC. The only part I'm confused about is how to package the Processing sketch and the Puredata patch into one APK.
Thanks
I don't know the specifics of android platform development, but you would need to be able to run one app from within the other. This stack overflow question shows you how to do that. Once you have done that, you will be able to send commands over osc to you pd instance.
Another option would be using libpd. According to one of the devs, they are working on packing it up as a processing lib. If you wrote your visual code in c, then you would be able to link down to this libpd for your audio processing.
I'm thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I'd like to interact with it using Java (respond to the knobs, light up LEDs, etc). The reason I mention Java is two-fold: first, I know Java well1. Second, I've written the rest of the program I need to interface with in Java (though there are ways to talk to the Java program from another language).
I would like the device to connect via USB and be (computer-)platform independent.
I haven't the slightest idea of where to start, except to start reading the Arduino website. Is this my best/only option? Is there something better suited for communicating with Java?
Note: I know that Arduino has something to do with Java (not sure what), but it seems like code must be written in a subset of C.
How would I get moving on this topic?
1 - No laughter, please.
The Arduino development environment is written in Java.
But the standard language you write a program for the Arduino platform is effectively C++.
The Arduino platform is based on an Atmel AVR chip. There is at least one Java VM for AVR chips. There are other languages available for the AVR such as Forth and BASIC (although I could only find commercial versions, so I'll if you want to find them, search for "AVR BASIC").
The Arduino uses a virtual COM port to communicate between the host computer and it. A virtual COM port emulates an old style serial line but is done with USB. You can use the Java communication API to then have a Java program running on the host computer communicate with your physical device.
For some encoders and buttons, you probably want to implement a USB HID device. If you're going to produce more than a couple of them, you'll want to do a custom board. Check out V-USB, an open-source library for making USB HID devices using Atmel microcontrollers. They have a bunch of examples of projects that use this library.
You could probably make this look like a HID joystick, using the encoders to produce X/Y axis information and having the buttons act like buttons. They you could use standard Java gaming APIs to read the joystick values.
Can you expand on your need for a custom device? It seems to me that designing hardware has a pretty high barrier to entry and that most applications I can think of would be better resolved by repurposing an existing piece of game controller hardware. If you really need new hardware, then i suggest you start by googling 'USB development kit' or
'USB development board' which will get you links like this, this and this.
As for working with USB hardware from Java, I've played around with the JUSB library a bit and it looks promising, but appears to be limited to Linux only because the Windows version of the native library half of the library hasn't been written. Alternatives can by found by googling 'HID java'.
Ok, computer-platform independant? What platforms are you targetting? That would depend on the driver and support for that said platform, what does the usb device do? Is it a mass storage device...You may have to look around and see if you can find a device driver that can talk to the device...
Hope this helps,
Best regards,
Tom.
I know for the serial port there were libraries that existed for interacting with it (rs232 library). Googling for java and USB returned several answers (the first was called jUSB). That would be the first type of thing I would be looking for.
sample for java usb connection to freescale microcontroller:
http://javausbapi.blogspot.com/
Im trying to create an app to control a pc remotely using java , i want to use red5 to let the admin control desktops using a flash movie
so i need to find java classes to :
capture desktop as live video
-control mouse and keyboard
TightVNC has a Java viewer so you can easily manage your server through VNC protocol and use a Java client (usable as an applet too).
There are tools, though not in Java, such as vncrec to record VNC sessions. I don't know if this is exactly what you are looking for since to distribute video a better choice would be to set up a streaming server.
I don't believe Java libraries exist that will give you what you want. Capturing the screen and controlling the mouse/keyboard require hooking into the OS in ways that Java doesn't do. You'd need to write a native DLL that uses JNI and exposes the functionality you need, and then load that in java. Then you'd have to convert the image data you get into a format that Flash can understand.
Creating a live video stream probably wouldn't be the most effective. Generally streamed video is fairly lossy (which generally isn't that great when screen sharing), and is at smaller resolutions than you'd probably be dealing with. I'm not sure you could create a video that would both stream fast enough and have high enough image quality to be usable.
You're probably better off using a pre-existing product for this (like TightVNC, as Fernando suggested). Unfortunately, that would require a java applet (or native application) to view, not Flash.
(Full Disclosure: I've written screen sharing applications that use Java on both ends, both the server and the viewer, and we've looked at trying to make a Flash viewer a number of times.)
Just use VNC. You can call the VNC server executable from Java. On the client you can use the Java VNC Viewer. I'm sure there's source code somewhere if you really need to make changes to it. You could use AppletWindow from BlueJ to launch the VNC viewer applet inside a JFrame in any Java app.