[android-developers] Re: Decode MP3 audio data to PCM audio format in android
Hi Robert, Thanks for the reply. How can I start work with native code? I havnt used it anytime now. I am new to it, if you can please help to start with using native code libraries, as I hav found that the native MediaPlayer and MediaPlayerService have the decode function. That it how they take mp3 data and decode it to pcm and then pass it on to the hardware thru the PV multimedia framework. So I want to access that decode function from native MediaPlayer.cpp. Thanks for the help Regards, Purvi On Dec 9, 5:23 pm, Robert Green rbgrn@gmail.com wrote: You're going to want to do that in native code. I'm sure there are some open mp3 decompressors that you will be able to get to compile in C with some adaptations. You probably won't have enough memory to decode the whole thing into ram but you can do portions at a time. I believe mp3s are frame-based so it should work. On Dec 9, 10:10 am, purvi purvi.n...@gmail.com wrote: Hi, I am streaming an MP3 audio and instead making this MP3 audio to play, I want it to be converted to PCM format and pass this PCM audio to AudioTrack(as it takes PCM data as input.) instead of passing my MP3 stream to MediaPlayer. Can anyone please help me to convert the MP3 to PCM stream? Thanks. Regards, Purvi -- 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] Decode MP3 audio data to PCM audio format in android
Hi, I am streaming an MP3 audio and instead making this MP3 audio to play, I want it to be converted to PCM format and pass this PCM audio to AudioTrack(as it takes PCM data as input.) instead of passing my MP3 stream to MediaPlayer. Can anyone please help me to convert the MP3 to PCM stream? Thanks. Regards, Purvi -- 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: problem in playing mp4 video file
Hello, I am having the same problem but with Audio Stream. My Audio stream plays well but just for say a minute, then it start giving me Command PLAYER_PREPARE completed with an error or info PVMFErrNoResources. As such the buffering still continues but donot play the buffering. Is it because too many instances of MediaPlayer are created? Can anyone please help us? Thanks. Regards, Purvi On Oct 21, 12:43 am, loril...@gmail.com loril...@gmail.com wrote: From the following link I get to know that we get the error 'PVMFErrNoResources' when the resource is not available:http://www.netmite.com/android/mydroid/external/opencore/pvmi/pvmf/in... But I am getting this error only on device. When playing the mp4 on emulator, the video plays for a fraction of a sec and then there is only sound. Could anyone please help me in solving the issue. On Oct 20, 5:38 pm, loril...@gmail.com loril...@gmail.com wrote: The MediaPlayer / VideoView only support progressive streamable contents Following link helped me in figuring out the problem:http://groups.google.com/group/android-challenge/msg/114f11e31351840d Now I am getting another error playing anothermp4file: Command PLAYER_PREPARE completed with an error or info PVMFErrNoResources error (1, -15) Anyone having an idea please let me know. On Oct 20, 4:15 pm, loril...@gmail.com loril...@gmail.com wrote: Hi All I am trying to play amp4video file from remote url on my device. (File size = 5.7 MB) I am getting following error: Command PLAYER_INIT completed with an error or info PVMFErrContentInvalidForProgressivePlayback Could anyone please let me know how to resolve this error?- Hide quoted text - - Show quoted text - -- 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: Extremely long DNS lookup (and failure) on T-Mobile network
Hello, I am also facing the same problem. I am using a handler to fetch the data coming from the network request. I am thinking to throw an alert message to the user from my app indicating No Response from Network or Network down or somthing like that so that the user donot see any error and the user himself restart the app or take corresponding steps instead of showing user an error. But I system gets to know that there is no network after all my queries are manipulated and so I dont know where exactly can I handle this error. I am able to made it print in my LogCat error[URL not found] so it doesnot give any Force Close error but I want the user to be notified about this. Can you please comment on this and incase if you can help me out with this? Thanks a lot. Regards, Purvi On Oct 15, 2:26 am, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: More info: I found out that the web site returns multiple IP addresses on the DNS lookup (see the Resolving i2.sinaimg.cn line below). This appears to be for load balancing purposes. Could this be the reason that got Android confused? $ wgethttp://i2.sinaimg.cn/IT/2009/1014/20091014235428.jpg --23:20:59-- http://i2.sinaimg.cn/IT/2009/1014/20091014235428.jpg = `20091014235428.jpg.1' Resolving i2.sinaimg.cn... 61.172.207.61, 61.172.207.62, 61.172.207.64, ... Connecting to i2.sinaimg.cn|61.172.207.61|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 93,820 (92K) [image/jpeg] On Oct 14, 9:53 pm, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: My problem may not be the same. I got this only on actual G1 device, not on emulator. Also, if G1 is connect to my home WiFi network (comcast), the DNS for i0.sinaimg.cn is resolved without any problem. However, if I disconnect Wifi and use TMO USA 3G network, the DNS never resolves. On Oct 14, 9:29 pm, for android forandr...@gmail.com wrote: http://code.google.com/p/android/issues/detail?id=2764 On Thu, Oct 15, 2009 at 4:40 AM, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: Hello, This happens only when my G1 phone is on T-Mobile network: I found that when I try to go to the browser, and type the address http://i0.sinaimg.cn/ The browser tries to load the page, but no progress is shown for more than 2 minutes. (I have full 3G signal; all other addresses work just fine) Eventually when I tried to access this URL in my Java code, I found a similar long delay when I try to open the HttpUrlConnection, and eventually I get this exception: I/InetAddress( 1940): Unknown host i0.sinaimg.cn, throwing UnknownHostException W/System.err( 1940): java.net.UnknownHostException: Host is unresolved: i0.sinaimg.cn:80 W/System.err( 1940): at java.net.Socket.connect(Socket.java:1002) Why would DNS take so long? Also, if my program tries to issue the same HTTP request again, the same 2+ minute blocking happened. Is this an Android bug or a T-Mobile infrastructure bug? It seems the Android API should try to time-out faster, especially on the second attempt.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] How to get a segmented bar just like iphone in android
Hello, Can anyone please help me to know how can we get the segmented bar in android just like we have in iphone? Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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] height of custom view
Hello, I have a custom class that extends view class. Now this custom view is set in the listadapter that extends baseadapter. Along with the custom view I have a TextView in the list. So the xml i inflate for list view is LinearLayout my.customview / TextView .../ /LinearLayout the customview sets a rounded rectangle behind the text in TextView. Now The height of the textview vary as per its content. So I want the height of the customview also vary as per the height of TextView. How can I achieve this? Can anyone please help me out with this? This is really urgent. Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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] text not linkified
Hello, I m rendering a TextView from Code using TextView tv = new TextView(this); I want the text content of TextView to be Linkify. To set the text links I tried using 1. Linkify.addLinks(tvMessage, Linkify.ALL); // where tvMessage is my TextView and 2. tvMessage.setTextAppearance(c, R.style.textlink); // where c is Context and R.style.textlink is resources style name=textlinkitem name=android:autoLinkall/item /style /resources Neither of above two code works for me. I am not able to get automatic links in the text. Can anyone please help me to set the links for text content? Can anyone tell me what is the right way to set a linkify textview from code? Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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] Custom View donot Draw in ListView
position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub //Inflate the view of main.xml LayoutInflater linf = (LayoutInflater)ctx.getSystemService (Context.LAYOUT_INFLATER_SERVICE); View v = linf.inflate( R.layout.main, parent, false); // Draw the customview in new canvas for each list cell Canvas c = new Canvas(); (v.findViewById(android.R.id.list)).draw(c); Log.d(LAYOUT, TIME + (v.findViewById(android.R.id.list)).getId ()); return v; } } Can anyone help me to find what I am doing wrong? Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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] Align tabs horizontally to the left of screen
Hello, I have a TabActivity that display tabs either on the top or bottom as specified of the screen in portrait as well as landscape view. Currectly the tabs are dislayed one row and two columns(for 2 tabs each column as one tab). Now what I require is that when the view changes from portrait to landscape, the tabs should be positioned to the left of the screen like two rows and one column each row with one tab. Can anyone please help me to arrange the tabs to the left of the screen? Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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: You must supply a resource ID for a TextView
Hi, I had the same problem, it was gone when i removed all the @override lines above the functions of the SeparateListAdapter. So try not overriding the functions. It worked for me. Regards, Purvi On Sep 27, 4:00 pm, Wouter wouterg...@gmail.com wrote: But I declare it there and then in my runnable i do adapter.notifyDatasetChanged so the listview knows there is other data to show. This works for other adapters.. Really don't know why this isn't working. My listview with headers works, i can see the first header or sometimes more but when i scroll down it crashes.. When i do for example adapter.addSection(test, new cinemaAdapter(this, cinema)); it makes 1 list with 1 header without crashing.. So there must be a problem with generating my header titles :s On 27 sep, 21:55, Marco Nelissen marc...@android.com wrote: I don't see anything obviously wrong with your code. I do notice that you apparently create the SeparatedListAdapter and then immediately call setListAdapter with it, whereas the SeparatedListAdapter sample code creates the adapter, then adds a bunch of sections to it, and then calls setListAdapter at the end. Could it be that SeparatedListAdapter doesn't work when it is empty? Have you tried postponing your call to setListAdapter until after you've added all the sections? On Sun, Sep 27, 2009 at 12:32 PM, Wouter wouterg...@gmail.com wrote: Ok i will try to explain how i generate my headers with the seperatedlistadapter.. private SeparatedListAdapter adapter; in my setupViews functions: this.adapter = new SeparatedListAdapter(this); setListAdapter(adapter); And then to retrieve my data: �...@suppresswarnings(unchecked) public void retrieveCinema() { try { HashMapString, Object response = (HashMapString, Object) client.call(film.retrieveCinema, sessionKey); Comparator reverse = Collections.reverseOrder(); TreeMapString, Object result = new TreeMapString, Object (reverse); TreeMapString, Object sortedMap = new TreeMapString, Object (response); result.putAll(sortedMap); Iterator it = result.entrySet().iterator(); while (it.hasNext()) { cinema = new ArrayListFilmDetail(); Map.Entry pairs = (Map.Entry)it.next(); Object[] cinemaFilms = (Object[])pairs.getValue(); FilmDetail cinemaMovie = new FilmDetail(); for (int i=0; icinemaFilms.length; i++) { cinemaMovie = new FilmDetail(); Map m = (Map) cinemaFilms[i]; cinemaMovie.setTitle(m.get(title).toString()); cinemaMovie.setYear(m.get(year).toString()); cinemaMovie.setVotes_count(m.get(votes_count).toString()); cinemaMovie.setActors_text(m.get(actors_text).toString()); cinemaMovie.setDirectors_text(m.get (directors_text).toString()); cinemaMovie.setGenres_text(m.get(genres_text).toString()); cinemaMovie.setAverage(m.get(average).toString()); cinemaMovie.setFilmId(m.get(filmId).toString()); cinemaMovie.setDuration(m.get(duration).toString()); cinema.add(cinemaMovie); } String datum = pairs.getKey().toString(); SimpleDateFormat formatter = new SimpleDateFormat(EE d MM); formatter.applyLocalizedPattern(EE d MM); int year= Integer.valueOf(datum.substring(0,4)); int month = Integer.valueOf(datum.substring(5,7)); int day = Integer.valueOf(datum.substring(8,10)); java.util.Date date = new java.util.Date(year, month, day); String parsed = formatter.format(date); System.out.println(parsed); adapter.addSection(parsed, new cinemaAdapter(this, cinema)); } } catch (XMLRPCException e) { e.printStackTrace(); } runOnUiThread(returnRes); } And for every date in my response i do this adapter.addSection(parsed, new cinemaAdapter(this, cinema)); and parsed is the parsed text from date (example 31 october)) And this is how i generate it! It there an error somewhere? On 27 sep, 20:23, Marco Nelissen marc...@android.com wrote: On Sun, Sep 27, 2009 at 6
[android-developers] Hello
I am an android developer and want to join this group to learn as well as contribute. Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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] When Softkeyboard in emulator appears, EditText view donot scroll up
Hi, I have a query. With SDK 1.5, I have a editText box at the very end of the screen in potrait mode. So when I click on this edittext box, the soft keyboard appears and the view should scroll up so that the user can see the cursor in editbox to type in. But with me as the view donot scroll up. My .xml layout is as follows: AbsoluteLayout TextView/ FrameLayout ListView/ /FrameLayout EditText / Button/ /AbsoluteLayout Can anyone please help me out how can I make the view scroll by itself when the soft keyboard appears? Thanks. Regards, Purvi --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---