MediaPlayer streams MP3 in emulator, but not on device - android

I'm using the MediaPlayer to stream MP3 files via http and it works great in the emulator, here's the heart of the code I'm using (targeting sdk version 8):
// play selected track
if(mediaplayer.isPlaying()){
mediaplayer.reset();
}
try {
mediaplayer.setDataSource(selectedTrack.url);
mediaplayer.prepare();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mediaplayer.start();
However, when I try to debug it on a device (Motorola Droid RAZR running 2.3.5), I get the error below:
03-23 08:51:02.873: E/MediaPlayer(9442): error (1, -1004)
03-23 08:51:02.873: W/System.err(9442): java.io.IOException: Prepare failed.: status=0x1
Here's the full stack trace for the run:
03-23 08:50:44.842: W/ActivityThread(9442): Application com.murfie.murfdroid is waiting for the debugger on port 8100...
03-23 08:50:44.850: I/System.out(9442): Sending WAIT chunk
03-23 08:50:44.858: I/dalvikvm(9442): Debugger is active
03-23 08:50:45.045: I/System.out(9442): Debugger has connected
03-23 08:50:45.045: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:45.248: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:45.451: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:45.654: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:45.850: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:46.053: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:46.256: I/System.out(9442): waiting for debugger to settle...
03-23 08:50:46.451: I/System.out(9442): debugger has settled (1490)
03-23 08:50:46.865: D/dalvikvm(9442): GC_EXTERNAL_ALLOC freed 52K, 44% free 3066K/5379K, external 2756K/2773K, paused 28ms
03-23 08:50:52.803: D/dalvikvm(9442): GC_EXTERNAL_ALLOC freed 83K, 42% free 3194K/5447K, external 3453K/3470K, paused 26ms
03-23 08:50:55.912: D/dalvikvm(9442): GC_EXTERNAL_ALLOC freed 21K, 42% free 3208K/5447K, external 4323K/4499K, paused 36ms
03-23 08:50:55.975: D/dalvikvm(9442): GC_EXTERNAL_ALLOC freed 3K, 42% free 3205K/5447K, external 5259K/5399K, paused 25ms
03-23 08:51:02.873: E/MediaPlayer(9442): error (1, -1004)
03-23 08:51:02.873: W/System.err(9442): java.io.IOException: Prepare failed.: status=0x1
03-23 08:51:02.904: W/System.err(9442): at android.media.MediaPlayer.prepare(Native Method)
03-23 08:51:02.912: W/System.err(9442): at com.murfie.murfdroid.Murfdroid.playSelectedTrack(Murfdroid.java:162)
03-23 08:51:02.912: W/System.err(9442): at com.murfie.murfdroid.Murfdroid.access$3(Murfdroid.java:151)
03-23 08:51:02.912: W/System.err(9442): at com.murfie.murfdroid.Murfdroid$4.onClick(Murfdroid.java:130)
03-23 08:51:02.920: W/System.err(9442): at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:932)
03-23 08:51:02.920: W/System.err(9442): at android.widget.AdapterView.performItemClick(AdapterView.java:290)
03-23 08:51:02.928: W/System.err(9442): at android.widget.ListView.performItemClick(ListView.java:3602)
03-23 08:51:02.928: W/System.err(9442): at android.widget.AbsListView$PerformClick.run(AbsListView.java:1838)
03-23 08:51:02.928: W/System.err(9442): at android.os.Handler.handleCallback(Handler.java:587)
03-23 08:51:02.936: W/System.err(9442): at android.os.Handler.dispatchMessage(Handler.java:92)
03-23 08:51:02.936: W/System.err(9442): at android.os.Looper.loop(Looper.java:130)
03-23 08:51:02.936: W/System.err(9442): at android.app.ActivityThread.main(ActivityThread.java:3859)
03-23 08:51:02.944: W/System.err(9442): at java.lang.reflect.Method.invokeNative(Native Method)
03-23 08:51:02.944: W/System.err(9442): at java.lang.reflect.Method.invoke(Method.java:507)
03-23 08:51:02.944: W/System.err(9442): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:840)
03-23 08:51:02.944: W/System.err(9442): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:598)
03-23 08:51:02.951: W/System.err(9442): at dalvik.system.NativeStart.main(Native Method)
03-23 08:51:02.951: E/MediaPlayer(9442): start called in state 0
03-23 08:51:02.951: E/MediaPlayer(9442): error (-38, 0)
03-23 08:51:02.975: E/MediaPlayer(9442): Error (-38,0)
I'm new to Android development so I may be missing something obvious here, but my guess is that it may be some sort of platform-specific issue based on other bits of info I've found googling around; if targeting a higher SDK version would change that, that may be a viable option but I'd prefer to make the app compatible with as many Android devices as possible.

