I downloaded IBM MobileFirst project from https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-6-3/advanced-topics/location-services-hybrid-applications/.
I've ran it in the Android Emulator.
I've noticed that the method WL.Device.Geo.acquirePosition, works as expected.
But with WL.Device.startAcquisition, after the success callback has been invoked, the failure callback invoked as well.
Why is the failure callback being triggered?
Please see my above requests in the comment for additional information (as well as Idan's request).
Without that, though, my guess is that you're passing in a timeout on the Geo policy. When you're running in the emulator it's quite likely that you wind up not setting a value quickly enough (after the initial one you set), and thus soon after you're getting a timeout failure.
As well, please note that the Android emulator has a known bug that Geo positions are set starting from midnight on the current date.
Related
I recently started to see this logs I/Counters: exceeded sample count in FrameTime multiple times in my app logcat, I understood it comes from Google Maps.
Any idea what it means? and how to get rid of it?
Try disabling a few layers of the widget (like say 'myLocation' layer enabled by using 'myLocationEnabled' parameter) and enable them back in the release build. Also make sure you are disposing your Google Maps Controller in the dispose method (if you are storing it somewhere after taking it from onMapCreated).
As far as I can figure out from the error and the API docs, GoogleMaps has multiple layers and each layer needs to be built in a given FrameTime. Since the added burden of multiple layers slow down the processing, it may exceed given FrameTime and trigger the error.
The reason may also include the fact that debug builds have no optimisations and that really affects the GoogleMaps package. I tried the same app with the constant barrage of 'I/Counters: exceeded sample count in FrameTime' errors in release build on a real device and the errors seem to not appear, implying these errors can simply be ignored.
While we wait for a fix you can set these to fold (in Android Studio) by going to File->Setting->Editor->General->Console and adding "exceeded sample count in FrameTime" to the list "Fold console lines that contain:"
I had the same issue since this morning, it was gone when after I:
stopped my emulator
wiped the data
cold booted it.
NOTE: this is with android
For Android emulators it's enough to wipe the data of the device and the FrameTime messages will go away.
EDIT: Sadly, this isn't a permanent solution as messages will start appearing after re-opning the emulator. I will be back with another update if I stumble upon a permanent fix.
I had a similar issue, for me I had setup a location listener:
location.onLocationChanged.listen(l) {
controller.animateCamera(...);
}
This appeared to be called even though the phone location had not changed, so I added a check to store the previous known location and in the listen, I compared the streamData with my location and only performed the update if there was a change.
Perhaps you can post your code to see if this could be the reason?
It's happening inside onLocationChanged method.
When I set isMyLocationEnabled to false at some extent it was removed but fully, now there were lesser log statement.
It happens when the map moves (or probably more specifically when it is redrawn). Both when animating, and also when manually sliding it around. My logcat is spammed full of Counters: exceeded sample count in FrameTime messages. This explains why you'll see less when not having my location enabled: The map doesn't move as much...
It's so annoying.
For flutter: I was using setState() method with a google map and there was also a locationListener(). So I removed the setState() and instead I did update my screen using provider. And the warnings were gone.
I'm using QBluetoothDeviceDiscoveryAgent to search BLE devices on an Android phone.
I request device search to be started by calling QBluetoothDeviceDiscoveryAgent::start(). After a few seconds, QBluetoothDeviceDiscoveryAgent::finished() is emitted, but I did not call QBluetoothDeviceDiscoveryAgent::stop().
At this point, my BLE device was not found yet (it's slow...I know), and it won't as the system decided on its own to stop the search....so I need to restart the search manually.
Why is the system stopping the search? Qt doc says about QBluetoothDeviceDiscoveryAgent::finished():
This signal is emitted when Bluetooth device discovery completes.
What does that mean? How could anyone decide that discovery completes? Does it come from BLE standard? As a end user, I'm the only one who knows when it's completed, i.e. when the device I'm looking for was found....
As commented by Frank Osterfeld, the android implementation of QBluetoothDeviceDiscoveryAgent (see line 273) silently creates a 10 seconds timeout that stops the search automatically.
It's a pain for users who want to search for longer than 10sec...
Filled a bug report here: https://bugreports.qt.io/browse/QTBUG-53012
We have apache 2.4 running on a Windows Server 2012, everything works fine except one strange bug:
The server stops serving any pages to users after someone visits any page via Chrome for Android. The visitor on the Android device (only when using Chrome) gets an "connection reset" error, but all users after that are getting blank loading pages until Apache gets restarted. If an user is loading a page on any other device during a restart, the page finishes loading immediately.
It seems that i can't find anything specific in the Apache or CF errorlogs. The only error i'm able to find is in the coldfusion-out.log:
Apr 15, 2016 13:34:43 PM Error [ajp-nio-8016-exec-15] - The request has exceeded the allowable time limit Tag: cfhttp The specific sequence of files included or processed is: C:\projekte\removed\So-funktioniert-es-6.html, line: 98
It does mention a specific file here, but it happens no matter what file or page you try to open. It's a really strange bug and we can't find any solution to it, nor anyone else with the same problem. The server isn't overloaded at all.
Hopefully i was specific enough for someone to point us in the right direction.
The error The request has exceeded the allowable time limit Tag itself says what's wrong.
The above error means your page has taken too long to finish
processing, so ColdFusion has ended the process in order to free up the server.
If you have access to the administrator, you can increase the timeout period
server-wide in the Settings page (Timeout requests after n seconds) - if you
just want to increase the timeout period for that particular page, you can tack
on requestTimeout=x (where x is the number of seconds before the page times
out) to the url as below:
http://your_url?requestTimeout=desired_time_in_seconds
Alternatively you can use the tag <cfsetting requestTimeOut = "desired_time_in_seconds"> within your
code to overide the default setting.
Edit: If it is occuring only on Chrome then there must be something that's breaking your request. Most probably Javascript, Ajax, Jquery. But try the above method first.
Let me summarize my problem and what I would like to achieve.
I have a SonyEricsson X10i phone with Android 2.3.3. I realized that sometimes my phone not receiving calls even if it indicating full coverage. I checked myself in the MSC/VLR and it indicates that I registered and my phone is currently active (and also there is no IMSI DETACH flag), so it should working correctly (only the last Activate Date is a little bit old ~couple of hours, which can be good as well, without SMS/Call/Location Update), as I mentioned before the phone indicates full coverage and it seems it’s on the network. But when I tried to call it I only reached the Voice Mail.
In the MSC/VLR I see No Paging Response Cause for the call, but the phone does nothing. I tried with other SW version (4.0.3 ICS), but the same result. But I not noticed similar behaviour with a different handset (same type).
Sorry for the long summary.
So because what I described above, I ‘m trying to write an application/service which will perform GSM/UMTS location update in 15-20 minutes, but I couldn’t find any kind of procedure in android.telephony.gsm.GsmCellLocation, android.telephony.TelephonyManager which will do this for me.
My other concern is the
getState()/setStateOutOfService()/ setState() procedures from ServiceState class…
It seems they not really working. For example, when I first call the getState() I always get back STATE_OUT_OF_SERVICE, which is not true…
When I’m set the state to STATE_POWER_OFF or STATE_IN_SERVICE, at least I get back that state from getState() afterwards, but the phone does nothing for that . (Not even indicate out of coverage,etc…)
Every suggestion/comment are welcome.
I have also seen this problem many times (2 phones from the same manufacturer as yours). From your question, I understand that you want to force the phone to send an MM periodic location update (which it should be sending anyway).
This is too low level, and there's nowhere you can force this directly in the programming interface. The mobility management procedure is part of the phone stack, and is specified in detail in 3GPP TS 24.008, available from www.3gpp.org. Paragraph 4.2.2 defines when the phone is supposed to send these location updates.
The only other thing would be to try by indirect means to force the phone into a condition where it would send a location update. You might be able to do that by trying to select another network manually. If it's successful, and you then manually re-select your home network, then you would trigger a location update. If it's rejected and falls back to its home network, then I think a location update would be triggered as well.
But there would also be small costs to this - battery use while it does a networks scan, and time lost while it scans and does manual network selection.
(My personal experience is that the lost calls don't happen often enough to justify this.)
I have a broadcast receiver watching the wifi state and sending an http request to me server when it becomes enabled. The problem that I have is that when I run the code under debugger it works just fine, but when I run the same code without a debugger, it throws an exception.
The exception indicates that the failure is actually the DNS resolution failure - it fails to resolve the DNS name.
I decided that even though the system fired the 'enabled' event, the DNS resolver is not fully initialized yet and added a 10sec delay before the attempt to send my request and this resolved the issue, but I am really uncomfortable with this solution. Even though in my case it does not really matter, 10 sec seems too long. A bigger question will 10 sec be enough on all platforms?
Another solution would be to intercept this particular exception and try again. The question is - how many retries?
My question is - what's the best way to wait until the DNS resolver is fully initialized? Is there an event or a notification I can subscribe to?