I'm developing a Unity app run on Android, a DLL plugin to connect to my Asp.net webapi service.
I've tested it in the Unity Editor and the app can call methods in DLL well, DLL is also connected to api successfully.
However, When I deployed the app to my phone and debug the server, there's no connection being made from the phone.
I've installed the app Network Log to check the network activity of my app but didn't see any activity made.
So, how can I figure out where the root of problem is?
Is DLL possible to use in Android unity app?
UPDATE: It turned out that only my project have this problem. The DLL we developed by ourselves but my friend implemented it to connect successfully to API on Android. But I didn't
yes it is possible to use .dlls on Android, but there are some changes with Unity 5.
Maybe this article can help you.
It seems that I have to put them under Libs folder in Assets to make it works on Android
Related
I have successfully built the AVS Device SDK on Android with the help of the reference guide to building Device SDK on Android that the Amazon team sent me. However, as a novice Android developer, I don't know where to go from here to actually use the SDK in an Android app. For example, I'd like to press a button in my app to activate Alexa and speak to her/it. How would I proceed after successfully building SDK on Android? I have pushed the local build with all the compiled libraries to the adb shell and have ran most tests successfully.
I know I'm most likely going to have to user NDK and JNI, but yeah, some guidance would be great.
Also, would it be possible to run your sample app on Android? I am aware of the previous Android sample app, but I'd like to try running this new C++ SDK sample app on Android too.
You'd need to build it on your own. There is no official support to iOS/Android in avs-device-sdk and Alexa assets are not public (e.g. Alexa logo for the button).
In order to make it work, you should integrate LoginWithAmazon SDK and once you have a valid token you should be able to start using AVS.
I hope an official iOS/Android AVS SDK will come anytime soon.
I'm experimenting with the phonertc cordova plugin.
Any public demo wasn't working for me, so i've written one by my self, copying the structures of the examples of the original repository.
The demo is a simple audio call between two users that are using the app.
When i run it on android it works fine, i can talk to the other person, and on the signaling server logs i can read the messages that the library exchanges between the two clients.
But when i run on the browser (chrome or mozilla), i can see that the application logic works fine, but the library, when calling
session.call()
just do not generate any error message and the signaling server receive nothing. Just, the demo do not works on browser and i have no idea how to debug this.
All the project is here on github if you want to check for mistakes.
What can i do to debug or solve this problem?
PhoneRTC is a cordova plugin, which means, It is a cordova based wrapper for the Android and iOS SDK's. Cordova plugins do not work in the browser as they wrap native SDKs meant to be used in the respective OS, in this case either android or iOS..
I have my python app-engine endpoint running on localhost. How do I point my android app to it for testing? Right now, the android app is trying to access the https:myapp.appspot.com/_ah/api address on appspot. Must I first deploy the python endpoints server to appspot before the android app can see it? Could I just deploy the server to localhost and test android from there?
Edit:
Sorry, I probably misunderstood your question. I think you should be able to test it locally as per this link - https://developers.google.com/eclipse/docs/endpoints-androidconnected-gae. Step 5 & 6 refer to running back-end locally. Have you seen this page?
Yes, you have to deploy it to GAE. You can test your backend on GAE through API explorer, by https://mapp.appspot.com/_ah/api/explorer to make sure its working fine. Then follow instructions from https://developers.google.com/appengine/docs/python/endpoints/consume_android to generate android client.
There are some examples here as well,
APP Engine backend
https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-python
Android app using app engine backend
https://github.com/GoogleCloudPlatform/appengine-endpoints-tictactoe-android
Firstly I would like to thank all the experts here on stackoverflow, by reading questions asked and looking at example code and reading the answers i have been able to get to this point. Thank you once again!
I have been spending hours and hours searching for a solution, I’ve read through many posts on this issue. It’s seem this is a issue a lot of others are/has been struggling with.I would highly appreciate any more advise or tips if somebody can assist in this frustrating issue.
All my development are done on my local machine. (Win 7, Visual Studio 11beta)
A WCF Service is hosted in IIS Express on its own port or IIS 7.5 (.Net Framework 4.0)
Second Web Application with only Html5/jQuery is hosted in IIS Express on a different port.
Using Eclipse 3.7.2 with Android SDK 17 also on my local machine.
Its seem all the software are functioning properly.
Android Emulator is working, Phonegap/Cordova library is installed, etc.
I am using Android 4.0.3 with Cordova 1.6.0
I am asking assistance to find out why my phonegap emulator ajax call won’t go through to my WCF REST Service. I don’t have a actual android device now to test the program on at this moment therefore I must use the Emulator.
Some more detail:
I have a WCF REST Service developed in .Net receiving & sending in JSON and JSON-P.
I have tested this with a second web application on a different port to make sure cross domain calls are allowed.
I have also used the RESTclient plugin for Firefox and can use it to make JSON and JSON-P calls successfully. [ http://restclient.net/ ]
So I am sure the WCF Service is working as it should. There shouldn't be any cross domain issue.
When I take the Html file with jQuery that I know is working within Visual Studio, to eclipse, copy into phonegap app, I try to make a basic call to my WCF server and I am unable to connect to the server.
I have changed the URL from [http://localhost:50425/LoginService.svc/GetData] to [http://10.0.2.2:50425/LoginService.svc/GetData]
according to android documentation : [http://developer.android.com/guide/developing/devices/emulator.html#networkaddresses]
I have created an allow all whitelist with the following setting:
[ access origin="*" ]
within the cordova.xml file. See: [http://professionalaspnet.com/archive/2012/05/15/Whitelisting-Domains-in-Cordova-_2800_PhoneGap_2900_-Android.aspx]
The correct permissions have been set inside the AndroidManifest.xml file according to [http://docs.phonegap.com/en/1.8.1/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android]
When I initiate the call, I use $.ajaxSetup error function to trap network error etc. and display with alert the error message. Used console.log() to make sure it passes this function without a error.
When the call actually happens, I receive a "Bad Request - Invalid Host Name. HTTP 400. The request hostname is invalid."
If the call would have been successful, I use breakpoints inside Visual Studio to know for certain the call has been made and see the request coming through.
Is there any other ways to test from emulator if I can access the "external" host? In this case to make sure emulator actually can find the service?
Is there any tools or other configuration settings that needs to be done?
I have even deleted my emulator and created a new one but it still fails to connect to the WCF Service.
I would really like this to work, would like to build a complete phonegap application but can’t continue if I can't make a call to a web service.
Any advise would be greatly appreciated.
PhoneGap is really just a wrapper for html/css/js webpages with a js library for accessing phone specific functionality, which can be compiled to multiple native mobile platform apps.
So this is really not a PhoneGap issue...
You say you are using JQuery to query your web service, if you can open the html file which fires of the request in your normal browser window, and everything works fine. The problem is not with the code, but with the Emulator you are using, maybe some miss configurations idk.
Okay if that still fails, you are most likely pointing to the wrong/no IIS Instance.
If you have two IIS Instances running on port 80 idk how that will behave, but i don't think that will work very well, my guess is that one of them will override the other one.
So if you are hosing your webservice on IIS 1, but IIS 2 overrides IIS 1, then you will never reach the webservice, and get the error you get.
So when you changed to point to the other IIS Instance, it started working again.
I am developing Android Web App using JSP with xml parsing. I developed it in Java using Tomcat Server but I couldn't develop in Android. I am new to the web app development. So can anyone kindly suggest me how to proceed further...
waiting for a response guys...Thank you
It is likely that you don't need tomcat on android. After all tomcat is (apart from everything else) a web server. This means that the phone your app is run within should be serving requests from other clients. I doubt you can make sure your phone IP is fixed, and even if that's the case, phones are not meant to be servers.
What I suspect you have done is - you've implemented some functionality in the context of JSP and servlets, but this functionality can easily be run without jsp/servlets. Remove the servlet-api.jar from your classpath and make your functionality work without these. Then you can easily use it in an android app.
While it should be possible from just the hardware standpoint, it should be nearly impossible to get tomcat running in the dalvik pseudo-java envrionment that android provides. the dalvik vm that Android uses is not a Standard Java VM, hence tomcat can't run on it.
I would suggest to look into the Maemo world, specifically the n800 and n810, which are a bit more hackish but also a lot more closer to linux than android. I've successfully run OSGI based apps on those machines. And they are still mobile devices you can use.
Check this site for some examples: http://wiki.maemo.org/OpenJDK_6.0_0_%28Cambridge_Software_Labs%29_on_N900
Look at i-Jetty. It's a web server that runs on the Android platform.
Why crazy? It is possible to make an ip pseudo-staic and then use a phone or tablet as a server instead of running a big power consumpting desktop 24/7. Of course for very simple purpos3 and probably as an experimental stuff. But not bad idea. I have written few years ago a tool for intarnal lan communication in the company which comprises synced and asanced messaging sastem, files and folders exchange functions, firewall solved access and everything in one jar cca 390 kb without any dependencies...there is also built in a http servlet and it runs on dalvik without problems - I have tested it. So the way is there, Even if the intention is not 100% clear.
You want to run Tomcat inside Android using dalvik? That is crazy. If it is a Web App host it somewhere and use the browser.