Update -- you have "error (1, -1004)" and here's a closely related answer: Android MediaPlayer error -1004 (ERROR_IO)
Here's something that could possibly be relevant:
http://developer.android.com/reference/android/media/MediaPlayer.html#prepare()
"For files, it is OK to call prepare(), which blocks until MediaPlayer is ready for playback."
http://developer.android.com/reference/android/media/MediaPlayer.html#prepareAsync()
"For streams, you should call prepareAsync(), which returns immediately, rather than blocking until enough data has been buffered."

Ok, here's the solution I arrived at:
After reading this thread:
http://code.google.com/p/android/issues/detail?id=17553
It became obvious that what we were trying to do would never work on pre 4.x Android and that Google had no intention of fixing it. Given this, made two changes to my app to get it working:
Implemented the StreamProxy (http://code.google.com/p/npr-android-app/source/search?q=streamproxy&origq=streamproxy&btnG=Search+Trunk) approach used to make mp3 streaming compatible with pre-2.2 Android systems
Modified the API to use non-SSL URLs for media file sources
With these two changes the app now works on the Droid RAZR, Kindle Fire and any other piece of Android hardware I can come up with.

Related

googlequicksearchbox error

I am creating an app that access google map api to give location based services. I have nothing to do with the microphone still I am getting the following error in the logcat. As suggested by some websites I have already disabled my microphone and google app.I am a new user to android please,help.
ServiceManager: Permission failure: android.permission.RECORD_AUDIO from uid=10030 pid=-1
[ 03-23 05:42:02.309 1574: 6149 E/ ]
Request requires android.permission.RECORD_AUDIO
03-23 05:42:02.309 1574-6149/? E/AudioFlinger: openRecord() permission denied: recording not allowed
03-23 05:42:02.309 6661-7408/com.google.android.googlequicksearchbox:search E/AudioRecord: AudioFlinger could not create record track, status: -1
03-23 05:42:02.313 6661-7408/com.google.android.googlequicksearchbox:search E/AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -1.
03-23 05:42:02.313 6661-7408/com.google.android.googlequicksearchbox:search E/android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
03-23 05:42:02.313 6661-7408/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.aa.c#844b56e
03-23 05:42:02.316 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
03-23 05:42:02.320 6661-7408/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.aa.c#844b56e
03-23 05:42:02.322 6661-6733/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Detection finished
03-23 05:42:02.322 6661-6733/com.google.android.googlequicksearchbox:search W/ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
03-23 05:42:02.323 6661-6732/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Stopping hotword detection.
03-23 05:42:02.323 6661-6733/com.google.android.googlequicksearchbox:search W/ErrorProcessor: onFatalError, processing error from engine(4)
com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.recognizer.j.a.a(SourceFile:28)
at com.google.android.apps.gsa.staticplugins.recognizer.j.b.run(SourceFile:15)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:14)
at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.a.ai.run(SourceFile:6)
Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
at com.google.android.apps.gsa.speech.audio.Tee.f(SourceFile:103)
at com.google.android.apps.gsa.speech.audio.au.read(SourceFile:2)
at java.io.InputStream.read(InputStream.java:101)
at com.google.android.apps.gsa.speech.audio.ao.run(SourceFile:18)
at com.google.android.apps.gsa.speech.audio.an.run(SourceFile:2)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at com.google.android.apps.gsa.shared.util.concurrent.a.ax.run(SourceFile:14) 
at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4) 
at com.google.android.apps.gsa.shared.util.concurrent.a.bl.run(SourceFile:4) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 
at com.google.android.apps.gsa.shared.util.concurrent.a.ai.run(SourceFile:6) 
03-23 05:42:02.324 6661-6733/com.google.android.googlequicksearchbox:search I/AudioController: internalShutdown
03-23 05:42:02.337 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetector: Keeping mic open: false
03-23 05:42:02.337 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
03-23 05:42:02.337 6661-6735/com.google.android.googlequicksearchbox:search I/DeviceStateChecker: DeviceStateChecker cancelled
03-23 05:42:02.337 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #onError(false)
03-23 05:42:07.345 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #updateMicroDetector [detectionMode: [mDetectionMode: [1]]]
03-23 05:42:07.345 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: #startMicroDetector [speakerMode: 0]
03-23 05:42:07.346 6661-6661/com.google.android.googlequicksearchbox:search I/AudioController: Using mInputStreamFactoryBuilder
03-23 05:42:07.349 6661-6661/com.google.android.googlequicksearchbox:search I/MicroDetectionWorker: onReady
03-23 05:42:07.353 6661-6733/com.google.android.googlequicksearchbox:search I/MicroRecognitionRunner: Starting detection.
03-23 05:42:07.355 6661-7408/com.google.android.googlequicksearchbox:search I/MicrophoneInputStream: mic_starting com.google.android.apps.gsa.staticplugins.aa.c#be90ea0
03-23 05:42:07.358 1574-7906/? I/AudioFlinger: AudioFlinger's thread 0xb0797180 tid=7906 ready to run

