[android-developers] MediaController is not working properly with MediaPlayer
Hi, I want to enable the MediaController for the MediaPlayer. For this I have written the code like this: public class AudioPlayerNew extends Activity implements MediaPlayerControl,MediaPlayer.OnPreparedListener,MediaPlayer.OnBufferingUpdateListener { MediaController mediaController; MediaPlayer mMediaPlayer; private String path = /sdcard/Kaarulo Shikarukelle.mp3; int percent = 1; boolean playerState = true; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.sdcard_media_view); mediaController = (MediaController) findViewById (R.id.MediaController01); playAudio(path); mediaController.setAnchorView( findViewById (R.layout.sdcard_media_view)); mediaController.setMediaPlayer(this); mediaController.bringToFront(); mediaController.setEnabled(true); } private void playAudio(String media) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.prepare(); mMediaPlayer.setOnSeekCompleteListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnErrorListener(this); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } @Override protected void onDestroy() { super.onDestroy(); // TODO Auto-generated method stub dismissDialog(); if(null != mMediaPlayer) { mMediaPlayer.release(); mMediaPlayer = null; } wakeLock.release(); } @Override public int getBufferPercentage() { System.out.println(MediaController.getBufferPercentage() called!!!); // TODO Auto-generated method stub return percent; } @Override public int getCurrentPosition() { System.out.println(MediaController.getCurrentPosition() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getCurrentPosition(); } @Override public int getDuration() { System.out.println(MediaController.getDuration() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getDuration(); } @Override public boolean isPlaying() { //System.out.println(MediaController.isPlaying() called!!!); // TODO Auto-generated method stub return playerState; } @Override public void pause() { //System.out.println(MediaController.pause() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer) { mMediaPlayer.pause(); } playerState = false; } @Override public void seekTo(int pos) { // TODO Auto-generated method stub //System.out.println(MediaController.seekTo() called!!!); if(mMediaPlayer != null) { mMediaPlayer.seekTo(pos); } } @Override public void start() { //System.out.println(MediaController.start() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer )// !mMediaPlayer.isPlaying()) { mMediaPlayer.start(); } playerState = true; } @Override public void onPrepared(MediaPlayer arg0) { // TODO Auto-generated method stub dismissDialog(); mMediaPlayer.start(); } @Override public void onCompletion(MediaPlayer mp) { // TODO Auto-generated method stub Log.i(VideoViewDemo -, onCompletion() calledoc); setProgressBarIndeterminateVisibility(false); finish(); } @Override public void onBufferingUpdate(MediaPlayer mp, int arg1) { System.out.println(Buffer percentage :+arg1); // TODO Auto-generated method stub percent = arg1; } @Override public boolean onError(MediaPlayer mp, int what, int extra) { isVideoFilePlayedProperly = false; // TODO
[android-developers] How to set HorizontalScrollView's initial offset?
Hi, I searched the groups to find a topic about setting horizontal scroll view's offset, but no results. Some topics talked about ScrollView, and they are not expected. Here is my question: I have a HorizontalScrollView, with LinearLayout as its child, the LinearLayout contains a custom view, I finished the onDraw method of the custom view to draw something which is longer than the screen's horizontal size, so I think HorizontalScrollView is the right widget that I need. But I do not want to display the left-most part of my custom view, such as a calendar, I can display the last week and next week in the custom view, but what I want to put in the center of the scroll view is today. So, I wonder how I should set the initial offset of the HorizontalScrollView? Any help will be greatly welcomed. Thanks. --~--~-~--~~~---~--~~ 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] Reducing Image File size
Hi Guys, I want to reduce the size of my image file to transfer it over the network. Do anybody know how can I reduce the file size using andriod APIs. Thanks Shrikant Agrawal --~--~-~--~~~---~--~~ 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 draw curve smoothly
I have lots of discrete points and want to link them together smoothly. How to do that? Is there any api to call ? Thanks a lot. --~--~-~--~~~---~--~~ 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: Reducing Image File size
if u r using the bitmapfactory, then u can use the cofig to set sample size to watever u want... higher the samplesize lower the file size ( quality)... try it out... hope it helps u... On Mon, Jun 22, 2009 at 12:22 PM, Shrikant Agrawal shrikant...@gmail.comwrote: Hi Guys, I want to reduce the size of my image file to transfer it over the network. Do anybody know how can I reduce the file size using andriod APIs. Thanks Shrikant Agrawal -- Regards, Sujay P. J. O'Rourkehttp://www.brainyquote.com/quotes/authors/p/p_j_orourke.html - If government were a product, selling it would be illegal. --~--~-~--~~~---~--~~ 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] Where to store data
Hi All, i'm writing an application that needs to store some small jpeg or pngs. Looking at the documentation i have seen that databases are stored under /data/data/package_name/databases I decided to store my data under /data/data/package_name/files. With the emulator i can see all these files (databases and images) under the proposed directories but moving the application on a real device and installing a file system browser i cannot see any file under /data. Can anyone explain me why? My application works perfectly on my mobile (HTC magic) so i think that data is downloaded and stored. If this is a security constraint, do i need to put the application under debug on the mobile in order to inspect file system? Kind Regards, MF --~--~-~--~~~---~--~~ 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: Multicast receive broken in Android 1.5?
I have the same problem after upgrading to 1.5, and it seems it's because the IP Multicast join packet is never sent out. I reported the bug here: http://code.google.com/p/android/issues/detail?id=2917 On May 31, 11:38 am, Dave d...@devbury.com wrote: I have an application that sends and receives DatagramPackets on a MulticastSocket. This application works fine on Android 1.1. I just loaded the application onto Android 1.5 and it can no longer receive packets from other hosts. It can receive the packets that it sends out though. Packets sent from android 1.5 do make it to other hosts. Did something change in 1.5 or is something broken? I'm using the dev phone 1 and not the emulator. Thanks --~--~-~--~~~---~--~~ 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: Enabling camera in the emulator !
In my experience, I found camera comes up on emulator only once after every reboot of your windows system. From then onwards viewfinder with checked box comes up once in 10 times. Someone said on Ubuntu system it works better. -vignesh On Sun, Jun 21, 2009 at 3:24 AM, hanged_man majd...@gmail.com wrote: **Bump** Anyone has any slight idea about this issue ? --~--~-~--~~~---~--~~ 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] Problem with setExtra
I am trying to setExtra(string, int) in an Intent which will be used in startActvityForResult(). This works: Intent i = new Intent(this, ClassA.class); i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); This doesn't: Intent i = new Intent(this, ClassA.class); i.putExtra(intStringName, intArg); // where the args are (String, int) i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); If I try to catch the putExtra with a try/catch block, it still fails. Any reason why this doesn't work? --~--~-~--~~~---~--~~ 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 with setExtra
by doesnt work do u mean that u r unable to read the extra in ur target activity? if so plz post d code tat u r usin for this purpose... so tat we can find d actual mistake.. On Mon, Jun 22, 2009 at 1:40 PM, Will wbc...@gmail.com wrote: I am trying to setExtra(string, int) in an Intent which will be used in startActvityForResult(). This works: Intent i = new Intent(this, ClassA.class); i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); This doesn't: Intent i = new Intent(this, ClassA.class); i.putExtra(intStringName, intArg); // where the args are (String, int) i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); If I try to catch the putExtra with a try/catch block, it still fails. Any reason why this doesn't work? -- Regards, Sujay Fran Lebowitzhttp://www.brainyquote.com/quotes/authors/f/fran_lebowitz.html - Life is something to do when you can't get to sleep. --~--~-~--~~~---~--~~ 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: Permissions for Android Dev Phone 1
in the manifest file nothing is written. yes I'm installing my own app and this app is using the camera of the device. if there is no permission set in the manifest file to use the camera isn't this a security break that the app is installed normally and uses the camera without any problems? On Jun 20, 12:09 am, Dianne Hackborn hack...@android.com wrote: It does behave the same way. You'll need to explain exactly what you are doing. On Thu, Jun 18, 2009 at 12:16 AM, hanasnap hana...@yahoo.com wrote: Hi, If anyone can help me with some information if there is a way to make an application on Android Dev Phone ask for permissions, like it does on G1. When I install an application on ADP, I only get the message no permissions required, is there a way to make the ADP behave like a G1 phone? Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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: global variable and get website address question
I use SharedPreferences to do such things. You can not use static var in service, because system always kill service when there is a low memory situations --~--~-~--~~~---~--~~ 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]
Hi all Uploading pictures to picasa always fails in my phone !!! Does anybody has faced similar problem !!! It always says retrying after 1 minute, 3 minute Regards Joe --~--~-~--~~~---~--~~ 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: MediaController is not working properly with MediaPlayer
Hi, why can't my seek bar (with time) is not updating according to mediaplayer time. Can any one please help me. Thanks, Manoj. On Jun 22, 11:37 am, manoj manojkumar.m...@gmail.com wrote: Hi, I want to enable the MediaController for the MediaPlayer. For this I have written the code like this: public class AudioPlayerNew extends Activity implements MediaPlayerControl,MediaPlayer.OnPreparedListener,MediaPlayer.OnBufferingUp dateListener { MediaController mediaController; MediaPlayer mMediaPlayer; private String path = /sdcard/Kaarulo Shikarukelle.mp3; int percent = 1; boolean playerState = true; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.sdcard_media_view); mediaController = (MediaController) findViewById (R.id.MediaController01); playAudio(path); mediaController.setAnchorView( findViewById (R.layout.sdcard_media_view)); mediaController.setMediaPlayer(this); mediaController.bringToFront(); mediaController.setEnabled(true); } private void playAudio(String media) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.prepare(); mMediaPlayer.setOnSeekCompleteListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnErrorListener(this); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } @Override protected void onDestroy() { super.onDestroy(); // TODO Auto-generated method stub dismissDialog(); if(null != mMediaPlayer) { mMediaPlayer.release(); mMediaPlayer = null; } wakeLock.release(); } @Override public int getBufferPercentage() { System.out.println(MediaController.getBufferPercentage() called!!!); // TODO Auto-generated method stub return percent; } @Override public int getCurrentPosition() { System.out.println(MediaController.getCurrentPosition() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getCurrentPosition(); } @Override public int getDuration() { System.out.println(MediaController.getDuration() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getDuration(); } @Override public boolean isPlaying() { //System.out.println(MediaController.isPlaying() called!!!); // TODO Auto-generated method stub return playerState; } @Override public void pause() { //System.out.println(MediaController.pause() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer) { mMediaPlayer.pause(); } playerState = false; } @Override public void seekTo(int pos) { // TODO Auto-generated method stub //System.out.println(MediaController.seekTo() called!!!); if(mMediaPlayer != null) { mMediaPlayer.seekTo(pos); } } @Override public void start() { //System.out.println(MediaController.start() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer )// !mMediaPlayer.isPlaying()) { mMediaPlayer.start(); } playerState = true; } @Override public void onPrepared(MediaPlayer arg0) { // TODO Auto-generated method stub dismissDialog(); mMediaPlayer.start(); } @Override public void onCompletion(MediaPlayer mp) { // TODO Auto-generated method stub Log.i(VideoViewDemo -, onCompletion() calledoc); setProgressBarIndeterminateVisibility(false); finish(); } @Override public void onBufferingUpdate(MediaPlayer mp, int arg1) {
[android-developers] Re: [android-developers]
That means that u r not connected via wi-fi... generally, apps that need a transfer huge amt of data use a wifi-lock they dont get connected if the wifi-connectivity is lost... On Mon, Jun 22, 2009 at 2:52 PM, Joe Petruchi petruchi.dr...@gmail.comwrote: Hi all Uploading pictures to picasa always fails in my phone !!! Does anybody has faced similar problem !!! It always says retrying after 1 minute, 3 minute Regards Joe -- Regards, Sujay Casey Stengelhttp://www.brainyquote.com/quotes/authors/c/casey_stengel.html - All right everyone, line up alphabetically according to your height. --~--~-~--~~~---~--~~ 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: [android-developers]
Hi I am trying to use the GPRS network to upload the pictures !!! It is working fine in my friends mobile so i am curious why it is not working in my mobile ? Any idea do we have to some setting in picasa also for the download to happen Regards Joe On Mon, Jun 22, 2009 at 3:06 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: That means that u r not connected via wi-fi... generally, apps that need a transfer huge amt of data use a wifi-lock they dont get connected if the wifi-connectivity is lost... On Mon, Jun 22, 2009 at 2:52 PM, Joe Petruchi petruchi.dr...@gmail.comwrote: Hi all Uploading pictures to picasa always fails in my phone !!! Does anybody has faced similar problem !!! It always says retrying after 1 minute, 3 minute Regards Joe -- Regards, Sujay Casey Stengelhttp://www.brainyquote.com/quotes/authors/c/casey_stengel.html - All right everyone, line up alphabetically according to your height. --~--~-~--~~~---~--~~ 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: Issues with Android SDK
Thanks for all ur suggestions.. The problem got fixed itself after few reruns of the eclipse. I recommend to use VMware player and run Ubuntu to have a Linux like development environment, but if you have a slow machine it does not make sense. -- I have a 3GB RAM, still I am planning to try on Ubuntu. - Yes. Once you create an android project in Eclipse, select Run As... Android Application. This will ask you to create an AVD and will run an emulator with your app. Leave the emulator around, you don't need to close it every time to want to run your app. - Is there any way that I can view/edit the source code of the .apk ? Also, on Vista with the versions I mentioned above, I am not able to run multiple instances of the emulators thru eclipse. Is it a bug or some problem with my installations? While using cmd prompt, I even changed the tcp port using -port command. Though two emulators are running with different IDs, they dont communicate, as in I am not able to make/rcv calls b/w them. Will installing Ubuntu instead help? thanks again, Sha On Jun 19, 9:13 am, Raphael r...@android.com wrote: On Wed, Jun 17, 2009 at 2:24 AM, Shasha.andr...@gmail.com wrote: Hi Folks, I am new to android. I am trying to install Android SDK(android-sdk- windows-1.5_r2) on the Eclipse (eclipse-jee-ganymede-SR2-win32) in Windows Vista. I have followed the steps mentioned in thehttp://developer.android.com/sdk/1.5_r2/index.html. Everything works fine, I am able to even run the HelloWorld program on the emulator. The issue is that I have to install the Android SDK (add site and install the development tools) every time I start the Eclipse. Its very time taking and I don't know if its a bug or some problem with Vista or my system as such. You should not have to reinstall the plugin every time you run Eclipse. Are you sure the plugin is not there anymore? You can check by looking at the Software Update or HelpAboutPlugins panels. If the plugin disapears once you quite Eclipse, there's something seriously wrong with your installation of Eclipse. Can you please help me with that?? Also, Is there some way that I can run an application (.apk) on the emulator using Eclipse?? I am also Yes. Once you create an android project in Eclipse, select Run As... Android Application. This will ask you to create an AVD and will run an emulator with your app. Leave the emulator around, you don't need to close it every time to want to run your app. R/ not able to just run the emulator from the tools directory in the android_SDK folder. Isn't it supposed to run without the Eclipse??? I will really be very thankful if you can help me out with it!!!... thanks Sha- 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] Re: 6502 Emulator
For example, this: byte b0, b1; b0 = mMemory.data[0]; b1 = mMemory.data[1]; is not as fast as: byte[] data = mMemory.data; byte b0, b1; b0 = data[0]; b1 = data[1]; Isn't the JITter smart enough to convert (1) to (2) above? --~--~-~--~~~---~--~~ 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: [android-developers]
My GPRS provider does not allow large transfers in a single connection... If that's wat ur provider also does, then it wont work... So i could never upload anything frm my G1 I'm still in the search for a workaround so that i could do this overriding my providers restrictions... Hmm...theres one thing u can do.. try sm other upload... so that u can be sure that the prob is not with ur conn... Cheers, Sujay On Mon, Jun 22, 2009 at 3:15 PM, Joe Petruchi petruchi.dr...@gmail.comwrote: Hi I am trying to use the GPRS network to upload the pictures !!! It is working fine in my friends mobile so i am curious why it is not working in my mobile ? Any idea do we have to some setting in picasa also for the download to happen Regards Joe On Mon, Jun 22, 2009 at 3:06 PM, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: That means that u r not connected via wi-fi... generally, apps that need a transfer huge amt of data use a wifi-lock they dont get connected if the wifi-connectivity is lost... On Mon, Jun 22, 2009 at 2:52 PM, Joe Petruchi petruchi.dr...@gmail.comwrote: Hi all Uploading pictures to picasa always fails in my phone !!! Does anybody has faced similar problem !!! It always says retrying after 1 minute, 3 minute Regards Joe -- Regards, Sujay Casey Stengelhttp://www.brainyquote.com/quotes/authors/c/casey_stengel.html - All right everyone, line up alphabetically according to your height. -- Regards, Sujay Henny Youngmanhttp://www.brainyquote.com/quotes/authors/h/henny_youngman.html - I told the doctor I broke my leg in two places. He told me to quit going to those places. --~--~-~--~~~---~--~~ 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] Gmail application layout-like
Hi, I developped a small application wich uses ListView with checkboxes (like gmail email list) I don't manage to developp user-interaction as I want and as Gmail do : I would like to : - click on each checkbox from listview items - click on each label from listview items and use a context menu For me, I can click with the trackball and fingers. May anybody help me? Thanks Best regards Tom --~--~-~--~~~---~--~~ 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: how to receive call and play media file
No Reply ? On Jun 17, 11:29 am, Honest honestsucc...@gmail.com wrote: Thanks Marco for your quick reply.But some one told me tha all application running in background become pause when we receive call so is that true ? if that is true then how can i play audio file when call is running on ? hope some quick reply. On Jun 15, 8:08 pm, Marco Nelissen marc...@android.com wrote: The current platform and hardware do not support playing audio in to the phone conversation. The best you could do is play it through the speaker really loud, and hope the other side can hear it. On Sun, Jun 14, 2009 at 10:16 PM, Honest honestsucc...@gmail.com wrote: Hi, I want to develop application in which i want to listen call and play medial file so caller can listen it. Can some one tell me how can i do it ? any code snippt or link of resource. --~--~-~--~~~---~--~~ 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: Scheduling
Thanks On Jun 18, 12:43 pm, Charlie Collins charlie.coll...@gmail.com wrote: This thread has good info on this topic from Dianne and Mark, start with reading through this:http://groups.google.com/group/android-developers/browse_thread/threa On Jun 18, 3:40 am, bsbi...@googlemail.com bsbi...@googlemail.com wrote: Hi, I am writing a demo app that allows the user to set a number of times they want my app to run. The app has no interface and just puts shows some notifications. Running this as a service seems the most obvious. What's the best way to handle the timing issue? Thanks --~--~-~--~~~---~--~~ 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] One activity per view
Hello, I am developing an app with there pages (views). Would each page be a separate activity? What's the standard here? Thanks --~--~-~--~~~---~--~~ 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: ExifInterface and libexif
Hi All, I am having the same problem and are wondering if anybody has had any luck with a custom Camera app and tagging the images with gps exif metainformation? I am wondering if refactoring Sanselan or writing a new exif parser/ writer suitable for Android might be necessary? regards, On 21 Jun, 17:09, Augustin.CL iamaugus...@gmail.com wrote: Does anyone have any ideas? On Jun 19, 8:24 pm, Augustin.CL iamaugus...@gmail.com wrote: Dear All, Currently, I want to fix the camera apk to make the image attached the GPS information. But I find there are some problems. 1. First, we can't change theexifinformation. According tohttp://code.google.com/p/android/issues/detail?id=2415, I modified some codes of libexif(external/jhead/main.c). Now, it will show the GPS information. 2.But, when I try to modify the gps information ofEXIF, I failed to update this information to that image. My questions is How I could use the ExifInterface.java of Camera app to change theExifinformation. Please give me some advices. Thanks in advanced. BTW, Does ExifInterface.java use the android/external/jhead/main.c over JNI? Best regards, Augustin. --~--~-~--~~~---~--~~ 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: Live traffic events as icons on a map
Are you sure you want to update the map in real time? In terms of a mobile application users are not going to have the application open to the map view constantly they will open the app and observe the current state of the road location they are interested in. All you really need to do is fetch the latest data when the view is opened and update the current event list. Al. On Jun 21, 12:19 pm, Lex hakkinen1...@gmail.com wrote: Hi everyone, I am developing a prototype application which features basic navigation (updating of own location on the map) and displays live traffic events as traffic sign icons on the map. The traffic events will be fetched from a server over a UDP connection. (I haven't implemented this as I don't have the traffic message specs yet). The idea is to display traffic events in real-time and also delete them when they have expired. I figured out that what I need for this is one or more ItemizedOverlays with dynamic items. I found this post, http://groups.google.com/group/android-developers/browse_thread/threa... which seems to be similar to my application. So the circular process is: 1. fetch traffic data from server 2. populate an ItemizedOverlay object containing traffic events 3. update the map accordingy when the items in the overlay have changed Apparently in the MapView (or Map Activity?) I need some sort of a listener for changes in the ItemizedOverlay object. What is the best practice for doing this? Thanks, Lex --~--~-~--~~~---~--~~ 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: Where to store data
mf-team wrote: i'm writing an application that needs to store some small jpeg or pngs. Looking at the documentation i have seen that databases are stored under /data/data/package_name/databases I decided to store my data under /data/data/package_name/files. With the emulator i can see all these files (databases and images) under the proposed directories but moving the application on a real device and installing a file system browser i cannot see any file under /data. Can anyone explain me why? Security. My application works perfectly on my mobile (HTC magic) so i think that data is downloaded and stored. If this is a security constraint, do i need to put the application under debug on the mobile in order to inspect file system? AFAIK, there is no way to inspect the file system on a normal (i.e., non-rooted) production device. That means you cannot browse it with DDMS. At least for debug-compiled apps, I used to have success using adb pull to directly reference a file and download it off the device, though I haven't tried that since Android 1.5 was released. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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: Reducing Image File size
Shrikant Agrawal wrote: I want to reduce the size of my image file to transfer it over the network. Do anybody know how can I reduce the file size using andriod APIs. One option would be to scale it using the Bitmap class and the createScaledBitmap() method. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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: MediaController is not working properly with MediaPlayer
Finally, I solved it!!! On Jun 22, 2:26 pm, manoj manojkumar.m...@gmail.com wrote: Hi, why can't my seek bar (with time) is not updating according to mediaplayer time. Can any one please help me. Thanks, Manoj. On Jun 22, 11:37 am, manoj manojkumar.m...@gmail.com wrote: Hi, I want to enable the MediaController for the MediaPlayer. For this I have written the code like this: public class AudioPlayerNew extends Activity implements MediaPlayerControl,MediaPlayer.OnPreparedListener,MediaPlayer.OnBufferingUp dateListener { MediaController mediaController; MediaPlayer mMediaPlayer; private String path = /sdcard/Kaarulo Shikarukelle.mp3; int percent = 1; boolean playerState = true; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.sdcard_media_view); mediaController = (MediaController) findViewById (R.id.MediaController01); playAudio(path); mediaController.setAnchorView( findViewById (R.layout.sdcard_media_view)); mediaController.setMediaPlayer(this); mediaController.bringToFront(); mediaController.setEnabled(true); } private void playAudio(String media) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.prepare(); mMediaPlayer.setOnSeekCompleteListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnErrorListener(this); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } @Override protected void onDestroy() { super.onDestroy(); // TODO Auto-generated method stub dismissDialog(); if(null != mMediaPlayer) { mMediaPlayer.release(); mMediaPlayer = null; } wakeLock.release(); } @Override public int getBufferPercentage() { System.out.println(MediaController.getBufferPercentage() called!!!); // TODO Auto-generated method stub return percent; } @Override public int getCurrentPosition() { System.out.println(MediaController.getCurrentPosition() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getCurrentPosition(); } @Override public int getDuration() { System.out.println(MediaController.getDuration() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getDuration(); } @Override public boolean isPlaying() { //System.out.println(MediaController.isPlaying() called!!!); // TODO Auto-generated method stub return playerState; } @Override public void pause() { //System.out.println(MediaController.pause() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer) { mMediaPlayer.pause(); } playerState = false; } @Override public void seekTo(int pos) { // TODO Auto-generated method stub //System.out.println(MediaController.seekTo() called!!!); if(mMediaPlayer != null) { mMediaPlayer.seekTo(pos); } } @Override public void start() { //System.out.println(MediaController.start() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer )// !mMediaPlayer.isPlaying()) { mMediaPlayer.start(); } playerState = true; } @Override public void onPrepared(MediaPlayer arg0) { // TODO Auto-generated method stub dismissDialog(); mMediaPlayer.start(); } @Override public void onCompletion(MediaPlayer mp) { // TODO Auto-generated method stub Log.i(VideoViewDemo -, onCompletion()
[android-developers] sending email from android emulator
Hello, I'd like to know if it's possible to send an email from the emulator (i'm using cupcake). I'm using something like: Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_EMAIL, to); sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject); sendIntent.putExtra(Intent.EXTRA_TEXT,body); sendIntent.setType(text/plain); startActivity(Intent.createChooser(sendIntent, MySendMail)) but the thing I do not know if an email client is necessary on the emulator (was thinking of k9) or if by default an email client is already present. In this later case, how do I configure my account ? Thanks a lot, Luc --~--~-~--~~~---~--~~ 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: One activity per view
bsbi...@googlemail.com wrote: I am developing an app with there pages (views). Would each page be a separate activity? Possibly. You can go either way. I usually assume separate activities until something forces my hand to go to multiple pages in one activity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Looking for Android opportunties? http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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] Wifi reconnects all the time while in background mode
Hi everyone. I'm facing a connectivity problem in my IM-client for a long time already, but still can't find out how to fix it. Found a similar bug report here: http://code.google.com/p/android/issues/detail?id=2059 except PowerManager.SCREEN_DIM_WAKE_LOCK didn't work for me :( So here is the problem: when device goes idle, wifi is being kept connected for some unpredictable time(1-20 min), but then established connection brakes and here is what i see on the ddms console: 06-22 14:19:30.398: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT- DISCONNECTED - Disconnect event - remove keys] 06-22 14:19:30.398: VERBOSE/WifiStateTracker(53): New network state is DISCONNECTED 06-22 14:19:30.408: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT-STATE- CHANGE id=2 state=0] 06-22 14:19:30.408: VERBOSE/WifiStateTracker(53): Changing supplicant state: COMPLETED == DISCONNECTED 06-22 14:19:30.500: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT-STATE- CHANGE id=2 state=2] 06-22 14:19:30.508: VERBOSE/WifiStateTracker(53): Changing supplicant state: DISCONNECTED == SCANNING 06-22 14:19:30.518: VERBOSE/WifiMonitor(53): Event [Trying to associate with 00:19:5b:66:13:06 (SSID='shape' freq=2437 MHz)] 06-22 14:19:30.518: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT-STATE- CHANGE id=2 state=3] 06-22 14:19:30.548: VERBOSE/WifiStateTracker(53): Changing supplicant state: SCANNING == ASSOCIATING 06-22 14:19:31.408: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT-STATE- CHANGE id=2 state=4] 06-22 14:19:31.408: VERBOSE/WifiStateTracker(53): Changing supplicant state: ASSOCIATING == ASSOCIATED 06-22 14:19:31.418: VERBOSE/WifiMonitor(53): Event [Associated with 00:19:5b:66:13:06] 06-22 14:19:31.418: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT-STATE- CHANGE id=2 state=7] 06-22 14:19:31.418: VERBOSE/WifiStateTracker(53): Changing supplicant state: ASSOCIATED == COMPLETED 06-22 14:19:31.428: VERBOSE/WifiMonitor(53): Event [CTRL-EVENT- CONNECTED - Connection to 00:19:5b:66:13:06 completed (reauth) [id=2 id_str=]] 06-22 14:19:31.428: VERBOSE/WifiStateTracker(53): New network state is CONNECTED and -1 is coming on read() from input stream or SocketException is raised. Then my app is trying to reconnect and sometimes it's successful almost immediately, but sometimes it takes more than 2-3 tries to reconnect(WifiMonitor logs reconnects again and again) with 10 seconds timeout. Preventing some advices - yes, there is a PARTIAL_WAKE_LOCK and wifilock held by my app, but as i can see this is not enough. Please help! --~--~-~--~~~---~--~~ 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] Sending file via FTP within android
Hello, I was not able to find anything regarding this topic on google so... i give it a try in the groups :-) In fact, I'd like to know if it's possible, from the android (from the emulator also) to send a file via FTP ? I heard about andFTP which seems to be a real good FTP client. So... I apologize in advance for this newby question :-) but if I install andFTP, would it be possible to programmatically trigger it using an Intent ? Or are Intent only used for internal application ? thanks a lot, Luc --~--~-~--~~~---~--~~ 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] Sending file via FTP within android
Hello, I was not able to find anything regarding this topic on google so... i give it a try in the groups :-) In fact, I'd like to know if it's possible, from the android (from the emulator also) to send a file via FTP ? I heard about andFTP which seems to be a real good FTP client. So... I apologize in advance for this newby question :-) but if I install andFTP, would it be possible to programmatically trigger it using an Intent ? Or are Intent only used for internal application ? thanks a lot, Luc --~--~-~--~~~---~--~~ 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] Reading a large url
Hello, I am reading the following URL to test a RSS parser. http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/uk/rss.xm When using the same code on a Android HTC phone the whole resource cannot be read. There are no exceptions being thrown. I am guessing the rss.xml is too large to be read in? I use a sax parser after the block of code which complains. try { InputStream urlInputStream = null; URL url = new URL(http://newsrss.bbc.co.uk/rss/ newsonline_uk_edition/uk/rss.xml); BufferedReader buff = new BufferedReader(new InputStreamReader (url.openStream())); String line = buff.readLine(); System.out.println(line); while (line != null) { line = buff.readLine(); System.out.println(line); } if (urlInputStream != null) { urlInputStream.close(); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } --~--~-~--~~~---~--~~ 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: Parcelables / project.aidl in SDK 1.5
On May 29, 7:55 am, Xavier Ducrohet x...@android.com wrote: It looks like you didn't create an aidl file for your File class. Look at the documentation at:http://developer.android.com/guide/developing/tools/aidl.html#parcelable Xav Hi thanks guys, was facing the same issue.Got it fixed now. On Wed, May 27, 2009 at 11:14 AM, Henrique Machado nossoem...@gmail.com wrote: I got this error when I try to create a aidl. here`s my UploadSInterface.aidl package br.com.android.pixelhouse.services; interface UploadSInterface { void execute(out File file); void cancelUpload(); } now Fileparcelableclass --- package br.com.android.pixelhouse; import java.io.InputStream; import android.os.Parcel; import android.os.Parcelable; @SuppressWarnings(unchecked) public class File implementsParcelable{ public static final int TYPE_IMAGE = 0; public static final int TYPE_VIDEO = 1; public static final int TYPE_MUSIC = 2; public static final int TYPE_OTHERS = 3; private InputStream input; private String description; private String name; private int type; public static finalParcelable.CreatorFileCREATOR = new Parcelable.Creator() { public File createFromParcel(Parcel in) {return new File(in);} public Object[] newArray(int size) { // TODO Auto-generated method stub return null; } }; public File(InputStream input, String name, String description, int type) { setInput(input); setName(name); setDescription(description); setType(type); } public File(Parcel in) { // TODO Auto-generated constructor stub } public InputStream getInput() { return input; } public void setInput(InputStream input) { this.input = input; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getType() { return type; } public void setType(int type) { this.type = type; } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { dest.writeValue(getInput()); dest.writeString(getName()); dest.writeString(getName()); dest.writeInt(getType()); } } Here`s the thing, when I do my aidl class like it`s today I got parameter file (1) unknow type when I do this import br.com.pixelhouse.mymoto.services.File; interface UploadSInterface { void execute(out File file); void cancelUpload(); } I got? couldn't find import for class br.com.pixelhouse.mymoto.services.File On 14 abr, 22:34, Xavier Ducrohet x...@android.com wrote: I have just realized something. If you create/editparcelabletype aidl files, this does not trigger a recompilation of the interface aidl files that depends on it. In fact, aidl files are only recompiled when the aidl file is touched. We'll do a quick fix for the final ADT 0.9 (which will most likely be a full recompilation of all aidl files whenever 1 aidl file is changed), and implement true dependency support later to minimize unneeded recompilations. Xav On Tue, Apr 14, 2009 at 2:02 PM, Xavier Ducrohet x...@android.com wrote: I just did a quick test following the information in the link I posted above and it is working for me. Make sure your aidl file declares the package it's in (like any java class). Xav On Tue, Apr 14, 2009 at 1:05 PM, Xavier Ducrohet x...@android.com wrote: oh I missed this message :( Let me do a quick test... On Tue, Apr 14, 2009 at 11:18 AM, Zach Hobbs ho...@helloandroid.com wrote: Some more info: - I tried creating an aidl file with the same name as theParcelable class, and I get an error in the console like: path to class/ class.aidl:1 interface package.class should be declared in a file called com.aidl. I tried declaring theParcelablein com.aidl and that didn't work either. - The documentation in 1.5 on AIDL still refers to the Android Tools Create Aidl preprocess file forParcelableclasses which is not available in ADT 0.9. Should I open a bug for this? Thanks, Zach On Apr 14, 12:52 pm, Zach Hobbs
[android-developers] Re: AIDL issue with 1.5sdk and eclipse plugin
Hey guys, was facing the same issue. Finally got it working. On Jun 2, 10:54 pm, cvance383 cvance...@yahoo.com wrote: *problem resolved* thanks tho On Jun 1, 8:00 pm, cvance383 cvance...@yahoo.com wrote: Hey I've been working on an app for a couple months now. I just downloaded the sdk and installed the newest plugin. Unfortunately my app broke after this finished. I have tried setting the build target to 1.1 and 1.5, still no luck. I believe the problem is stemming from the .aidlfiles causing other classes to break. The error in theaidl files says cannot find import for my Song class, which has worked up until now. Any ideas? Let me know if posting code or errors will help, as of now I'm all out of ideas. Thanks for any help or suggestions. Collin- 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] login to picasa and create authentication token
Hi All, I want to create one application of picasa, but I am not getting any API to login into picasa . There is api GoogleLoginServiceBlockingHelper.getAccount (GoogleLoginServiceConstants.REQUIRE_GOOGLE) by which I can get the login and authtoken for the user which is set for phone . But I want to login for generic where I can provide any username and corresponding password. I didn' t get any API in adnroid Gdata package which support this. Kindly tell me how can I login. Thanks, Ravi --~--~-~--~~~---~--~~ 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: Attempting to pass data via NotificationManager - Seeking Help/Advice
Like I said before, the Activity gets called - fine - thing is that I want to have to get focus and then change based upon the info in extra. I cannot figure out where to receive the intent data in this situation. If I understand you correctly, you just need to call Activity.getIntent () within Activity.onCreate(). I've used this to pass data from a BroadcastReceiver to a ListActivity, there's no reason AFAIK why it should work with a Notification. Ray --~--~-~--~~~---~--~~ 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 with setExtra
http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String,%20int ) 2009/6/22 Sujay Krishna Suresh sujay.coold...@gmail.com by doesnt work do u mean that u r unable to read the extra in ur target activity? if so plz post d code tat u r usin for this purpose... so tat we can find d actual mistake.. On Mon, Jun 22, 2009 at 1:40 PM, Will wbc...@gmail.com wrote: I am trying to setExtra(string, int) in an Intent which will be used in startActvityForResult(). This works: Intent i = new Intent(this, ClassA.class); i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); This doesn't: Intent i = new Intent(this, ClassA.class); i.putExtra(intStringName, intArg); // where the args are (String, int) i.setAction(ACTION_CUTSOM); startActivityForResult(i, ACTIVITY_CUSTOM); If I try to catch the putExtra with a try/catch block, it still fails. Any reason why this doesn't work? -- Regards, Sujay Fran Lebowitzhttp://www.brainyquote.com/quotes/authors/f/fran_lebowitz.html - Life is something to do when you can't get to sleep. --~--~-~--~~~---~--~~ 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 enable GPS Location Provider by Code?
How to enable GPS Location Provider by Code? --~--~-~--~~~---~--~~ 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: Enable/Disable LocationManager, Help?
So I can't make toggle app for GPS? On 5月30日, 上午10时00分, Jeff Sharkey jshar...@android.com wrote: Presumable the user has disabled them for good reason, and apps should not toggle them behind the users back. You could show a dialog to the user, explaining that you'd likelocationenabled, and then launch into the Settings app using the android.settings.LOCATION_SOURCE_SETTINGS Intent. j On Fri, May 29, 2009 at 6:06 PM, Will wbc...@gmail.com wrote: How do Ienable/disableGPSand Wifi providers? I check to see if they are enabled by using this code: locationManager.isProviderEnabled(gps) locationManager.isProviderEnabled(network) If both are false, I'd like to turnenabletheGPSproviderand/or the Networkproviderso that the above checks would return true. Is this possible? If so, what permissions does it require? I've searched the API and can't find any solutions. Thanks for any help in advance. -- Jeff Sharkey jshar...@android.com --~--~-~--~~~---~--~~ 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: Sending file via FTP within android
lucj06 wrote: Hello, I was not able to find anything regarding this topic on google so... i give it a try in the groups :-) In fact, I'd like to know if it's possible, from the android (from the emulator also) to send a file via FTP ? I heard about andFTP which seems to be a real good FTP client. So... I apologize in advance for this newby question :-) but if I install andFTP, would it be possible to programmatically trigger it using an Intent ? Or are Intent only used for internal application ? thanks a lot, That would be a question for whoever wrote andFTP. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 Available! --~--~-~--~~~---~--~~ 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: Enable/Disable LocationManager, Help?
Hastala wrote: So I can't make toggle app for GPS? If by toggle app, you mean where you toggle the setting yourself, no, you can no longer make a toggle app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 0.9 Available! --~--~-~--~~~---~--~~ 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 enable/disable bluetooth?
how to enable/disable bluetooth? --~--~-~--~~~---~--~~ 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 enable/disable Access Point Network (APN)?
how to enable/disable Access Point Network (APN)? --~--~-~--~~~---~--~~ 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] Best approach for making one variable available in another activity / class
I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill. Anybody could pls share the best approach with me? Thanks, Christian --~--~-~--~~~---~--~~ 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: Enable/Disable LocationManager, Help?
See Technique to Avoid, #2 here: http://android-developers.blogspot.com/2009/04/future-proofing-your-apps.html On Jun 22, 2:44 pm, Hastala dev...@gmail.com wrote: So I can't make toggle app for GPS? On 5月30日, 上午10时00分, Jeff Sharkey jshar...@android.com wrote: Presumable the user has disabled them for good reason, and apps should not toggle them behind the users back. You could show a dialog to the user, explaining that you'd likelocationenabled, and then launch into the Settings app using the android.settings.LOCATION_SOURCE_SETTINGS Intent. j On Fri, May 29, 2009 at 6:06 PM, Will wbc...@gmail.com wrote: How do Ienable/disableGPSand Wifi providers? I check to see if they are enabled by using this code: locationManager.isProviderEnabled(gps) locationManager.isProviderEnabled(network) If both are false, I'd like to turnenabletheGPSproviderand/or the Networkproviderso that the above checks would return true. Is this possible? If so, what permissions does it require? I've searched the API and can't find any solutions. Thanks for any help in advance. -- Jeff Sharkey jshar...@android.com --~--~-~--~~~---~--~~ 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] picasa
Is it possible to upload/download files (photos) from android to Picasa using our own apps. Is the content provider detail documented somewhere. Any API hint? Or is it just a closed component that can't be used outside google? Thanks RS --~--~-~--~~~---~--~~ 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: Best approach for making one variable available in another activity / class
'm not sure if this's the best approach... if u r using intents to transfer control between the activities then i'd advice u to try using the putExtra method of the Intent class... u can read the extras in ur target activity by using getIntent.getExtras() method... jus give it a try... i hope this helps u... On Mon, Jun 22, 2009 at 6:52 PM, Christian S. schrott...@gmx.de wrote: I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill. Anybody could pls share the best approach with me? Thanks, Christian -- Regards, Sujay P. J. O'Rourkehttp://www.brainyquote.com/quotes/authors/p/p_j_orourke.html - If government were a product, selling it would be illegal. --~--~-~--~~~---~--~~ 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: picasa
I havent found any docs, but u can make use of the built-in picasa app (if u r workin in 1.5) to upload ur photos to picasa web albums, but one limitation is that u dont hv the control of signing in and signing out... it uses the google account registered with the phone curently... if ur interested i can give u sm sample codes... On Mon, Jun 22, 2009 at 6:57 PM, RS rajeshs...@gmail.com wrote: Is it possible to upload/download files (photos) from android to Picasa using our own apps. Is the content provider detail documented somewhere. Any API hint? Or is it just a closed component that can't be used outside google? Thanks RS -- Regards, Sujay Laurence J. Peterhttp://www.brainyquote.com/quotes/authors/l/laurence_j_peter.html - If two wrongs don't make a right, try three. --~--~-~--~~~---~--~~ 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: One activity per view
Hi, Thanks. I have currently have three pages and have three activities. The problem is that when I deploy the app on my phone I see three app icons Any ideas? How do I say activityOne is the default activity and the other two are sub-activities of activityOne? activity android:name=.activityOne android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter activity android:name=.activityTwo android:label=@string/ app_name /activity activity android:name=.activityThree android:label=@string/ app_name /activity On Jun 22, 12:49 pm, Mark Murphy mmur...@commonsware.com wrote: bsbi...@googlemail.com wrote: I am developing an app with there pages (views). Would each page be a separate activity? Possibly. You can go either way. I usually assume separate activities until something forces my hand to go to multiple pages in one activity. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Looking for Android opportunties?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ 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: One activity per view
bsbi...@googlemail.com wrote: I have currently have three pages and have three activities. The problem is that when I deploy the app on my phone I see three app icons Any ideas? Only have the LAUNCHER intent filter on the one you want the icon for. The other ones should not show up in the launcher. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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: Best approach for making one variable available in another activity / class
Sujay, thanks for this rapid response!!! Do you have a sample code to illustrate how this would be working ...? Thanks, Christian On 22 Jun., 15:29, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: 'm not sure if this's the best approach... if u r using intents to transfer control between the activities then i'd advice u to try using the putExtra method of the Intent class... u can read the extras in ur target activity by using getIntent.getExtras() method... jus give it a try... i hope this helps u... On Mon, Jun 22, 2009 at 6:52 PM, Christian S. schrott...@gmx.de wrote: I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill. Anybody could pls share the best approach with me? Thanks, Christian -- Regards, Sujay P. J. O'Rourkehttp://www.brainyquote.com/quotes/authors/p/p_j_orourke.html - If government were a product, selling it would be illegal. --~--~-~--~~~---~--~~ 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] Theme.Dialog Activity and Context Menu
Hi All , i have dialog style activity android:theme=@android:style/Theme.Dialog When i attached context menu to it @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuItem item = null; item = menu.add(0, Menu.FIRST, Menu.NONE, Test Context Menu in Dialog Theme); item.setIcon(android.R.drawable.ic_menu_edit); return true; } The menu appears about 50 px from the bottom of this dialog. So if activity screen is too small - it right in the middle of the screen. Is there any way to anchor menu to the bottom of the screen ? layout : ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent ImageView android:id=@+id/icon android:layout_width=wrap_content android:layout_height=wrap_content android:layout_marginLeft=10sp android:src=@drawable/icon / TextView android:id=@+id/title android:layout_toRightOf=@id/icon android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignTop=@id/icon android:layout_alignBottom=@id/icon android:gravity=left|center android:text=Title / ImageView android:id=@+id/divider android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/icon android:layout_gravity=left android:src=@drawable/dialog_divider_horizontal_light / TextView android:id=@+id/note android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/divider android:layout_marginLeft=10sp android:layout_marginBottom=10sp android:layout_marginTop=10sp android:text=Some Text / /RelativeLayout --~--~-~--~~~---~--~~ 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: picasa
Sure sujay some sample code would be very helpful. - I don't mind uploading it to any user's account .. would it still be accessible from other users' accounts? - Does downloading again need a login .. do you have any sample code for that? - After uploading would it return an URL for my app to use .. for downloading or emailing to others? - And is there a possibility of tagging the photos? Thanks, -RS On Jun 22, 2:32 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: I havent found any docs, but u can make use of the built-in picasa app (if u r workin in 1.5) to upload ur photos to picasa web albums, but one limitation is that u dont hv the control of signing in and signing out... it uses the google account registered with the phone curently... if ur interested i can give u sm sample codes... On Mon, Jun 22, 2009 at 6:57 PM, RS rajeshs...@gmail.com wrote: Is it possible to upload/download files (photos) from android to Picasa using our own apps. Is the content provider detail documented somewhere. Any API hint? Or is it just a closed component that can't be used outside google? Thanks RS -- Regards, Sujay Laurence J. Peterhttp://www.brainyquote.com/quotes/authors/l/laurence_j_peter.html - If two wrongs don't make a right, try three. --~--~-~--~~~---~--~~ 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: Live traffic events as icons on a map
I am sure about updating the map in real time - how the users are going to use the application isn't the concern at the moment. I just got the traffic message specs, so I'll do that and see how far I get with updating the events on the map. Thanks Al! On Jun 22, 1:37 pm, Alistair. alistair.rutherf...@googlemail.com wrote: Are you sure you want to update the map in real time? In terms of a mobile application users are not going to have the application open to the map view constantly they will open the app and observe the current state of the road location they are interested in. All you really need to do is fetch the latest data when the view is opened and update the current event list. Al. On Jun 21, 12:19 pm, Lex hakkinen1...@gmail.com wrote: Hi everyone, I am developing a prototype application which features basic navigation (updating of own location on the map) and displays live traffic events as traffic sign icons on the map. The traffic events will be fetched from a server over a UDP connection. (I haven't implemented this as I don't have the traffic message specs yet). The idea is to display traffic events in real-time and also delete them when they have expired. I figured out that what I need for this is one or more ItemizedOverlays with dynamic items. I found this post, http://groups.google.com/group/android-developers/browse_thread/threa... which seems to be similar to my application. So the circular process is: 1. fetch traffic data from server 2. populate an ItemizedOverlay object containing traffic events 3. update the map accordingy when the items in the overlay have changed Apparently in the MapView (or Map Activity?) I need some sort of a listener for changes in the ItemizedOverlay object. What is the best practice for doing this? Thanks, Lex --~--~-~--~~~---~--~~ 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: Sending file via FTP within android
lucj06 wrote: Hello, In fact i was talking about the possibility to send a file via FTP from android. I just added andFTP in the picture as I read this client was good. Without talking about andFTP, are there any means to send a file via FTP ? Not built in, no. Your choices are to try a Java FTP JAR, or see if andFTP supports some sort of remote service API. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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: Best approach for making one variable available in another activity / class
//calling activity int count = 0; //perform code for counting.. Intent i = new Intent(Caller.this,Target.class); i.putExtra(count, count); startActivityForResult(i,0); //target class int count = getIntent().getIntExtra(count); On Mon, Jun 22, 2009 at 7:26 PM, Christian S. schrott...@gmx.de wrote: Sujay, thanks for this rapid response!!! Do you have a sample code to illustrate how this would be working ...? Thanks, Christian On 22 Jun., 15:29, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: 'm not sure if this's the best approach... if u r using intents to transfer control between the activities then i'd advice u to try using the putExtra method of the Intent class... u can read the extras in ur target activity by using getIntent.getExtras() method... jus give it a try... i hope this helps u... On Mon, Jun 22, 2009 at 6:52 PM, Christian S. schrott...@gmx.de wrote: I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill. Anybody could pls share the best approach with me? Thanks, Christian -- Regards, Sujay P. J. O'Rourke http://www.brainyquote.com/quotes/authors/p/p_j_orourke.html - If government were a product, selling it would be illegal. -- Regards, Sujay Henny Youngmanhttp://www.brainyquote.com/quotes/authors/h/henny_youngman.html - I told the doctor I broke my leg in two places. He told me to quit going to those places. --~--~-~--~~~---~--~~ 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] start and stop BOOT_COMPLETED in broadcast receiver
Hi, Could we, and how (-:)) start and stop a broadcast receiver receving the android.intent.action.BOOT_COMPLETED ? As I want have control on a service awaken by the BOOT_COMPLETED. Thanks --~--~-~--~~~---~--~~ 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: picasa
On Mon, Jun 22, 2009 at 7:32 PM, RS rajeshs...@gmail.com wrote: Sure sujay some sample code would be very helpful. //src here... Intent temp = new Intent(Intent.ACTION_SEND); temp.setType(image/jpeg); temp.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); temp.putExtra(Intent.EXTRA_STREAM, imageURI); temp.setComponent(new ComponentName( com.google.android.apps.uploader, com.google.android.apps.uploader.picasa.PicasaUploadActivity)); startActivityForResult(temp, 0); since i did this long time ago, i sont remember the exact permissions required... uses-permission android:name=android.permission.GET_ACCOUNTS/uses-permission uses-permission android:name=com.google.android.googleapps.permission.GOOGLE_AUTH/uses-permission but its either both or one of the above - I don't mind uploading it to any user's account .. would it still be accessible from other users' accounts? provided the photo is uploaded to a public album. - Does downloading again need a login .. do you have any sample code for that? downloading actually opens the browser.. i didn't want that... so i'm still trying to find a workaround... - After uploading would it return an URL for my app to use .. for downloading or emailing to others? U'll hv 2 explore to get it... but as far as i no, u can get the token id... - And is there a possibility of tagging the photos? Commenting is very much possible... n geotagging is automatically done if u r using the in-built camera app... Thanks, -RS On Jun 22, 2:32 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: I havent found any docs, but u can make use of the built-in picasa app (if u r workin in 1.5) to upload ur photos to picasa web albums, but one limitation is that u dont hv the control of signing in and signing out... it uses the google account registered with the phone curently... if ur interested i can give u sm sample codes... On Mon, Jun 22, 2009 at 6:57 PM, RS rajeshs...@gmail.com wrote: Is it possible to upload/download files (photos) from android to Picasa using our own apps. Is the content provider detail documented somewhere. Any API hint? Or is it just a closed component that can't be used outside google? Thanks RS -- Regards, Sujay Laurence J. Peter http://www.brainyquote.com/quotes/authors/l/laurence_j_peter.html - If two wrongs don't make a right, try three. -- Regards, Sujay Casey Stengelhttp://www.brainyquote.com/quotes/authors/c/casey_stengel.html - All right everyone, line up alphabetically according to your height. --~--~-~--~~~---~--~~ 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: Best approach for making one variable available in another activity / class
Great - will try and let you know Ch. On 22 Jun., 16:40, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: //calling activity int count = 0; //perform code for counting.. Intent i = new Intent(Caller.this,Target.class); i.putExtra(count, count); startActivityForResult(i,0); //target class int count = getIntent().getIntExtra(count); On Mon, Jun 22, 2009 at 7:26 PM, Christian S. schrott...@gmx.de wrote: Sujay, thanks for this rapid response!!! Do you have a sample code to illustrate how this would be working ...? Thanks, Christian On 22 Jun., 15:29, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: 'm not sure if this's the best approach... if u r using intents to transfer control between the activities then i'd advice u to try using the putExtra method of the Intent class... u can read the extras in ur target activity by using getIntent.getExtras() method... jus give it a try... i hope this helps u... On Mon, Jun 22, 2009 at 6:52 PM, Christian S. schrott...@gmx.de wrote: I have tried to understand for the past 2 days what is the best approach to making the value from a variable sitting in activity A (in my case, the int position used in OnListItemClick / OnItemSelectedListener) available in another activity B (which of course sits in another class). There may be the option to write the result of the OnListItemClick int position into a small SQLite DB - but that seems to be total overkill. Anybody could pls share the best approach with me? Thanks, Christian -- Regards, Sujay P. J. O'Rourke http://www.brainyquote.com/quotes/authors/p/p_j_orourke.html - If government were a product, selling it would be illegal. -- Regards, Sujay Henny Youngmanhttp://www.brainyquote.com/quotes/authors/h/henny_youngman.html - I told the doctor I broke my leg in two places. He told me to quit going to those places.- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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: A simple application which sends location to server.
Thanks for the advice. I see what you mean about the array.. All i would do is loop the array and if there is internet connection it would send every cycle and remove from array, if not just keep adding to array until it has. As long as the time the location was taken it will be ok with my PHP front end. The activity and running in the background is well above my head I would normally persiverar until I have created it mysel whilst learning on the way but I have hands full developing the main app. Is any one interested in this project ? On Jun 21, 3:23 pm, Delta Foxtrot deltafoxtrot...@gmail.com wrote: 2009/6/21 c6bro ch...@upload.co.uk Website URL field: e.ghttp://www..co.uk/logtracking.php Frequency field:e.g 6 (Seconds) Start/Stop button Any particular reason for 6s intervals? The app will be able to be closed and run in the background until you click the stop button. You most likely don't want to use an activity for the GPS/upload side of things, you would make an activity that started and stopped a service. If the internet is down it would take a log and send them one up again.. The easiest way I've found to do this, is you just have a ListArray of a custom object, the object just stores the values you need, and then you can push new values onto the end of the ListArray and pop them off as they are accepted for upload. Also do batch uploads instead of one value at a time, it can be very time consuming uploading one value at a time and waiing for a response from the remote end. --~--~-~--~~~---~--~~ 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: picasa
Thanks a lot Sujay.. shall explore the rest. .. and if i find anything useful, shall post back. Regards, RS On Jun 22, 3:50 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: On Mon, Jun 22, 2009 at 7:32 PM, RS rajeshs...@gmail.com wrote: Sure sujay some sample code would be very helpful. //src here... Intent temp = new Intent(Intent.ACTION_SEND); temp.setType(image/jpeg); temp.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); temp.putExtra(Intent.EXTRA_STREAM, imageURI); temp.setComponent(new ComponentName( com.google.android.apps.uploader, com.google.android.apps.uploader.picasa.PicasaUploadActivity)); startActivityForResult(temp, 0); since i did this long time ago, i sont remember the exact permissions required... uses-permission android:name=android.permission.GET_ACCOUNTS/uses-permission uses-permission android:name=com.google.android.googleapps.permission.GOOGLE_AUTH/uses-permission but its either both or one of the above - I don't mind uploading it to any user's account .. would it still be accessible from other users' accounts? provided the photo is uploaded to a public album. - Does downloading again need a login .. do you have any sample code for that? downloading actually opens the browser.. i didn't want that... so i'm still trying to find a workaround... - After uploading would it return an URL for my app to use .. for downloading or emailing to others? U'll hv 2 explore to get it... but as far as i no, u can get the token id... - And is there a possibility of tagging the photos? Commenting is very much possible... n geotagging is automatically done if u r using the in-built camera app... Thanks, -RS On Jun 22, 2:32 pm, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: I havent found any docs, but u can make use of the built-in picasa app (if u r workin in 1.5) to upload ur photos to picasa web albums, but one limitation is that u dont hv the control of signing in and signing out... it uses the google account registered with the phone curently... if ur interested i can give u sm sample codes... On Mon, Jun 22, 2009 at 6:57 PM, RS rajeshs...@gmail.com wrote: Is it possible to upload/download files (photos) from android to Picasa using our own apps. Is the content provider detail documented somewhere. Any API hint? Or is it just a closed component that can't be used outside google? Thanks RS -- Regards, Sujay Laurence J. Peter http://www.brainyquote.com/quotes/authors/l/laurence_j_peter.html - If two wrongs don't make a right, try three. -- Regards, Sujay Casey Stengelhttp://www.brainyquote.com/quotes/authors/c/casey_stengel.html - All right everyone, line up alphabetically according to your height. --~--~-~--~~~---~--~~ 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] horizontal/vertical finger swipe...
How do you detect a horizontal or vertical finger swipe? --~--~-~--~~~---~--~~ 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: horizontal/vertical finger swipe...
Short question. Short answer :-) onGestureDetector On Jun 22, 11:13 am, Kent Loobey k...@uoregon.edu wrote: How do you detect a horizontal or vertical finger swipe? --~--~-~--~~~---~--~~ 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: How to import data from Excel (or any other source text, world etc) to SQLlite
I'll answer myself to those who would want to know ;) 1- Install SQliteman 2- Convert the excel worksheet to XML 3- Import to SQLiteman On Jun 17, 1:55 pm, Georgy georgearna...@gmail.com wrote: Greetings, I have a database in Excel and I want to import it into SQLlite so I can use its contents in spinners and other features of my application. Anyone can help? I have done the tutorials and surfed online but no indications at all for my specific problem. thanks --~--~-~--~~~---~--~~ 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: MediaController is not working properly with MediaPlayer
Looks like a bug in MediaController when you're using it the way you are instead of using the show/hide mechanism. Can you use show/hide in your app instead? BTW, you really should remove those // TODO Auto-generated method stub once you've filled in the stub :) On Sun, Jun 21, 2009 at 11:37 PM, manoj manojkumar.m...@gmail.com wrote: Hi, I want to enable the MediaController for the MediaPlayer. For this I have written the code like this: public class AudioPlayerNew extends Activity implements MediaPlayerControl,MediaPlayer.OnPreparedListener,MediaPlayer.OnBufferingUpdateListener { MediaController mediaController; MediaPlayer mMediaPlayer; private String path = /sdcard/Kaarulo Shikarukelle.mp3; int percent = 1; boolean playerState = true; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.sdcard_media_view); mediaController = (MediaController) findViewById (R.id.MediaController01); playAudio(path); mediaController.setAnchorView( findViewById (R.layout.sdcard_media_view)); mediaController.setMediaPlayer(this); mediaController.bringToFront(); mediaController.setEnabled(true); } private void playAudio(String media) { try { mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(path); mMediaPlayer.prepare(); mMediaPlayer.setOnSeekCompleteListener(this); mMediaPlayer.setOnPreparedListener(this); mMediaPlayer.setOnCompletionListener(this); mMediaPlayer.setOnErrorListener(this); } catch (Exception e) { Log.e(TAG, error: + e.getMessage(), e); } } @Override protected void onDestroy() { super.onDestroy(); // TODO Auto-generated method stub dismissDialog(); if(null != mMediaPlayer) { mMediaPlayer.release(); mMediaPlayer = null; } wakeLock.release(); } @Override public int getBufferPercentage() { System.out.println(MediaController.getBufferPercentage() called!!!); // TODO Auto-generated method stub return percent; } @Override public int getCurrentPosition() { System.out.println(MediaController.getCurrentPosition() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getCurrentPosition(); } @Override public int getDuration() { System.out.println(MediaController.getDuration() called!!!); // TODO Auto-generated method stub return mMediaPlayer.getDuration(); } @Override public boolean isPlaying() { //System.out.println(MediaController.isPlaying() called!!!); // TODO Auto-generated method stub return playerState; } @Override public void pause() { //System.out.println(MediaController.pause() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer) { mMediaPlayer.pause(); } playerState = false; } @Override public void seekTo(int pos) { // TODO Auto-generated method stub //System.out.println(MediaController.seekTo() called!!!); if(mMediaPlayer != null) { mMediaPlayer.seekTo(pos); } } @Override public void start() { //System.out.println(MediaController.start() called!!!); // TODO Auto-generated method stub if(null != mMediaPlayer )// !mMediaPlayer.isPlaying()) { mMediaPlayer.start(); } playerState = true; } @Override public void onPrepared(MediaPlayer arg0) { // TODO Auto-generated method stub dismissDialog(); mMediaPlayer.start(); } @Override public void onCompletion(MediaPlayer mp) { // TODO Auto-generated method stub Log.i(VideoViewDemo -, onCompletion() calledoc); setProgressBarIndeterminateVisibility(false); finish(); } @Override public void
[android-developers] strange behavior on rotating and scaling text
hi, i'm trying to animate text, but strange behavior happened when i tried to rotate and scale. When rotating, the text width becoming wider and narrower randomly When scaling, the text y position is going upper. i've test with image, but image works perfectly. don't know why text is not. Here's my code, please take a look or run it (only one file is enough to run the demo) thanks public class TestDraw extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout flContent = new FrameLayout(this); flContent.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); setContentView(flContent); SurfaceView svPreviewer = new SurfaceDrawer(this); svPreviewer.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); flContent.addView(svPreviewer); } private class SurfaceDrawer extends SurfaceView implements SurfaceHolder.Callback, Runnable { private SurfaceHolder mSurfaceHolder; private int mLayoutWidth; private int mLayoutHeight; private String mText = Hello World! Hello Android!; private Paint mFontPaint = new Paint(); private Paint mBackgroundPaint = new Paint(); private Rect mBackgroundRect = new Rect(); // thread private Thread mThread; private boolean mIsStopped = false; private boolean mIsRunningMode = false; private Lock mLock = new ReentrantLock(); private Condition mCond = mLock.newCondition(); public SurfaceDrawer(Context context) { super(context); mSurfaceHolder = getHolder(); mSurfaceHolder.addCallback(this); mFontPaint.setColor(Color.WHITE); mBackgroundPaint.setColor(Color.MAGENTA); // set the rect for background mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect); mThread = new Thread(this); mThread.start(); } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { mLayoutWidth = width; mLayoutHeight = height; mLock.lock(); mIsRunningMode = true; mCond.signal(); mLock.unlock(); } public void surfaceCreated(SurfaceHolder holder) { } public void surfaceDestroyed(SurfaceHolder holder) { mLock.lock(); mIsStopped = true; mIsRunningMode = false; mCond.signal(); mLock.unlock(); try { mThread.join(); } catch (Exception e) { } } public void run() { while (mIsStopped == false) { mLock.lock(); try { while (mIsRunningMode == false) { mCond.await(); } if (mIsStopped == true) { mLock.unlock(); break; } DrawRotationAnimation(); DrawScalingAnimation(); } catch (InterruptedException e) { e.printStackTrace(); } mLock.unlock(); } } public void DrawRotationAnimation() { Canvas c; int centerX = mLayoutWidth / 2; int centerY = mLayoutHeight / 2; for (int i = 0; i 360; i += 20) { c = mSurfaceHolder.lockCanvas(); c.save(); c.rotate(i, centerX, centerY); c.translate(centerX - (mBackgroundRect.width() / 2), centerY
[android-developers] Re: strange behavior on rotating and scaling text
thx for the reply how about the rotating? is it like scaling? On Jun 22, 11:13 pm, Romain Guy romain...@google.com wrote: Hi, This is actually normal. Scaling fonts does not necessarily lead to a linear effect. Based on the font size, the text renderer can (and will) change the spacing, the antialiasing, etc. to improve on readability. If you want to scale text linearly you should turn the text into a bitmap first. If your animation is implemented using Views, you can simply enabled the drawing cache of the animated view. On Mon, Jun 22, 2009 at 8:46 AM, sleith raysle...@gmail.com wrote: hi, i'm trying to animate text, but strange behavior happened when i tried to rotate and scale. When rotating, the text width becoming wider and narrower randomly When scaling, the text y position is going upper. i've test with image, but image works perfectly. don't know why text is not. Here's my code, please take a look or run it (only one file is enough to run the demo) thanks public class TestDraw extends Activity { /** Called when the activity is first created. */ �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout flContent = new FrameLayout(this); flContent.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); setContentView(flContent); SurfaceView svPreviewer = new SurfaceDrawer(this); svPreviewer.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); flContent.addView(svPreviewer); } private class SurfaceDrawer extends SurfaceView implements SurfaceHolder.Callback, Runnable { private SurfaceHolder mSurfaceHolder; private int mLayoutWidth; private int mLayoutHeight; private String mText = Hello World! Hello Android!; private Paint mFontPaint = new Paint(); private Paint mBackgroundPaint = new Paint(); private Rect mBackgroundRect = new Rect(); // thread private Thread mThread; private boolean mIsStopped = false; private boolean mIsRunningMode = false; private Lock mLock = new ReentrantLock(); private Condition mCond = mLock.newCondition(); public SurfaceDrawer(Context context) { super(context); mSurfaceHolder = getHolder(); mSurfaceHolder.addCallback(this); mFontPaint.setColor(Color.WHITE); mBackgroundPaint.setColor(Color.MAGENTA); // set the rect for background mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect); mThread = new Thread(this); mThread.start(); } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { mLayoutWidth = width; mLayoutHeight = height; mLock.lock(); mIsRunningMode = true; mCond.signal(); mLock.unlock(); } public void surfaceCreated(SurfaceHolder holder) { } public void surfaceDestroyed(SurfaceHolder holder) { mLock.lock(); mIsStopped = true; mIsRunningMode = false; mCond.signal(); mLock.unlock(); try { mThread.join(); } catch (Exception e) { } } public void run() { while (mIsStopped == false) { mLock.lock(); try { while (mIsRunningMode == false) { mCond.await(); } if (mIsStopped == true) { mLock.unlock(); break; } DrawRotationAnimation(); DrawScalingAnimation(); } catch (InterruptedException e) {
[android-developers] Re: strange behavior on rotating and scaling text
Hi, This is actually normal. Scaling fonts does not necessarily lead to a linear effect. Based on the font size, the text renderer can (and will) change the spacing, the antialiasing, etc. to improve on readability. If you want to scale text linearly you should turn the text into a bitmap first. If your animation is implemented using Views, you can simply enabled the drawing cache of the animated view. On Mon, Jun 22, 2009 at 8:46 AM, sleith raysle...@gmail.com wrote: hi, i'm trying to animate text, but strange behavior happened when i tried to rotate and scale. When rotating, the text width becoming wider and narrower randomly When scaling, the text y position is going upper. i've test with image, but image works perfectly. don't know why text is not. Here's my code, please take a look or run it (only one file is enough to run the demo) thanks public class TestDraw extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FrameLayout flContent = new FrameLayout(this); flContent.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); setContentView(flContent); SurfaceView svPreviewer = new SurfaceDrawer(this); svPreviewer.setLayoutParams(new LayoutParams (LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); flContent.addView(svPreviewer); } private class SurfaceDrawer extends SurfaceView implements SurfaceHolder.Callback, Runnable { private SurfaceHolder mSurfaceHolder; private int mLayoutWidth; private int mLayoutHeight; private String mText = Hello World! Hello Android!; private Paint mFontPaint = new Paint(); private Paint mBackgroundPaint = new Paint(); private Rect mBackgroundRect = new Rect(); // thread private Thread mThread; private boolean mIsStopped = false; private boolean mIsRunningMode = false; private Lock mLock = new ReentrantLock(); private Condition mCond = mLock.newCondition(); public SurfaceDrawer(Context context) { super(context); mSurfaceHolder = getHolder(); mSurfaceHolder.addCallback(this); mFontPaint.setColor(Color.WHITE); mBackgroundPaint.setColor(Color.MAGENTA); // set the rect for background mFontPaint.getTextBounds(mText, 0, mText.length(), mBackgroundRect); mThread = new Thread(this); mThread.start(); } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { mLayoutWidth = width; mLayoutHeight = height; mLock.lock(); mIsRunningMode = true; mCond.signal(); mLock.unlock(); } public void surfaceCreated(SurfaceHolder holder) { } public void surfaceDestroyed(SurfaceHolder holder) { mLock.lock(); mIsStopped = true; mIsRunningMode = false; mCond.signal(); mLock.unlock(); try { mThread.join(); } catch (Exception e) { } } public void run() { while (mIsStopped == false) { mLock.lock(); try { while (mIsRunningMode == false) { mCond.await(); } if (mIsStopped == true) { mLock.unlock(); break; } DrawRotationAnimation(); DrawScalingAnimation(); } catch (InterruptedException e) { e.printStackTrace(); } mLock.unlock(); } } public void
[android-developers] Re: Reading a large url
On Mon, Jun 22, 2009 at 5:09 AM, bsbi...@googlemail.com bsbi...@googlemail.com wrote: Hello, I am reading the following URL to test a RSS parser. http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/uk/rss.xm When using the same code on a Android HTC phone the whole resource cannot be read. There are no exceptions being thrown. I am guessing the rss.xml is too large to be read in? I use a sax parser after the block of code which complains. Complains about what? The code you posted tries to read the entire file and dumps it to stdout, which means that even you passed the input stream to the parser (which the code you posted doesn't do, since the input stream object has limited scope), there would not be anything left for it to read. try { InputStream urlInputStream = null; URL url = new URL(http://newsrss.bbc.co.uk/rss/ newsonline_uk_edition/uk/rss.xmlhttp://newsrss.bbc.co.uk/rss/%0Anewsonline_uk_edition/uk/rss.xml ); BufferedReader buff = new BufferedReader(new InputStreamReader (url.openStream())); String line = buff.readLine(); System.out.println(line); while (line != null) { line = buff.readLine(); System.out.println(line); } if (urlInputStream != null) { urlInputStream.close(); } } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } --~--~-~--~~~---~--~~ 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: Does anyone make video recording work at Android 1.5?
I have tried 1.5 video API. I could not make it work.It even can't do preview. following is my code: private boolean initializeVideo() { Log.v(TAG, initializeVideo); if(Common.mRecordedVideo!=null Common.mRecordedVideo.exists()) Common.mRecordedVideo.delete(); File sDir = Environment.getExternalStorageDirectory(); String baseDir = sDir + Common.BASE_DIR; File sampleDir=new File(baseDir); if(!sampleDir.canWrite()) // Workaround for broken sdcard support on the device. sampleDir = new File(/sdcard/sdcard); try { Common.mRecordedVideo = File.createTempFile(PREFIX, EXTENSION, sampleDir); } catch(IOException e) { AlertDialog.Builder ab = new AlertDialog.Builder (VideoRecord.this); ab.setTitle(Error); ab.setMessage( can't write audio data to storage); ab.setIcon(R.drawable.error); ab.setNeutralButton(Close, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }); ab.show(); return false; } Intent intent = getIntent(); releaseMediaRecorder(); if (mSurfaceHolder == null) { Log.v(TAG, SurfaceHolder is null); return false; } mMediaRecorder = new MediaRecorder(); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mMediaRecorder.setVideoSource (MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_GPP); mMediaRecorder.setMaxDuration(MAX_RECORDING_DURATION_MS); mMediaRecorder.setOutputFile (Common.mRecordedVideo.getAbsolutePath()); // Use the same frame rate for both, since internally // if the frame rate is too large, it can cause camera to become // unstable. We need to fix the MediaRecorder to disable the support // of setting frame rate for now. mMediaRecorder.setVideoFrameRate(20); mMediaRecorder.setVideoSize(352,288); mMediaRecorder.setVideoEncoder (MediaRecorder.VideoEncoder.H263); mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); try { mMediaRecorder.prepare(); } catch (IOException exception) { Log.e(TAG, prepare failed for ); releaseMediaRecorder(); // TODO: add more exception handling logic here return false; } mMediaRecorderRecording = false; return true; } private void startVideoRecording() { Log.v(TAG, startVideoRecording); if (!mMediaRecorderRecording) { // Check mMediaRecorder to see whether it is initialized or not. if (mMediaRecorder == null initializeVideo() == false ) { Log.e(TAG, Initialize video (MediaRecorder) failed.); return; } try { mMediaRecorder.setOnErrorListener(this); mMediaRecorder.setOnInfoListener(this); mMediaRecorder.start(); // Recording is now started } catch (RuntimeException e) { Log.e(TAG, Could not start media recorder. , e); return; } mMediaRecorderRecording = true; mRecordingStartTime = SystemClock.uptimeMillis(); updateRecordingIndicator(true); mRecordingTimeView.setText(); mRecordingTimeView.setVisibility(View.VISIBLE); mHandler.sendEmptyMessage(UPDATE_RECORD_TIME); setScreenTimeoutInfinite(); } } On Jun 21, 6:05 pm, cindy ypu01...@yahoo.com wrote: do you have any simple sample code for video recording? Thanks! Cindy --~--~-~--~~~---~--~~ 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: how to load application to G1 phone
need to enable USB debug on the phone On Jun 7, 10:17 am, cindy ypu01...@yahoo.com wrote: Help!! On Jun 6, 11:00 pm,cindyypu01...@yahoo.com wrote: After my phone has been upgraded to 1.5, I upgraded my application to 1.5. It could run correctly in simulator. When I launched application in 1.0, it asked me to run in real device or simulator. But in 1.5, my g1 phone is not listed at running android device.What should I do? --~--~-~--~~~---~--~~ 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] Help on video recording
I have tried 1.5 video API. I could not make it work.It even can't do preview. following is my code: private boolean initializeVideo() { Log.v(TAG, initializeVideo); if(Common.mRecordedVideo!=null Common.mRecordedVideo.exists ()) Common.mRecordedVideo.delete(); File sDir = Environment.getExternalStorageDirectory(); String baseDir = sDir + Common.BASE_DIR; File sampleDir=new File(baseDir); if(!sampleDir.canWrite()) // Workaround for broken sdcard support on the device. sampleDir = new File(/sdcard/sdcard); try { Common.mRecordedVideo = File.createTempFile(PREFIX, EXTENSION, sampleDir); } catch(IOException e) { AlertDialog.Builder ab = new AlertDialog.Builder (VideoRecord.this); ab.setTitle(Error); ab.setMessage( can't write audio data to storage); ab.setIcon(R.drawable.error); ab.setNeutralButton(Close, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }); ab.show(); return false; } Intent intent = getIntent(); releaseMediaRecorder(); if (mSurfaceHolder == null) { Log.v(TAG, SurfaceHolder is null); return false; } mMediaRecorder = new MediaRecorder(); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mMediaRecorder.setVideoSource (MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_GPP); mMediaRecorder.setMaxDuration(MAX_RECORDING_DURATION_MS); mMediaRecorder.setOutputFile (Common.mRecordedVideo.getAbsolutePath()); // Use the same frame rate for both, since internally // if the frame rate is too large, it can cause camera to become // unstable. We need to fix the MediaRecorder to disable the support // of setting frame rate for now. mMediaRecorder.setVideoFrameRate(20); mMediaRecorder.setVideoSize(352,288); mMediaRecorder.setVideoEncoder (MediaRecorder.VideoEncoder.H263); mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); try { mMediaRecorder.prepare(); } catch (IOException exception) { Log.e(TAG, prepare failed for ); releaseMediaRecorder(); // TODO: add more exception handling logic here return false; } mMediaRecorderRecording = false; return true; } private void startVideoRecording() { Log.v(TAG, startVideoRecording); if (!mMediaRecorderRecording) { // Check mMediaRecorder to see whether it is initialized or not. if (mMediaRecorder == null initializeVideo() == false ) { Log.e(TAG, Initialize video (MediaRecorder) failed.); return; } try { mMediaRecorder.setOnErrorListener(this); mMediaRecorder.setOnInfoListener(this); mMediaRecorder.start(); // Recording is now started } catch (RuntimeException e) { Log.e(TAG, Could not start media recorder. , e); return; } mMediaRecorderRecording = true; mRecordingStartTime = SystemClock.uptimeMillis(); updateRecordingIndicator(true); mRecordingTimeView.setText(); mRecordingTimeView.setVisibility(View.VISIBLE); mHandler.sendEmptyMessage(UPDATE_RECORD_TIME); setScreenTimeoutInfinite(); } } --~--~-~--~~~---~--~~ 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: Permissions for Android Dev Phone 1
Yes it is; this should be fixed in the next release. On Mon, Jun 22, 2009 at 1:40 AM, hanasnap hana...@yahoo.com wrote: in the manifest file nothing is written. yes I'm installing my own app and this app is using the camera of the device. if there is no permission set in the manifest file to use the camera isn't this a security break that the app is installed normally and uses the camera without any problems? On Jun 20, 12:09 am, Dianne Hackborn hack...@android.com wrote: It does behave the same way. You'll need to explain exactly what you are doing. On Thu, Jun 18, 2009 at 12:16 AM, hanasnap hana...@yahoo.com wrote: Hi, If anyone can help me with some information if there is a way to make an application on Android Dev Phone ask for permissions, like it does on G1. When I install an application on ADP, I only get the message no permissions required, is there a way to make the ADP behave like a G1 phone? Thanks. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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 see the content of database on G1
Hi, i hook up my G1 to my laptop and open a 'adb shell'. But as I execute the command 'cd /data/data', I get an error 'opendir failed, Permission denied' $ adb devices List of devices attached HT853GZ21556device $ adb shell $ cd /data/data $ ls opendir failed, Permission denied I tried to cd the the right directory and then do 'sqlite3 mydatabase.db' How can i dump the content of the database on a real device? Thank you. --~--~-~--~~~---~--~~ 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: start and stop BOOT_COMPLETED in broadcast receiver
You can enable or disable the component with the PackageManager. On Mon, Jun 22, 2009 at 7:47 AM, jphdsn jph...@gmail.com wrote: Hi, Could we, and how (-:)) start and stop a broadcast receiver receving the android.intent.action.BOOT_COMPLETED ? As I want have control on a service awaken by the BOOT_COMPLETED. Thanks -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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] Using me
I have a ListView with two types of custom views. It inflates icon_row view if a drawable exists or a text_row if not. I came up w/ custom views for icon_row text_row include them in their XML like so : //text_row.xml LinearLayout com.test.android.ALS.text_row ... app:text1=... app:textSize1=.. /LinearLayout //icon_row.xml LinearLayout ... com.test.android.ALS.icon_row ... app:imgSrc=... /LinearLayout I have another main.xml that defines the ListView which is set to an adpater. In my adatper's getView (in separate class file), I will inflate: if(convertView == null) { if(no drawable) { convertView = mInflater.inflate(R.layout.text_row. null); } else { convertView = mInflater.inflate(R.layout.icon_row, null); } } Both of icon_row, text_row have a root LinearLayout that seem to be redundant. The row layouts can be directly attached ListView. This may be a case for merge. To use merge, I need a ViewGroup in inflate that ViewGroup should be my ListView. My question is how to obtain a reference to the ListView w/o making the adapter as an inner class to the main activity. Thanks in advance. --~--~-~--~~~---~--~~ 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] ViewGroup parent for merge
Hi, I have a ListView with two types of custom views. It inflates icon_row view if a drawable exists or a text_row if not. I came up w/ custom views for icon_row text_row include them in their XML like so : //text_row.xml LinearLayout com.test.android.ALS.text_row ... app:text1=... app:textSize1=.. /LinearLayout //icon_row.xml LinearLayout ... com.test.android.ALS.icon_row ... app:imgSrc=... /LinearLayout I have another main.xml that defines the ListView which is set to an adpater. In my adatper's getView (in separate class file), I will inflate: if(convertView == null) { if(no drawable) { convertView = mInflater.inflate(R.layout.text_row. null); } else { convertView = mInflater.inflate(R.layout.icon_row, null); } } Both of icon_row, text_row have a root LinearLayout that seem to be redundant. The row layouts can be directly attached ListView. This may be a case for merge. To use merge, I need a ViewGroup in inflate that ViewGroup should be my ListView. My question is how to obtain a reference to the ListView w/o making the adapter as an inner class to the main activity. Thanks in advance. --~--~-~--~~~---~--~~ 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: Capture the Android's browser HTTP petitions
GIT is the repository where all android code is. for Browser, here is the specific link: http://android.git.kernel.org/?p=platform/packages/apps/Browser.git;a=summary On Jun 21, 1:02 pm, psaltamontes mcg2...@gmail.com wrote: @Alexey : What's the meaning of git? @ Hamy : ¡ I needed this line :) ! - resp.getEntity().writeTo(bao); I'm sure that the code that you are put help me a lot. @ Raphael : I used Google before put my question here. If you search this --http://www.google.com/search?q=set+proxy+for+android+web+browser The information that Google found is about change the general/main proxy, I only want redirect the browser's traffic. Thank you people. On 21 jun, 00:56, Raphael r...@android.com wrote: On Fri, Jun 19, 2009 at 7:57 AM, psaltamontesmcg2...@gmail.com wrote: Yes, I want to say request :), sorry , I need improve my English. I don't want my application modify the settings of the browser, the idea is that the user configure the proxy of the browser and install my application. This application is a service that listen theHTTP requests and send to the Internet. This might help: http://www.google.com/search?q=set+proxy+for+android+web+browser R/ I want capture theHTTPrequest and modify the headers because, in the header, I put a number to identify the client that connect to my webserver, doing this, the user don't have to put an user name and a password. I have written the code to do this, in PC works, but in Android I don't know how to get this behaviour. How can I do? On 18 jun, 21:14, Mark Murphy mmur...@commonsware.com wrote: I need capture the Android's browserHTTPpetitions. I think you mean request, not petition. In PC to capture theHTTPpetitions is easy, I change the browser configuration, I put localhost and a port () and it's works. But, in Android I don't know how to change the browser configuration. I would be rather surprised if they allowed applications to adjust the proxy server settings of the browser application. That would be a way for spyware to attack the user. For the emulator, you can set up a proxy server from outside the emulator environment itself: http://developer.android.com/guide/developing/tools/emulator.html#proxy -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~-~--~~~---~--~~ 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: how to load application to G1 phone
Steps that worked for me: - On the phone enable Development ( Unknown Source) Home Settings Applications *Enable Development *Home Settings Applications *Unknown Source * - Connect the phone device to the Computer using USB. - Run the application as Android Application using Eclipse, automatically it will detect the device and loads. Good Luck and Let me know. Kumar_/|\_ www.saisk.com ku...@saisk.com making a profound difference with knowledge and creativity... On Mon, Jun 22, 2009 at 11:46 AM, cindy ypu01...@yahoo.com wrote: need to enable USB debug on the phone On Jun 7, 10:17 am, cindy ypu01...@yahoo.com wrote: Help!! On Jun 6, 11:00 pm,cindyypu01...@yahoo.com wrote: After my phone has been upgraded to 1.5, I upgraded my application to 1.5. It could run correctly in simulator. When I launched application in 1.0, it asked me to run in real device or simulator. But in 1.5, my g1 phone is not listed at running android device.What should I do? --~--~-~--~~~---~--~~ 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] PowerManager.WakeLock and NotificationManager Issues
Hi everybody, I'm developing an Android application that runs a background service. This service must launch and activity when an incoming XMPP event is received (we're using smack.jar library for android). I'm facing some issues when launching the activity if the phone screen is locked. To solve them, I'm using KeyguardLock and WakeLock classes to wake up the device when the XMPP event is received. I'm doing it this way: KeyguardManager.KeyguardLock kl = km.newKeyguardLock(TAG); PowerManager pm = (PowerManager)getSystemService (Context.POWER_SERVICE); PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK| PowerManager.ON_AFTER_RELEASE|PowerManager.ACQUIRE_CAUSES_WAKEUP, TAG); wl.acquire(); kl.disableKeyguard(); wl.release(); The strange thing is that, when the screen is locked, the first time this code is triggered, it works quite well, the screen is unlocked and the activity is shown. However, the next times this code is executed, the screen does not unlock (only flash when the wl.acquire() method executes). I don't know if I'm missusing the wakelock flags, so I'd like to receive some feedback of android experts :) The another issue is when using a NotificationManager in order to play a sound when a XMPP event arrives. I'm using this code: NotificationManager nm = (NotificationManager)getSystemService (Context.NOTIFICATION_SERVICE); Notification notif = new Notification(); notif.defaults |= Notification.DEFAULT_SOUND; nm.notify(1, notif); When this code executes, the application launch this error: 06-22 09:17:11.347: ERROR/MediaPlayerService(542): Couldn't open fd for content://settings/system/notification_sound 06-22 09:17:11.416: ERROR/MediaPlayer(569): Unable to to create media player 06-22 09:17:11.480: WARN/NotificationService(569): error loading sound for content://settings/system/notification_sound 06-22 09:17:11.480: WARN/NotificationService(569): java.io.IOException: setDataSource failed.: status=0x8000 I've seen the same problem in this thread http://groups.google.com/group/android-developers/browse_thread/thread/c6e375859329807d/58827d969cb5e1ab?lnk=raot, and don't know if it is a bug of the 1.5 SDK. Any advice will be welcome. Regards, Mario. --~--~-~--~~~---~--~~ 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] drawRect not doing anything in a 1.5 MapView
I'm having a problem getting drawRect to draw anything on a Canvas from a MapView (i.e. as an Overlay) on 1.5 firmware. The strange thing is, drawLine is working perfectly, and both work right with the same code under 1.1. Was there anything that changed in this respect between 1.1 and 1.5 I'm not taking into account? The relevant code is as follows (in snippet form): (R.color.graticule_fill is #10FF; Graticule is an object that indicates a 1x1 degree area on the earth's surface) Context mContext; // comes in from constructor static Paint fillPaint = new Paint(); fillPaint.setColor(mContext.getResources().getColor (R.color.graticule_fill)); protected void drawGraticuleFill(Canvas c, Projection pr, Graticule g) { // This method is called from draw(); c is passed in from there, // pr = mapView.getProjection(), g is provided by the class. if (g == null) { return; } // Two Points, the top-left and bottom-right of the graticule, taken from the // current Projection Point topleft = pr.toPixels(g.getTopLeftGeoPoint(), null); Point bottomright = pr.toPixels(g.getBottomRightGeoPoint(), null); // Should draw out a rectangle covering the graticule; this works in 1.1, but // doesn't seem to do anything in 1.5. c.drawRect(new Rect(topleft.x, topleft.y, bottomright.x, bottomright.y), fillPaint); } (sorry if this snippet doesn't make much sense out of context, I can provide more information if need be) --~--~-~--~~~---~--~~ 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 clear dependent data in “system setting”
Hi All, I am developing an application which can share data with email, contact and calendar application. Now I met a problem when I clear this application data or uninstall this application in the system setting. Setting only clear my own application data now.This problem is that how to clear email, contact and calendar data at the same time of clearing my application data. This problem can concluded as that how to clear several databases which have dependency at the same 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] android locked me out
i just got locked out by my g1. i shall enter my google login username and password, but they are not accepted, though they are correct (just logged in with them to write this). is this a known bug or how can i login again? --~--~-~--~~~---~--~~ 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] Video display issue
Hi, I develop, an app which have two SurfaceView. One of them (view1) is used to draw graphic 2D object (shape, text) and the other (view2) to display a video playback. To draw the graphic 2D object, I used lockCanvas() and unlockCanvasAndPost() on the SurfaceHolder of the SurfaceView. My problem is the following: first I use an AbsoluteLayout to manage my views and a G1 or G2. - If the view2 is under the view1, the video playback is correctly displayed, but if I go to the home screen of the device and after go back to my app, the video playback is no more displayed. - If the view1 is under the view2, the video playback is not displayed, but if I go to the home screen of the device and after go back to my app, the video playback correctly displayed. I don't understand this behavior. Thanks for your help. --~--~-~--~~~---~--~~ 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: Help on video recording
test On 6月23日, 上午12时48分, cindy ypu01...@yahoo.com wrote: I have tried 1.5 video API. I could not make it work.It even can't do preview. following is my code: private boolean initializeVideo() { Log.v(TAG, initializeVideo); if(Common.mRecordedVideo!=null Common.mRecordedVideo.exists ()) Common.mRecordedVideo.delete(); File sDir = Environment.getExternalStorageDirectory(); String baseDir = sDir + Common.BASE_DIR; File sampleDir=new File(baseDir); if(!sampleDir.canWrite()) // Workaround for broken sdcard support on the device. sampleDir = new File(/sdcard/sdcard); try { Common.mRecordedVideo = File.createTempFile(PREFIX, EXTENSION, sampleDir); } catch(IOException e) { AlertDialog.Builder ab = new AlertDialog.Builder (VideoRecord.this); ab.setTitle(Error); ab.setMessage( can't write audio data to storage); ab.setIcon(R.drawable.error); ab.setNeutralButton(Close, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }); ab.show(); return false; } Intent intent = getIntent(); releaseMediaRecorder(); if (mSurfaceHolder == null) { Log.v(TAG, SurfaceHolder is null); return false; } mMediaRecorder = new MediaRecorder(); mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mMediaRecorder.setVideoSource (MediaRecorder.VideoSource.CAMERA); mMediaRecorder.setOutputFormat (MediaRecorder.OutputFormat.THREE_GPP); mMediaRecorder.setMaxDuration(MAX_RECORDING_DURATION_MS); mMediaRecorder.setOutputFile (Common.mRecordedVideo.getAbsolutePath()); // Use the same frame rate for both, since internally // if the frame rate is too large, it can cause camera to become // unstable. We need to fix the MediaRecorder to disable the support // of setting frame rate for now. mMediaRecorder.setVideoFrameRate(20); mMediaRecorder.setVideoSize(352,288); mMediaRecorder.setVideoEncoder (MediaRecorder.VideoEncoder.H263); mMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface()); try { mMediaRecorder.prepare(); } catch (IOException exception) { Log.e(TAG, prepare failed for ); releaseMediaRecorder(); // TODO: add more exception handling logic here return false; } mMediaRecorderRecording = false; return true; } private void startVideoRecording() { Log.v(TAG, startVideoRecording); if (!mMediaRecorderRecording) { // Check mMediaRecorder to see whether it is initialized or not. if (mMediaRecorder == null initializeVideo() == false ) { Log.e(TAG, Initialize video (MediaRecorder) failed.); return; } try { mMediaRecorder.setOnErrorListener(this); mMediaRecorder.setOnInfoListener(this); mMediaRecorder.start(); // Recording is now started } catch (RuntimeException e) { Log.e(TAG, Could not start media recorder. , e); return; } mMediaRecorderRecording = true; mRecordingStartTime = SystemClock.uptimeMillis(); updateRecordingIndicator(true); mRecordingTimeView.setText(); mRecordingTimeView.setVisibility(View.VISIBLE); mHandler.sendEmptyMessage(UPDATE_RECORD_TIME); setScreenTimeoutInfinite(); } } --~--~-~--~~~---~--~~ 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] Invoking Activity from PendingIntent in NotificationManager
Hello, i want to Inform the User about an Event from my Application using the NotificationManager and then invoking a Activity with details about the Event. As far as i know it should work like this: final NotificationManager mManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Intent intent = new Intent(Main.this, AlarmNotificationDetail.class); Notification notification = new Notification(R.drawable.icon, Notify, System.currentTimeMillis()); notification.setLatestEventInfo(Main.this, App Name, Description of the notification, PendingIntent .getActivity(Main.this.getBaseContext(), 0, intent, PendingIntent.FLAG_CANCEL_CURRENT)); mManager.notify(815, notification); This put an Event in my Statusbar, but it do not forward to the AlarmNotificationDetail.class Activity. Main.this is the Context from which this Event is triggered. The Activity to Invoke looks live this and should bring up a Toast when created: public class AlarmNotificationDetail extends Activity { /* * (non-Javadoc) * * @see android.app.Activity#onCreate(android.os.Bundle) */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.alarmnotificationdetail); Toast.makeText(this, this is a toast, Toast.LENGTH_LONG); } } Anyone can help me out ? regards, Mac --~--~-~--~~~---~--~~ 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: MapView always displays blank white sceen
Unable to see this post in the forum, hence resending. On Mon, Jun 22, 2009 at 2:23 PM, Rash raj143p...@gmail.com wrote: Hello experts, I'm new to android and need some help. I'm creating a basic Mapview application which will display my current location on the google map. Initially i had many doubts while creating the application, but thanks to android developers archives that helped me to reach this point. I have followed almost all the threads on the android developers site but still unable to see my location on the google maps. It always shows a white screen on the emulator with google image at the bottom. Please help to make it work. From most of the threads I learn that we need to sign our application with the correct fingerprint. I did so but unsuccessful. The following will explain the steps: 1. Using sdk version android-sdk-windows-1.0_r1 2. Created a new android application. 3. Signing the application: a. C:\Program Files\Java\jdk1.6.0_13\binkeytool.exe -list -alias androiddebugkey - keystore D:\Profiles\fknq86\Local Settings\Application Data \Android\debug.keyst ore -storepass android -keypass android b. Certificate fingerprint (MD5): 75:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:33 where XX=some alpha numeric data c. signing up for an Android Maps API key! using link http://code.google.com/android/maps-api-signup.html 4. Code below: There are 2 applications 1. Find Me 2. ShowMyLoc. FindMe has a button which directs it to ShowMyLoc (using Intent) to show the location on the google maps. For simplicity sake i'm pasting the code only for ShowMyLoc app. //ShowMyLoc.java package org.anddev.android.findme; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; public class ShowMyLoc extends MapActivity { private Location myLocation; protected MapView myMapView = null; protected LocationManager myLocationManager = null; protected MapController mapController; @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } @Override protected void onCreate(Bundle icicle) { // TODO Auto-generated method stub super.onCreate(icicle); this.myMapView = new MapView(this, 0ZFOV5MY-5tIiNoVa_UiMuiMf39w_N6T5DalZzg); this.setContentView(myMapView); mapController = myMapView.getController(); mapController.setZoom(15); this.myLocation = new Location(gps); this.myLocation.setLongitude(77.52436144125092); this.myLocation.setLatitude(13.05096452223662); updateView(); } private void updateView(){ Double lat = myLocation.getLatitude(); Double lng = myLocation.getLongitude(); GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue()); mapController.setCenter(point); } } //Menifest.xml ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.anddev.android.findme android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.READ_CONTACTS / uses-permission android:name=android.permission.CALL_PHONE / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_GPS / uses-permission android:name=android.permission.ACCESS_MOCK_LOCATION / uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_LOCATION / uses-permission android:name=android.permission.ACCESS_ASSISTED_GPS / uses-permission android:name=android.permission.ACCESS_CELL_ID / application android:icon=@drawable/icon android:label=@string/ app_name uses-library android:name=com.google.android.maps / activity android:name=.FindMe android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.ShowMyLocintent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category /intent-filter /activity /application /manifest --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google
[android-developers] Information about nearby businesses
Hi, I am looking for ways to get information on nearby businesses like restaurants etc., given a GPS long/lat item. 1. Reverse Geocoding does not seem to give me this information. 2. Google Maps/Earth has a Businesses overlay, is this data somehow accessible? 3. Can I perform a Google Search Engine search? The AJAX Search API does not seem to be available on Android. 4. When I do a normal Google Search on a City and e.g. Starbucks, I get much more hits than in 2., that's why I could prefer 3. Any Ideads are appreciated! Thanks, Chris --~--~-~--~~~---~--~~ 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] MapView always displays blank white sceen
Hello experts, I'm new to android and need some help. I'm creating a basic Mapview application which will display my current location on the google map. Initially i had many doubts while creating the application, but thanks to android developers archives that helped me to reach this point. I have followed almost all the threads on the android developers site but still unable to see my location on the google maps. It always shows a white screen on the emulator with google image at the bottom. Please help to make it work. From most of the threads I learn that we need to sign our application with the correct fingerprint. I did so but unsuccessful. The following will explain the steps: 1. Using sdk version android-sdk-windows-1.0_r1 2. Created a new android application. 3. Signing the application: a. C:\Program Files\Java\jdk1.6.0_13\binkeytool.exe -list -alias androiddebugkey - keystore D:\Profiles\fknq86\Local Settings\Application Data \Android\debug.keyst ore -storepass android -keypass android b. Certificate fingerprint (MD5): 75:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:33 where XX=some alpha numeric data c. signing up for an Android Maps API key! using link http://code.google.com/android/maps-api-signup.html 4. Code below: There are 2 applications 1. Find Me 2. ShowMyLoc. FindMe has a button which directs it to ShowMyLoc (using Intent) to show the location on the google maps. For simplicity sake i'm pasting the code only for ShowMyLoc app. //ShowMyLoc.java package org.anddev.android.findme; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; public class ShowMyLoc extends MapActivity { private Location myLocation; protected MapView myMapView = null; protected LocationManager myLocationManager = null; protected MapController mapController; @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } @Override protected void onCreate(Bundle icicle) { // TODO Auto-generated method stub super.onCreate(icicle); this.myMapView = new MapView(this, 0ZFOV5MY-5tIiNoVa_UiMuiMf39w_N6T5DalZzg); this.setContentView(myMapView); mapController = myMapView.getController(); mapController.setZoom(15); this.myLocation = new Location(gps); this.myLocation.setLongitude(77.52436144125092); this.myLocation.setLatitude(13.05096452223662); updateView(); } private void updateView(){ Double lat = myLocation.getLatitude(); Double lng = myLocation.getLongitude(); GeoPoint point = new GeoPoint(lat.intValue(), lng.intValue()); mapController.setCenter(point); } } //Menifest.xml ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.anddev.android.findme android:versionCode=1 android:versionName=1.0.0 uses-permission android:name=android.permission.READ_CONTACTS / uses-permission android:name=android.permission.CALL_PHONE / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_GPS / uses-permission android:name=android.permission.ACCESS_MOCK_LOCATION / uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.ACCESS_LOCATION / uses-permission android:name=android.permission.ACCESS_ASSISTED_GPS / uses-permission android:name=android.permission.ACCESS_CELL_ID / application android:icon=@drawable/icon android:label=@string/ app_name uses-library android:name=com.google.android.maps / activity android:name=.FindMe android:label=@string/ app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.ShowMyLocintent-filter action android:name=android.intent.action.VIEW/action category android:name=android.intent.category.DEFAULT/category /intent-filter /activity /application /manifest --~--~-~--~~~---~--~~ 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] How to clear dependency databases in the system setting
Hi All, I am developing an application which can share data with email, contact and calendar application. Now I met a problem when I clear this application data or uninstall this application in the system setting. Setting can only clear my own application data now.This problem is that how to clear email, contact and calendar data at the same time of clearing my application data. This problem can concluded as that how to clear several databases which have dependency at the same 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] Orientation Sensor problems.
Hi All, Hoping someone can help me make sense of my problem, Using eclipse to create a v1.5 compass application for my tmobile G1. What i'm experiencing is wacky heading results from the orientation sensor. the important bits of my code are : the setup of the sensor is sensorManager = (SensorManager)getSystemService (Context.SENSOR_SERVICE); if (sensorManager != null) { Sensor orsensor = sensorManager.getSensorList (Sensor.TYPE_ORIENTATION).get(0); sensorManager.registerListener(sensorListener, orsensor, SensorManager.SENSOR_DELAY_NORMAL); } And my listener is defined as : private final SensorEventListener sensorListener = new SensorEventListener() { public void onAccuracyChanged(Sensor sensor, int accuracy) {} public void onSensorChanged(SensorEvent event) { updateOrientation(event.values[0], event.values[1], event.values[2]); Log.d(sensor,Sensor event: +event.sensor.toString()+// +event.values[0]+ +event.values[1]+ +event.values[2]); } }; When I run the app', my heading values are always being reported as being between 250 - 270 and don't alter from that irrelevant of which way I'm pointing the device. Theres nothing physically wrong with the hardware as all other apps which use the sensors work fine so i'm confused, i'm sure its something silly i've missed off. If anyone can see a problem, please let me know it's greatly appreciated.. Thanks --~--~-~--~~~---~--~~ 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] Who can help me porting tslib to Android?
As the title said, I'm porting the tslib to Android, but there are many problems on it. First, the build/make system of android is different from tslib and others software such as DirectFB, Second, how can i inject the calibrated device into the android? and the third, DirectFB will take the tslib when build itself, how can i do it like this when make android? THX --~--~-~--~~~---~--~~ 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 clear dependency databases in the system setting
Hi All, I am developing an application which can share data with email, contact and calendar application. Now I met a problem when I clear this application data or uninstall this application in the system setting. Setting can only clear my own application data now.This problem is that how to clear email, contact and calendar data at the same time of clearing my application data. This problem can concluded as that how to clear several databases which have dependency at the same 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] Getting data from google search
Hi, as the Geocoder does not support too much information (e.g. none on business-related ones), I wanted to ask how such data can be aquired. Is it possible to do a Google Search (using the AJAX API) in some way? How do other applications get this data (e.g. cab4me?)? Google Eearth does have a business overlay, but I did not find a way to request this information using the maps api. Thanks, Chris --~--~-~--~~~---~--~~ 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: OutOfMemoryError
Any news on this topic? Got the same problem here under: mac os android 1.5 apache ant version 1.7.1 Where should i set the memory options? Cheers, Fabian On 20 Jun., 09:20, Francois francoislio...@gmail.com wrote: Answering to myself. After doing a long search for all the *.bat on my C: drive, I have found it. But it is located in the 1.1 Android SDK. So I guess it is out of date now. Does anyone else have an idea? Thanks, Francois --~--~-~--~~~---~--~~ 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] Application Needed
I am an instructor in the military. I have an instructor evaluation coming up and I am looking for an application that might be able to help me out. When I am instructing a class I have to ask a question every three to six minutes. No more no less. I was looking for an app that would vibrate in my pocket every four minutes. Does anyone know of an app like this? Thank you very much for any help that is offered. --~--~-~--~~~---~--~~ 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] test
test --~--~-~--~~~---~--~~ 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] It doesn't works
I used eyes-free in my application started on emulator. It gives error no description. do you have some ideas? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---