tbchamp / UWCSE403-Recipe-Reader

Android app for easier recipe cooking!
http://cubist.cs.washington.edu/projects/12wi/cse403/r/index.html
1 stars 0 forks source link

Starting a reading of a recipe, backing out to list of recipes, and going back to start the reading causes app to break #38

Closed yamana closed 12 years ago

yamana commented 12 years ago

If you start the reading of a recipe, back out to the favorites list, and then try to start reading a recipe again, you have to force close the app. Kristin, I think this might have to do with what you were saying about the async nature of the fragments and views. I'm trying the pass the listview to the recipeviewactivity so highlighting can occur. If that's the case, let me know.

kristinkarpack commented 12 years ago

I don't think the fragments are the problem: when I back out of recipe reading to the list, there's an exception about leaking services and mentions the TTS. I think we may need to deal with this here http://developer.android.com/reference/android/app/Activity.html#onPause() or here http://developer.android.com/reference/android/app/Activity.html#onDestroy(). Or, I'm not sure how TTS is set up, but Anton did something in the button listeners for the 3 bottom buttons that stops the STT when the execute-recipe screen is left.

yamana commented 12 years ago

Hmmm, interesting. I'm seeing the exception you're talking about, but it doesn't seem to be causing the problem. I looked more into the error I was getting and it seems it has to do with VoiceRecognition.java. Something about the start() method and the line Sensor.start(). Runtime error. I commented out all of the voice recognition stuff in the RecipeViewActivity.java and I stopped getting the error. So the error that causes it to crash, I think has to do with that. I'll look into the leaking TTS stuff, though.

yamana commented 12 years ago

Ok, so I fixed the TTS leakage problem. But the runtime error thing with the VoiceRecognition stuff still exists. I'll shoot Anton an email about it.