android Mediaplayer errors after update to 5.0

Just recently update my Galaxy s5 to 5.0 from 4.4.4 and my code for my media player is broken. Everything worked fine until the update, this also occurs on my nexus 7 tablet. Im getting a url from a server and am trying to stream an mp3 from the server. This code below is all done inside of an asynctask in the onpostexecute method.
try
{
if (mediaPlayer == null)
{
mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mediaPlayer.setDataSource(sUrl);
mediaPlayer.setOnPreparedListener(this);
mediaPlayer.prepareAsync();
}
}
catch (IOException e)
{
e.printStackTrace();
}
#Override
public void onPrepared(MediaPlayer mp)
{
mp.start();
}
Here is my log
04-26 21:44:19.021 4660-4671/com.reach.sledgehammerlabs.reach D/MediaHTTPConnection﹕ filterOutInternalHeaders: key=User-Agent, val= Samsung SAMSUNG-SM-G900A stagefright/Beyonce/1.1.9 (Linux;Android 5.0)
04-26 21:44:19.021 4660-4725/com.reach.sledgehammerlabs.reach D/MediaHTTPConnection﹕ setReadTimeout with 30000ms
04-26 21:44:19.021 4660-4725/com.reach.sledgehammerlabs.reach I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-26 21:44:19.031 4660-4725/com.reach.sledgehammerlabs.reach I/System.out﹕ KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-26 21:44:19.171 4660-4674/com.reach.sledgehammerlabs.reach D/MediaHTTPConnection﹕ setReadTimeout with 30000ms
04-26 21:44:19.171 4660-4674/com.reach.sledgehammerlabs.reach I/System.out﹕ (HTTPLog)-Static: isSBSettingEnabled false
04-26 21:44:19.181 4660-4674/com.reach.sledgehammerlabs.reach I/System.out﹕ KnoxVpnUidStorageknoxVpnSupported API value returned is false
04-26 21:44:19.351 4660-4725/com.reach.sledgehammerlabs.reach V/MediaPlayer﹕ message received msg=100, ext1=1, ext2=-2147483648
04-26 21:44:19.351 4660-4725/com.reach.sledgehammerlabs.reach E/MediaPlayer﹕ error (1, -2147483648)
04-26 21:44:19.351 4660-4725/com.reach.sledgehammerlabs.reach V/MediaPlayer﹕ callback application
04-26 21:44:19.351 4660-4725/com.reach.sledgehammerlabs.reach V/MediaPlayer﹕ back from callback
04-26 21:44:19.351 4660-4660/com.reach.sledgehammerlabs.reach E/MediaPlayer﹕ Error (1,-2147483648)
I have meet the same question.Try
setDataSource(context,Uri.parse(your url))
This solve my problem.
we faced same problem on Galaxy s4 with 5.0 update, after trying many solutions we finally changed protocol of url from http to rtsp (e.g. "http://some/file/url" with "rtsp://some/file/url")and it resolved the issue
The reason it wasn't always working was because some of the urls had spaces in them and they weren't handled correctly.
http://a space vs http://a%space

Uncaught module cordova/plugin/BarcodeScanner not found PhoneGap

