Android, use library or copy source code? - java

I hope my question is suitable here. I recently started learning android - making buttons, using google maps and other basic stuff. I saw a thread recently (can't find it) about this and I got interested in it: https://github.com/jackpal/Android-Terminal-Emulator/wiki
This is an open source android terminal emulator. It also seems to have a library called EmulatorView with which people can call methods etc. What I would like to do is use this app inside my own app. Instead of just looking at the file system on the android phone etc. my app would connect to the console of a serial device like a router, usb to serial. Something I usually use minicom for on my pc. As in there could be a button in my app and if I press it it opens the console of the attached router and I could issue administrative commands.
I was wondering what the easiest way to do this would be? Would it be to try and use this library and make my own terminal, seems quite hard, or would it be to copy their source into a project and try to edit it? Seems messy to organize everything, and could be hard too? Then use some library like this to connect to the serial device? http://slickdevlabs.com/slick-usb-2-serial-library/
What would the first steps be, make a terminal like the open source app has, use their library or paste in their code? Then try and edit it to do something over serial?
I have tried to use their example for using their library (jackpal.androidterm.sample.telnet), but it crashes when I click open shell, I was wondering if this open shell button in their example was what I needed?

I decided I would learn more by writing the app myself using the library.

Related

What options are there to call Lua code within an android project?

I want to take this open-source project, which is a build calculator for the online game Path of Exile, and port it to an android app. The project, called Path of Building (PoB), is written fully in Lua, and is released as a windows application. I'm not sure to what extent it's possible to simply wrap their lua code and just show it in an activity, but, since the project gets updated often (just as much as the game, which is once every three months), I'd like to touch as little of their code as possible and hopefully just have to set it up in Android. Any help or input is appreciated.
You can run Lua code on Android using a library called luaj.
Take a look at luaj site: http://www.luaj.org/luaj/3.0/README.html

Run *.jar file on Android

I copied the program from this link: Memo Game and turned it on on Eclipse. Everything worked properly. What if I want to try it on my Android device? I download BlueStacks and exported Eclipse project into Runnable JAR file. Then I tried to turn this file on using this guide but I couldn't do it. I found the whole process very difficult and I am sure there are easier methods to write Android applications.
Main question: What should I do in order to turn on a normal Eclipse application that I write and test on my computer on Android? Is it at all possible?
I know that there is a program called Android Studio, but there you use specific commands that I am not familiar with. That's why I am asking about turning on the same code I write on computer but on Android.

Android Bluetooth Communication Between Android App and Java App

I want to create an app that passes a string of a command from the Android app to the Java app. I do not know where to start. How could I make something like this where the Android app gives the Java app (running on a Mac or PC) a command and the desktop app does it? Thanks.
It was a long time ago, but I actually did something like that.
You can check the project at https://github.com/guillaumyle/BlueRemote/
I suggest you to ignore everything not "Bluetoooth Communication" related, as it is probably not well written.
Check the blueremote package for the Android part.

Launching my GoogleGlass app without using Launchy

Is it possible to install and launch a native Google Glass App with the Preview GDK without having to use launchy?
I'm having a hard time finding a tutorial/reference on how to do this.
Thanks!
Yes. I'd start with one of the GDK Sneak Peek sample projects and make sure you can install one of those and launch it. You can even change the voice command from "start to stopwatch" to "release the hounds" or something and check that that works. The way glassware launches is different from conventional Android apps, so your manifest file will need to be different.
Here's the official documentation:
https://developers.google.com/glass/develop/gdk/input/voice#starting_glassware

Making apk from jar using microemulator

Well i `ve made an app using java me and as graphics i used lwuit library which i added into the midlet`s jar. On Nokia it runs smooth and i wanted to port it to android. So i found out about microemulator http://microemu.blogspot.ro/2008/11/running-java-me-applications-on-android.html and i followed those steps and i got the apk. However when i run it into the Android Emulator it closes at start. I don`t know what may be the problem because i was able to convert the demo jar app into apk and it ran succesfuly.
Any ideas on what should i do?
I suggest you port your application to Codename One which should be pretty simple. It has proper Android support which will make your application look and act native on Android.

Categories