question

baloota avatar image
baloota asked

IllegalArgumentException @ AdContainer.onClick

Hi, We've recently implemented the Amazon interstitial ads. We started to receive an exception from several devices regarding the TextToSpeech service not registered. What does that mean? Here is the complete exception: java.lang.IllegalArgumentException: Service not registered: android.speech.tts.TextToSpeech$Connection@41dbd3b0 at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:918) at android.app.ContextImpl.unbindService(ContextImpl.java:1394) at android.content.ContextWrapper.unbindService(ContextWrapper.java:412) at android.speech.tts.TextToSpeech$Connection.disconnect(TextToSpeech.java:1321) at android.speech.tts.TextToSpeech$1.run(TextToSpeech.java:661) at android.speech.tts.TextToSpeech$1.run(TextToSpeech.java:656) at android.speech.tts.TextToSpeech$Connection.runAction(TextToSpeech.java:1331) at android.speech.tts.TextToSpeech.runAction(TextToSpeech.java:570) at android.speech.tts.TextToSpeech.runActionNoReconnect(TextToSpeech.java:557) at android.speech.tts.TextToSpeech.shutdown(TextToSpeech.java:656) at android.webkit.AccessibilityInjector$TextToSpeechWrapper.shutdown(AccessibilityInjector.java:546) at android.webkit.AccessibilityInjector.removeTtsApis(AccessibilityInjector.java:368) at android.webkit.AccessibilityInjector.removeAccessibilityApisIfNecessary(AccessibilityInjector.java:129) at android.webkit.WebViewClassic.onDetachedFromWindow(WebViewClassic.java:7823) at android.webkit.WebView.onDetachedFromWindow(WebView.java:1919) at android.view.View.dispatchDetachedFromWindow(View.java:12107) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2776) at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3893) at android.view.ViewGroup.removeViewInternal(ViewGroup.java:3868) at android.view.ViewGroup.removeView(ViewGroup.java:3800) at com.amazon.device.ads.ViewManager$1.run(SourceFile:485) at com.amazon.device.ads.ThreadUtils.executeOnMainThread(SourceFile:108) at com.amazon.device.ads.ViewManager.destroyWebViews(SourceFile:474) at com.amazon.device.ads.ViewManager.destroy(SourceFile:132) at com.amazon.device.ads.AdContainer.destroy(SourceFile:124) at com.amazon.device.ads.AdController.resetToReady(SourceFile:462) at com.amazon.device.ads.AdController.closeAd(SourceFile:1144) at com.amazon.device.ads.AdContainer$2$1.onClick(SourceFile:518) at android.view.View.performClick(View.java:4232) at android.view.View$PerformClick.run(View.java:17298) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4921) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) at dalvik.system.NativeStart.main(NativeStart.java) Thanks! Alik
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
Ensure that you are using the latest version of the Amazon Mobile Ads SDK, currently version 5.4.235, available here: https://developer.amazon.com/public/resources/development-tools/sdk
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Filippo T. avatar image
Filippo T. answered
Hi, my SDK version is 5.6.20 and i still have this problem: http://crashes.to/s/251433b7b40
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
android.speech.tts.TextToSpeech is not a part of the Amazon Mobile Ads SDK. Please refer to the mobile ads sample apps included with the SDK. They are fully functioning demos of all Amazon Mobile Ad types. These samples should help you better understand how Amazon Mobile Ads are implemented. Code can be copied directly from these projects and modified as needed to quickly place ads in your app. More information regarding these sample apps can be found here: https://developer.amazon.com/public/apis/earn/mobile-ads/docs/sample-apps.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andrew@Amazon avatar image
Andrew@Amazon answered
It appears this is an issue with how the WebViews for our Ads are created and can be addressed by using the ApplicationContext when creating our WebViews. Thanks for all your input. We will fix this in a future release.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.