I had created a Phonegap android project in which I am trying to read a QRCode.For that I had included the library project Of BarcodeScanner from here https://github.com/wildabeast/BarcodeScanner .
But while I am trying to add this library to my PhoneGap Project , Initially it shows green symbol but after that it turns in red cross.
I think because of that I am getting this log in Logcat :
05-1512:48:37.489:D/DroidGap(863):onMessage(onPageFinished,file:///android_asset/www/index.html)
05-15 12:48:37.749: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.749: D/DroidGap(863): onMessage(networkconnection,3g)
05-15 12:48:37.758: D/CordovaNetworkManager(863): Connection Type: 3g
05-15 12:48:37.768: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:38.138: D/dalvikvm(863): GC_FOR_ALLOC freed 222K, 4% free 8166K/8455K, paused 40ms, total 43ms
05-15 12:48:39.579: D/DroidGap(863): onMessage(spinner,stop)
05-15 12:48:42.718: I/Choreographer(863): Skipped 30 frames! The application may be doing too much work on its main thread.
05-15 12:48:44.508: D/CordovaLog(863): Uncaught module cordova/plugin/BarcodeScanner not found
05-15 12:48:44.508: E/Web Console(863): Uncaught module cordova/plugin/BarcodeScanner not found at file:///android_asset/www/cordova-2.6.0.js:50
So I got stuck here.Any suggestion ?

Fail to add Spongycastle as provider in android

I am trying to make use of spongycastle and followed all the help I could get to include it but when the application execute it crashes at the code where I add it as a provider:
static {
Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
}
I add scprov-jdk15-1.46.99.3-UNOFFICIAL-ROBERTO-RELEASE.jar as an external JAR to my project and eclipse does not report any errors.
Any ideas?
The stacktrace:
08-11 12:41:56.653: W/ActivityThread(683): Application com.ljbrits.test4 is waiting for the debugger on port 8100...
08-11 12:41:56.723: I/System.out(683): Sending WAIT chunk
08-11 12:41:56.723: I/dalvikvm(683): Debugger is active
08-11 12:41:56.914: I/System.out(683): Debugger has connected
08-11 12:41:56.914: I/System.out(683): waiting for debugger to settle...
08-11 12:41:57.113: I/System.out(683): waiting for debugger to settle...
08-11 12:41:57.153: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:41:57.203: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
:
08-11 12:41:59.344: I/System.out(683): waiting for debugger to settle...
08-11 12:41:59.546: I/System.out(683): debugger has settled (1437)
08-11 12:41:59.693: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:41:59.824: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:00.173: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:42:00.183: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:00.193: D/dalvikvm(683): threadid=1: still suspended after undo (sc=1 dc=1)
08-11 12:42:00.283: E/dalvikvm(683): Could not find class 'org.spongycastle.jce.provider.BouncyCastleProvider', referenced from method com.ljbrits.test4.Test4Activity.<clinit>
08-11 12:42:00.283: W/dalvikvm(683): VFY: unable to resolve new-instance 417 (Lorg/spongycastle/jce/provider/BouncyCastleProvider;) in Lcom/ljbrits/test4/Test4Activity;
08-11 12:42:00.283: D/dalvikvm(683): VFY: replacing opcode 0x22 at 0x0000
08-11 12:42:00.363: D/dalvikvm(683): DexOpt: unable to opt direct call 0x07d8 at 0x02 in Lcom/ljbrits/test4/Test4Activity;.<clinit>
08-11 12:42:00.683: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:42:00.714: D/dalvikvm(683): threadid=1: still suspended after undo (sc=1 dc=1)
08-11 12:42:00.714: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
:
08-11 12:42:06.233: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:08.719: W/dalvikvm(683): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/ljbrits/test4/Test4Activity;
08-11 12:42:08.719: W/dalvikvm(683): Class init failed in newInstance call (Lcom/ljbrits/test4/Test4Activity;)
The NoClassDefFoundError thrown here suggests that the SpongyCastle classes are not being included in your deployed apk file - try unzipping the apk to check this). This could be caused by a few things, make sure you do a clean build (are you builiding with ant or eclipse?) and if the problem persists, it's likely a proguard issue - ProGuard may be stripping out classes it thinks are unused - could you post your proguard.cfg?

Adding addmob adds to main.xml crashes my app

