Android HTC Desire Voice input issues - voice-recognition

Would anyone have an idea as to why an app would work on almost every phone that has 2.1 but not the Desire?
One of my apps uses voice input and the Desire is the only phone that force closes when the voice prompt comes up.
The worst part is that I don't know how to test this, I don't have one or know anyone who does.
Any ideas?
EDIT:
I finally found out that HTC disabled voice in the Desire and you have to do a work around to install it.
So if you are relying on voice input make sure you use the code in the google example to catch the error:
PackageManager pm = getPackageManager();
List<ResolveInfo> activities = pm.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
if (activities.size() == 0) {
noResults.setText("Voice input not found on this phone.");
}else{
//If voice is enabled
}

I think the most important thing to do first is to get the exception report. Since you can't test it by yourself, I would use a tool to get the exception report from your customers. In Android 2.2 the built-in tool can be used. If you have other targeting SDKs I would recommend this services: http://code.google.com/p/android-remote-stacktrace/ to get a remote stacktrace.
Then if you post the stacktrace here, I think somebody will be able to help you!

Related

webAudio - webRTC echoCancellation constraint doesn't seem to work

I am hearing my own voice come back from remote client during a webRTC call. What comes out of the speaker is picked up by the mic. I have applied echoCancellation:true and also tried it for false but there seems to be no effect at all.
After failing to make it work, I want to try custom echoCancellation using webAudio. I tried to find some code example on the internet but I failed. Can anyone help with an echo cancellation implementation using webAudio?
Thank you

How to detect network in Blackberry 10 Dev Alpha Simulator using qnx.net.NetworkManager on Air SDK

I'm trying to detect internet connection of the simulator using this code
if (
NetworkManager.networkManager.isConnected(NetworkType.WIFI) ||
NetworkManager.networkManager.isConnected(NetworkType.CELLULAR)
) {
//we have connection!!
doSomething();
} else {
//no connection =(
showError();
}
However, this always returns false. It seems that the simulator uses another kind of network not identified by NetworkType constants. I think this happens because VMWare makes connection possible through black magic.
So i am not sure if I should stick to this code and hope it will work in a real device using WiFi or Cellular network, or should find another approach for what I need.
I've also tried doing this (passing no parameters)
NetworkManager.networkManager.isConnected()
but it will always return true despite if I have internet connection or not in my PC. I think VMWare is trolling me again.
So, any advice on how should I do this for better results in a real device?
Well, just to update. I finally got a BBZ10, and had a chance to try this code. It seems that
NetworkManager.networkManager.isConnected(NetworkType.WIFI)
and
NetworkManager.networkManager.isConnected(NetworkType.CELLULAR)
will work the way they are expected, even if the emulator can't really emulate their funcionality.
So, if you really need this functionality, go ahead and try this, it WILL really work once deployed.

How to use console.profile in a WinJS enabled app?

I'm currently working on an app using javascript which has a recursive function. I would like to use console.profile in order to inspect it, but I can't find exactly how to get the output of the profile session.
I start my session with the following;:
console.profile("sessionName")
But the following doesn't log anything to console on my machine:
console.profileEnd("sessionName");
The following doesn't seem to catch anything either
var d = console.profileEnd("sessionName");
How should it be done?
You should use the Visual Studio 2012 profiler with Debug\Start performance analysis paused, and then unpause it from the point in your program you wish to take a profile.

how to get errors from tileupdatemanager

In my winrt app, I am trying to update the live tile based on polled URIs. There is currently no update happening and I can't figure out how to troubleshoot. There are numerous scenarios that could be breaking things but i can't seem to find anyway to get insight into potential errors.
The TileUpdateManager seems to be a bit of a black hole that absorbs information but never lets it out.
Does anyone know of how to view errors from the TileUpdateManager?
If it interests anyone, here is my update code:
TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);
PeriodicUpdateRecurrence recurrence = PeriodicUpdateRecurrence.HalfHour;
List<Uri> urisToPoll = new List<Uri>();
urisToPoll.Add(new Uri(#"http://livetileservice2012.azurewebsites.net/api/liveupdate/1"));
urisToPoll.Add(new Uri(#"http://livetileservice2012.azurewebsites.net/api/liveupdate/2"));
TileUpdateManager.CreateTileUpdaterForApplication().StartPeriodicUpdateBatch(urisToPoll, recurrence);
To expand on Nathan's comment, here are two steps you can take to troubleshoot:
Enter your URI straight into a browser to see the results that are returned, and inspect them for being proper XML. As Nathan points out, your URIs are returning JSON which will be ignored by the tile update manager. As a working example (that I use in Chapter 13 of my HTML/JS book), try http://programmingwin8-js-ch13-hellotiles.azurewebsites.net/Default.cshtml.
If you feel that your URI is returning proper XML, try it in the Push and Periodic Notifications Sample (Scenarios 4 and 5 for tiles and badges). If this works, then the error would be in your app code and not in the service.
Do note that StartPeriodicUpdate[Batch] will send a request to the service right away, rather than waiting for the first interval to pass.
Also, if you think that you might have a problem with the service, it's possible to step through its code using Visual Studio Express for Web running on the localhost, when the app is also running inside Visual Studio Express for Win8 (where localhost is enabled).
.Kraig

iOS - Multiple apps using FMOD - audio only works in the first app to be run

I'm working on an existing app that I did not develop, and it plays its audio using FMOD.
From the looks of things, previous versions of the app were written to use AVAudioPlayer instead, and there are build options to use either.
The most recent versions use FMOD though, because a lot of the functionality is only included when built using the FMOD version.
The problem comes when I use one of the existing apps first, then try to run this new one that I'm developing.
If I run one app, then leave it in the background and run the second app, the sound in the second app doesn't play at all. I can go back to the first app and play sound without problems. If I kill both apps, and start the other one first, then it works perfectly.
If I build the app using the AVAudioPlayer option, then I don't get this problem, but also all of the functionality that was written for the FMOD version is not there. I can therefore prove that it is something to do with FMOD, but can't figure out what.
EDIT:
Have done a little more digging, and I'm getting two FMOD errors:
Firstly, when I run:
result = fmodSystem->init(4, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL);
I get error 51 - "A socket error occurred. This is a catch-all for socket-related errors not listed elsewhere."
Secondly, when I run:
result = fmodSystem->createSound((const char *)[audioData bytes], FMOD_SOFTWARE | FMOD_OPENMEMORY, &exinfo, &fmodSound);
I get error 79 - "This command failed because System::init or System::setDriver was not called."
The second seems to be because the init failed.
This was answered via Twitter, therefore I'll put the answer here myself, however, if Stuart would like to answer it himself here, then I'll vote that as the answer.
The answer is to disable: FMOD_INIT_ENABLE_PROFILE, because that can only run in one app at a time:
Therefore, this:
result = fmodSystem->init(4, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, NULL);
Should become this:
result = fmodSystem->init(4, FMOD_INIT_NORMAL, NULL);