I am making an andriod app using 'andriod for processing lib" of processing (ie. running android mode in processing 2.0.3 and lauching it on my device).
Spacebrew (http://docs.spacebrew.cc) is a easy to use web socket library for processing , also availabel as javascript.
if i run the spacebrew example codes in andriod mode, the app gets launched in my device but doesnt show up in my spacebrew admin. whereas if i run the same thing in my mac, it shows up correctly. guess the websocket communication is not happening while using "andriod for processing". But this is the easiest way to use web sockets. So can anyone help me figure out on how to make spacebrew work in processing (android mode)
this is for my college project. any suggestions on how to get this running please? thankyou in advance
Thanks for pointing me to Spacebrew, didn't know about that!
I've just tested it from Android Mode and it does work, but there is a tiny quirk you might be missing out: permissions!
Normally, if your app uses extra permissions, the application's manifest allows you to use these. In Processing, that's also possible via Android > Sketch Permissions and in the case of Spacebrew, INTERNET is the permission you need enabled, as you can see below:
I just a did a test myself and it seems to work just fine with the amazon hosted demo:
Note that the Spacebrew Processing library uses the java websocket library, but only sets up a WsClient client. You can if you want use this jar in an Android SDK eclipse project and have your Android app act as a websockets server as well, not just a client (just in case this will become handy to you at some point in the future)
Related
I am currently working on a sample app on Cordova with Clojurescript. I am using shadow-cljs to build the project but somehow I could not find a way to make the code reload to work.
Instead, I have to use the browser build when developing since it allows for a shorter feedback loop with the code reload. And then after that, I deploy the app to a device/emulator using the cordova command line.
Is there a way in shadow-cljs to make the code reload to work while using the device/emulator directly when developing ?
I created a simple example using shadow-cljs with Cordova. I only tested the windows runtime but I'd assume that the others work as well.
It is all regular shadow-cljs the only special tweak in the config file is the :use-document-host false since by default it will try to use document.location and figure out where to connect from there. On Windows at least that is some ms-appx:// URL which cannot be used to connect the shadow-cljs websocket. So we disable the default which will make it use localhost instead. This works fine for Windows but other platforms might require tweaking the :devtools-url config option in case the generated "app" does not run on the same machine (eg. mobile device or emulator).
I'm trying to develop own Android application using ANT+ sensors.
My app is based on (developer's Sampler code and SDK).
However I found the strange thing during tests. I mean when I start to searching devices I immediately receive a message:
W/AntPluginPcc: BBD30600: RequestAccess failed: OTHER_FAILURE
At first I suppose that a reason of this problem is that I have a phone with Marshmallow OS (instead my wife's phone is based on Lollipop OS and all works fine). I tried to find anything in documentation related this but didn't find anything interesting. I add to Manifest some permissions (I mean com.dsi.ant.permission.ANT, android.permission.BLUETOOTH etc.) and set the permissions in code, but it doesn't help to me to solve my issue.
May be anybody received this problem and may be somebody solve it. Could you please share your solution to me?
P.S. I install the ANT+ Plugin services, ANT Radio Service. in App I use the ANT+ SDK from github. May be I should use also the ANT SDK? (I want to connect to HRM and cycle devices which use ANT+ protocol)
If you have the same problem as I you need to realize the AntRadioServiceConnection class.
I found it here.
And you should be sure that you have all services and plugins installed on your phone.
I'm looking to build an app that will restart my device at a specified time, then open up a couple 3rd party apps in sequence and run their feature/s.
For example: I would like to automatically restart my phone at 5am. Then have it open an antivirus app of my choice and run the scan. Then close that app and open up another app and run it's cleaner function.
I have experience coding, but I'm just starting to take a peak into android app development. So, I was wondering if this is something feasible to do.
Any advice would be appreciated!
I am not sure about the starting phone at the desired time, but I am sure you can start applications on boot using "init". Linux systems support that, and android does as well. But it completely depends on your kernel.
Read here about init.d.
Check if your phone's kernel supports init.d. Check here if your phone doesn't have init.d support.
Check Here for running a script at boot. It is quite useful for custom scripts.
Check Here for running scripts/application the application at boot
Create a script according to your needs and I think you would be able to achieve what you are looking for. <- Custom Rules
I would have commented but apparently I can not since I am new here.
I hope I was of some help. Will look into the android starting part and get back to you.
Cheers.
i want to make an application or more like a tweak for android
i want to write some code that's gonna work on an android device and will do curtain actions based on an input from a Bluetooth device
this application needs to run in the background at all times (as if it was part of the device's operation system)
and be getting input every second
i need it to be able to bring up i custom keyboard i am gonna design and to set up a courser just like in a desktop which can be controlled by the application.
i read about something called a ROM and i dont know if thats what i am looking for.
i also know that the android operation system can be modified or replaced with another operation systems like the one called cyanogen .
i am a beginner and i have got some background in java
i tried creating an android app but i dont know how to make this thing work on the OS
i need someone to give me a very detailed explanation cause i know nothing about these stuff
It sound like your trying to make an App that takes Bluetooth input...
It doesn't sound like you need to edit the OS itself...
You need to set up the Android SDK to start development...
http://developer.android.com/sdk/installing/index.html
1. Download the SDK
2. Install the Eclipse Plugin
3. Write the code, and run it on the emulator or your connected device(make sure debugging is enabled under Setting->Applications->Developer)
Here's some info on getting started w/ Bluetooth...
http://developer.android.com/guide/topics/connectivity/bluetooth.html
Since you want this to run all the time, I would look into Android Services also...
http://developer.android.com/reference/android/app/Service.html
You may want to also take a look at the Sample Projects included w/ the SDK after you download the SDK and set up your IDE and Emulator(or phone)...
http://developer.android.com/tools/samples/index.html
Hope this helps clear some stuff up...
I need to profile dynamic library calls of android application and have decided to profile using "ltrace" tool for this purpose. I combined "ltrace" tool into android package, then compiled together successfully. It works fine with shell program just like usual linux console application.
However, I cannot properly profile android applications, which are forked from "Zygote" process. I tried attaching ltrace to "Zygote" process to follow child processes of it, but I only got SIGCHLD and SIGSTOP signals and terminated abnormally, showing the following errors.
unexpected instruction 0xffffffff at 0xffff0508
I'm just wondering if anyone has ever tried this kind of profiling on android system. Any short comments can be very helpful for me.
Thank you in advance.
Try attaching ltrace to your android application's process after it is it forked off zygote. You will need an ltrace built for android's bionic libc, and one that has reasonable handling of threads.
There is a way to set a debuggable android app to wait for connection of the java debugger, you could use that, connect ltrace, and then connect and disconnect the java debugger to start it going again. This should capture most of your own logic, though not the entirety of the startup.
IIRC you are under a time limit to connect and get it going again, otherwise it may resume on its own to avoid triggering an application not responding situation.
It may be that you will learn more by using the java debugger to see what is going on, and then reading the source to see how that is implemented on the native side.
Mr. Chris Stratton's way will work.
LoadLibrary() is another point to break for debbuging jni.