Send text strings from Android application/plugin to Unity application - java

I need to add non-Google offline voice control capability to a Unity3D project. I have started with snips.ai and successfully built an Android app following their tutorial and modified it to output the understood intent from snips to a text box on screen. What I really need is to get this text string to send to my Unity application.
I think I should be building a native Android Java plugin for Unity which will start at runtime and listen for voice commands. Every time it gets a listen event I need it to send a string of the captured intent to the Unity project which is always waiting for these strings.
I know I can use something like this https://gist.github.com/markcastle/a1530efd5278607862fec09df89e59db to make a static call to a native plugin, but I want to basically have Unity listening constantly to the plugin for strings which it can interpret.
Any help, as always, is much appreciated!

Related

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.

Android Test Platform Generator using java

So I have received a task to develop a prototype software for testing the software/hardware component of android. Example: By using the software I can send a command from my PC to my android to change the color of screen display without interacting with the devices(touch,shake or other possible gestures). I would like to know how do I actually start. The whole idea is actually messed up in my mind. Because after a few days of research I haven't found any topic related to what I am going to do. I am still fresh with java so please go easy on me :) Any help is much appreciated.
hi this is very much feasible. First you need is a web service that connects your software to your phone. When you give command on your software, the command should go trigger the web service which in turn should send a push notification to the phone to execute your command. You will be needed to create a some sort of listener and push notification system on your phone(Hint GCM may work). Also you will need to add permissions to your app that is listening to the notifications. Does that make any sense to you?

How to send a push notification in windows phone app using java?

I am aware of creating push notification in java for Android and Apple apps. Now i want to create a push notification service for windows phone app. Tried little googling but didnt found enough resources.
Can anyone help me with good resources for creating push notifications in java for a windows phone app.
try that JAVA MPNS
It's 3 years old but works and supoorts toast/tile/raw types. Build it from source, add into project and follow samples.

Android, use library or copy source code?

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.

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.
I found this:
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
from here: https://stackoverflow.com/a/8024626/1184256
This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access?
I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction.
I have also found OpenTok which after building a sample server and client on my site I have found that it works on desktop browsers but not in Android browsers. Please don't steal/use my apiKey or sessionId.
I have also found libjingle which will allow me to use Google Talk's peer-to-peer voice and video chat. I am thinking this will be the way to go, but it means building a video chat app from the ground up and wrapping it around these libraries... yeah. Anybody done this already?
I know this is essentially a duplicate thread, but I have searched for days and days for an answer and this is the closest I have come to getting this done.
BTW the reason I need this without user interaction is for a Telepresence robot, thus there won't be anybody actually holding/using the phone when I initiate this call.
Please HELP!
You'd have to actually change the built in android app (Talk?) that receives this intent to automatically accept these types of intents. There's no way to do it from a standalone app for security reasons.
I don't think that live video streaming will work natively in Android Browsers, since they dont support WebRTC (Yet) and do not support flash. With that said, OpenTok has an Android SDK in beta that lets you stream live video from android phone to browser, another android phone, or even an iOS phone as long as everyone is connected to the same session. Like you said, this does not work over the browser and you would have to build a native app.

Categories