I am using unity v5.5.3f1. And I am working on Unity Location.Service() to get user's GPS co-ordinates. I use the Code Snippet in the Unity Manual to use the GPS in unity. But when I run this code snippet in the Android Device, It crashes the Application. I referred and worked with some solution that are suggested in google, but didn't work. Even the Patches delivered by Unity Dev Team. So Can somebody help to solve this out, what my purpose is to use GPS and get the Location Co-ordinates.
References :
To use GPS :- unity location Service
To Patch : To use the Patch, but version error occurred, 5.5.3f1 is missing here
Note : using the Unity Version 5.5.3f1 on Windows 10 Platform, Testing on Android 4.1
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 am building an android application where my app user can do video chat with browser based user. For that, I have followed instruction on this link. But I think documentation on this link is very old.
So I checkout webRTC source code from here which is from Google repository. After that I have copied "talk" android sample example into my Eclipse workspace and run it. But I am getting error as "Could not load jingle_peerconnection_so".
Please help me.
Your question is not clear. You need to provide more information to allow people to give you a clear answer.
If you follow the guide on http://www.webrtc.org/native-code/android, you will be able to build the app.
I've got the same error when I tried to deploy on the emulator (kitkat version). But if I deploy the app on my device (Android 4.1), it's work perfectly.
So, in order to solve your problem (if it's really that), try to use your android device and not the emulator.
Sorry but I don't know why isn't working on the emulator.
I am trying to develop an app for GPS tracking in cordova for android users which also includes android 2.3, they might have very less internal memory. So I want to reduce my app size as much as possible.
The only external resource I am using is google maps API. Yet, my app data is over 3 Mb. I searched in google but, I couldn't find. Can anyone give some guidance to reduce my app data. I would like to know where can I find the detail description of what does this app data contains of.
The problem is, whatever Cordova receives is cached into app_webview/Cache and dunno why, but there isn't something which controls this well.
This plugin should help you clear the data: https://github.com/Sharinglabs/cordova-plugin-cache. It is compatible with Cordova 3.3.1 and above. It works with my Cordova 4.2.0 app.
I would like to know when a user arrives or leaves certain location. I was trying to do this using the wireless network (check for mobile devices), but I couldn't for several reasons.
1) I needed real time updates or every 1 - 5 min of the information about which devices are connected and which devices have just disconnected.
2) I had very high ping from my PC to my iPhone on the same network (still don't know why).
Now I want to do it using geolocation from a Phonegap application (running in the background) suspended on iOS or running in the background in Android.
Any help would be appreciated.
Update 25 May 2019
My original answer below is 6 years old and out-of-date with respect to current mobile OS versions.
For example partial wakelocks no longer work on modern Android versions.
Today my recommendation would be (if you have a serious commercial app and not a hobby project) to use the paid-for version of the cordova-background-geolocation plugin by Transistorsoft.
The free version works for iOS but for Android a license is required which costs in the order of several hundred US dollars.
However I think the price is worth it: in my 10+ years of experience in creating location-aware mobile apps, this has been the most sophisiticated and reliable solution I've encountered.
For the cost of your license, you get access to the private repo which is continually updated and maintained to be compatible with new versions of Android & iOS.
If you're looking for a free/open-source solution, I would go with cordova-plugin-background-geolocation which is an open-source fork of the original plugin by Transistorsoft.
However my experience with this plugin has been of mixed success; due to being free/open-source, it's not updated as frequently as the paid-for Transistorsoft plugin.
I encountered problems due to new more stringent restrictions on background location in recent versions of Android which took a significant time to be resolved or have not been fixed at all (see the plugin's issue list).
Original answer (11 Jun 2013)
The first thing to say is that creating a Phonegap app that receives location updates while running in the background is entirely possible, but not trivial. I've done it myself and released apps on both the Android and iOS platforms.
If you need accurate and regular position updates, I'd suggest using the GPS receiver on the target devices. In Phonegap, you can do this setting the "highAccuracy" flag when requesting position updates. The watchPosition() function will deliver new position information as and when the device receives updates from the GPS receiver, so you use it something like this:
navigator.geolocation.watchPosition(successCallback, errorCallback, {
enableHighAccuracy: true,
timeout: 10000,
maximumAge: 0
});
See the Phonegap geolocation API documentation for more details (note the permissions that are required to make this work on Android and iOS).
To keep your app running in the background on either Android or iOS you will need to setup their respective native development environments: Eclipse for Android, XCode for iOS. You will not be able to use Phonegap Build because custom settings are needed in both cases to make it work. See the Phonegap platform guides for how to do this.
To keep your app running in the background on Android, you either need to write a custom Android service, or you could do what I did and use a Phonegap plugin to acquire a "partial wakelock" (see here) to keep your app running in the background and receive position updates while the screen is off. Note that the original version of this plugin is out-of-date and doesn't work with more recent versions of Phonegap, and also doesn't support partial wakelocks. However, I've updated and extended it for my own use: you can find the source code for it in my answer to this question.
To keep your app running in the background on iOS, you need to do things slightly differently; you don't need a plugin, just a project setting.
You can either manually edit the project .plist and add the key “UIBackgroundModes” key with a value of “location” or, with your project open in XCode, add the "Required Background Modes" key with a value of "App registers for location updates". This will cause iOS to trigger the JS callback function you have registered with watchPosition() each time a location update is received. See here for more about iOS project keys and background modes.
Hope this helps!
I am new to Eclipse. I am trying to learn it step by step. I am trying to create an ArcGIS app for Android using "Eclipse IDE for Java EE Developers". I followed this tutorial, and noticed this sentence:
"Be sure to have an Android device connected to the machine. We do not
support running in an Emulator."
My question is >>> How can I test my app? Is what have been mentioned is true?! I think that this tutorial is old because they are talking about old SDK version.
I thought about using the Eclipse's Emulator, and I tried it, but the app didn't work properly!! I am confused right now; because I don't know whether the problem is that:
ArcGIS apps don't work on Emulator!
My code is wrong!
My problem in details: Hello World Map (ArcGIS) - Eclipse's Emulator doesn't run ArcGIS app properly
Since the ArcGIS page states that they do not support applications running on the emulator, please try to run it on an actual device. Also since it uses GPS, you may have to enable these settings on the emulator to make it work.
Also help us understand why it isn't working on the emulator? Is there a crash or a not responding? A Logcat may also be helpful for us to debug.