[android-developers] AudioRecord producing no sound
As i have re-written this several times now. It is very nasty. Im testing on a DroidX where everything i use to record a call is coming back empty. Anyone know why or a fix? My recording class: [code] package com.call.tests; import android.media.AudioFormat; import android.media.AudioRecord; import android.media.MediaRecorder; import android.media.MediaRecorder.AudioSource; import android.os.Environment; import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; class Record { private MediaRecorder recorder = null; private AudioRecord rawRecorder = null; public boolean recording = false; private Thread recordingThread = null; public String path = ; public String tempPath = ; public void BeginRecording(String incomingNumber) { try { //recorder = new MediaRecorder(); if(incomingNumber.length() == 0) incomingNumber = noNumber; Date dateNow = new Date (); SimpleDateFormat dateformat = new SimpleDateFormat(_kms_MMdd); StringBuilder now = new StringBuilder( dateformat.format( dateNow ) ); path = incomingNumber + now.toString(); Log.d(TEST, NEW PATH: + path); String longPath = sanitizePath(path, false); File directory = new File(longPath).getParentFile(); if (!directory.exists() !directory.mkdirs()) { Log.d(TEST, Path to file could not be created.); } else { Log.d(TEST, Path exists.); } rawRecorder = findAudioRecord(); rawRecorder.startRecording(); recording = true; recordingThread = new Thread(new Runnable() { @Override public void run() { writeAudioDataToFile(); } },AudioRecorder Thread); recordingThread.start(); /*recorder.reset(); recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_DOWNLINK); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); recorder.setOutputFile(longPath); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT); Log.e(TEST, Recording values set); //try{ recorder.prepare(); recorder.start(); //Log.e(TEST, Recording: + recording); //} catch (IOException e) { //Log.e(TEST, prepare() failed : + e.toString()); //}*/ } catch(Exception ex) { Log.d(TEST, BeginRecording: + ex.toString()); } } private static int[] mSampleRates = new int[] { 8000, 11025, 22050, 44100 }; public AudioRecord findAudioRecord() { for (int rate : mSampleRates) { for (short audioFormat : new short[] { AudioFormat.ENCODING_PCM_8BIT, AudioFormat.ENCODING_PCM_16BIT }) { for (short channelConfig : new short[] { AudioFormat.CHANNEL_IN_MONO, AudioFormat.CHANNEL_IN_STEREO }) { try { Log.d(TEST, Attempting rate + rate + Hz, bits: + audioFormat + , channel: + channelConfig); int bufferSize = AudioRecord.getMinBufferSize(rate, channelConfig, audioFormat); if (bufferSize != AudioRecord.ERROR_BAD_VALUE) { AudioRecord recorder = new AudioRecord(AudioSource.VOICE_CALL, rate, channelConfig, audioFormat, bufferSize); if (recorder.getState() == AudioRecord.STATE_INITIALIZED) return recorder; } } catch (Exception e) { Log.e(TEST, rate + Exception, keep trying.,e); } } } } return null; } public void writeAudioDataToFile() { tempPath = temp_raw_record; String longPath = sanitizePath(tempPath, true); File directory = new File(longPath).getParentFile(); if (!directory.exists() !directory.mkdirs()) {
[android-developers] Re: Are the market stats for developers broken?
Bump. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?
Still not fixed. If google can't fix this, they should feature all of our apps or at least show some kind of concession for messing up our stats. Our app has fallen out of the top 4 in category and never returned back despite always being in top 3, usually top 2 before the stats messed up. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?
Any app that updated on or around the 18th December lost 10 - 15% of their active installs in less than a day. Active installs is the largest component of determining ranking in the Android market and so these apps have dropped significantly in the rankings (mine from 2nd to 5th in category). The stats have never been restored and these apps are still much lower placed than before the market error occurred. Google admitted this was an error on their part (see message from Dontae on link below) but have never reverted the stats to their correct values. http://www.google.com/support/forum/p/Android+Market/thread?tid=4c5752ca3e5af4ffhl=en Quoted below is the official response from Google 4 weeks ago : 'There was an issue impacting a limited number of developers that can be traced back to December 18th. Our team has implemented a fix that will return all impacted developers' Active User numbers to normal. We will remain vigilant in order to ensure that any data that does not automatically return to active user counts is properly applied. Please allow some time for this information to return to its normal state and per usual, be sure to let us know if anything irregular pops onto your radar.' -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Protection Method to avoid an .apk being copied overall
The general response to this question I have seen is as follows : - spend time improving your app, not the copy protection - it will get hacked anyway - storing gmail or ime numbers is against data protection act Personally I feel everyone is entitled to try and protect their apps and would take the dev's not the pirate's side, but beware of stepping into a lion's den as I saw someone do before. I would add that any attempt you make is likely to fail as google checkout is the only viable mechanism of selling apps in volume and it doesn't give any mechanisms to associate a purchased non-refunded payment with an apk. Until Google does this, I think most other attempts will be a waste of time. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?
still not fixed :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?
I don't have maxsdk but did add this change for Droid support : supports-screens android:anyDensity=true / My installs have dropped by 15% - maybe its auto uninstalling for anyone with 1.5 as the supports-screens is 1.6 only - yet I need this to make the app work correctly on Droid (rather than compatibility mode). Issues seems to be related after people do updates and possibly change some of these settings. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Are the market stats for developers broken?
phew - its not just me then - thought everyone has abandoned my app in the last week (14% unaccounted drop in active installs in 7 days even after staying steady for the last 8 months) - even though i haven't changed anything! thought i'd done something to upset all my users all at once ... google please fix -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ADC2 Results?
Very impressed by some of the winners - World of Photo and PlinkArt in particular - both highly original and innovative. However, other winners are disappointing because there are already examples of these apps done better in the market. Won't mention names as I don't want to offend any developers. The publicity and financial rewards are merited in some cases but in others, it does distract from some of the market apps which have been out longer and flourished into superb apps. Google should be doing more to recognize the excellence that already exists on the market. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en