Let me start by saying that this app was working fine the day before. I have restarted the pc, removed the project and added a previous version of the project and it keeps crashing. If i remove this from main.xml which gets loaded from the mainactivity the app does not crash. If i have this in the main.xml :
<com.google.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="a14ee1ad68dcbdb"
ads:loadAdOnCreate="true" />
the app crashes. If i run the app and this code is not in the main.xml file but in other xml files the app works fine and it will show adds from other activities.
I tried removing all the code in the xml file and just have the above admob adds in there and it still crashed. I was thinking about uninstalling eclipse and installing it again???
Any ideas????
Here is a Everything from start to finish in logcat:
03-30 11:39:17.215: D/AndroidRuntime(338): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-30 11:39:17.215: D/AndroidRuntime(338): CheckJNI is ON
03-30 11:39:17.335: D/AndroidRuntime(338): --- registering native functions ---
03-30 11:39:17.825: D/AndroidRuntime(338): Shutting down VM
03-30 11:39:17.825: D/dalvikvm(338): Debugger has detached; object registry had 1 entries
03-30 11:39:17.845: I/AndroidRuntime(338): NOTE: attach of thread 'Binder Thread #3' failed
03-30 11:39:18.215: D/AndroidRuntime(346): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
03-30 11:39:18.215: D/AndroidRuntime(346): CheckJNI is ON
03-30 11:39:18.345: D/AndroidRuntime(346): --- registering native functions ---
03-30 11:39:18.835: I/ActivityManager(59): Force stopping package com.petermihaylov.android.cardcounter uid=10040
03-30 11:39:18.835: I/Process(59): Sending signal. PID: 331 SIG: 9
03-30 11:39:18.896: I/UsageStats(59): Unexpected resume of com.android.launcher while already resumed in com.petermihaylov.android.cardcounter
03-30 11:39:18.905: W/InputManagerService(59): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#45094eb8
03-30 11:39:18.945: I/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.petermihaylov.android.cardcounter/.MainActivity }
03-30 11:39:18.945: D/AndroidRuntime(346): Shutting down VM
03-30 11:39:18.955: D/jdwp(346): Got wake-up signal, bailing out of select
03-30 11:39:18.955: D/dalvikvm(346): Debugger has detached; object registry had 1 entries
03-30 11:39:19.039: I/AndroidRuntime(346): NOTE: attach of thread 'Binder Thread #3' failed
03-30 11:39:19.155: I/ActivityManager(59): Start proc com.petermihaylov.android.cardcounter for activity com.petermihaylov.android.cardcounter/.MainActivity: pid=353 uid=10040 gids={3003}
03-30 11:39:19.345: D/dalvikvm(33): GC_EXPLICIT freed 285 objects / 10864 bytes in 186ms
03-30 11:39:19.475: W/ActivityThread(353): Application com.petermihaylov.android.cardcounter is waiting for the debugger on port 8100...
03-30 11:39:19.525: I/System.out(353): Sending WAIT chunk
03-30 11:39:19.565: I/dalvikvm(353): Debugger is active
03-30 11:39:19.595: D/dalvikvm(33): GC_EXPLICIT freed 47 objects / 2056 bytes in 249ms
03-30 11:39:19.745: I/System.out(353): Debugger has connected
03-30 11:39:19.745: I/System.out(353): waiting for debugger to settle...
03-30 11:39:19.945: I/System.out(353): waiting for debugger to settle...
03-30 11:39:20.075: D/dalvikvm(33): GC_EXPLICIT freed 2 objects / 64 bytes in 422ms
03-30 11:39:20.207: I/System.out(353): waiting for debugger to settle...
03-30 11:39:20.405: I/System.out(353): waiting for debugger to settle...
03-30 11:39:20.605: I/System.out(353): waiting for debugger to settle...
03-30 11:39:20.823: I/System.out(353): waiting for debugger to settle...
03-30 11:39:21.025: I/System.out(353): waiting for debugger to settle...
03-30 11:39:21.225: I/System.out(353): waiting for debugger to settle...
03-30 11:39:21.468: I/System.out(353): waiting for debugger to settle...
03-30 11:39:21.677: I/System.out(353): debugger has settled (1469)
03-30 11:39:29.005: W/ActivityManager(59): Launch timeout has expired, giving up wake lock!
03-30 11:39:29.421: W/ActivityManager(59): Activity idle timeout for HistoryRecord{450bae78 com.petermihaylov.android.cardcounter/.MainActivity}
Looks like you're trying to debug the app, and it's hanging on debug. Do you get any more relevant logs if you try to just run it?
Also, have you updated to r17 of the Android Tools by any chance? r17 of the tools force you to place the SDK in the libs/ folder of your project.
Are you sure you have stepped through a tutorial properly and added the permissions and imported the SDK?
Try stepping through this guide from the beginning:
https://developers.google.com/mobile-ads-sdk/docs/android/fundamentals
Cleaning the project in Eclipse sometimes solves some problems.
I had a very similar bizarre issue with Admob recently after a fresh install of Eclipse. After hours of looking into why, it ended up being my build order in the project preferences. I set the Google AdMob jar to the top, cleaned the project and all my issues were resolved.
The logcat text you have pasted does not give any error information. Can you paste the logcat text from the point of failure, generally you can see the communications with AdMob in here.
May help, just a thought.
New version of Android LED Clock just uploaded to the market
Jason

Categories

Resources