[android-developers] Re: How to bring back file-explorer window in eclipse-DDMS once after closing it
Window Show View Other... Then you'll find it under Android. You can also reset the whole perspective (Window Reset Perspective) Xav On Thu, Jan 8, 2009 at 10:19 PM, Asif k asifk1...@gmail.com wrote: Hi All, I had closed the file-explorer window in the DDMS of eclipse by mistake. But now I am not able to find the options anywhere in DDMS to restore it again so file-explorer of an emulator gone in my DDMS.But it is needed. Can anyone tell me how can I restore it again? Thanks, Asif. --~--~-~--~~~---~--~~ 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: add new resource when using eclipse plugin
I got it. There was an error in another resource file (layout.xml) that I was ignoring until later but it looks like if there are any errors then new resource files don't get checked or updated in R.java. On Jan 8, 10:54 pm, eags eagsala...@gmail.com wrote: I added a new file colors.xml to res/values/ . That seemed to go OK but the R.java class was *not* automatically updated. Is there a right way to add these files? I just did ctrl-N then selected File and named the file colors.xml. Then I just typed in the xml which looks fine. I looked for something like Android Resource but saw nothing. I actually also had this problem when adding images to res/drawable/. I added two images but they didn't show up. In that case I said create new file, link to filesystem and that (strangely) worked and for some reason the second image showed up. It was like I just needed to kick it a little to trigger it to look in that directory. Is there something I'm missing here? Thanks in advance for any 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: How To Custom Horizontal Scroll?
Hi, i've noticed this. The ListView could be scrolled only by the trackball. Because i didn't override the touch event for the ListView. On 9 jan, 00:30, Moto medicalsou...@gmail.com wrote: Hey Roland thanks for your code it really helps figuring out things... I just tried running it and what I do notice is that touch events for the list are never received so that one could make a selection on the list or Scroll down... Have you noticed this? --~--~-~--~~~---~--~~ 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: What is the best practice for finding friends that have android phones?
Ok, I hear you and after having talked to a few others about this, I've decided to stray away from that path. I agree with you on privacy issues and I also just think that it's too cumbersome. Hopefully in the future we will have some sort of API that allows for better social networking between android users. For now it'll just have to be usernames and 3rd party channels. On Jan 6, 6:17 pm, Mark Murphy mmur...@commonsware.com wrote: Robert Green wrote: I totally understand what you're saying. There is a chicken or egg problem, though. Say user 1 wants to play user 2 but user 2 isn't registered yet. What is a convenient way to set up the game so that user 2 is in pending status but user 1 didn't have to explicitly enter user 2's email address? After that, how does the system know user 2 is linked to that game when user 2 registers? Using email addresses as unique identifiers sucks, IMHO. However, there is a *huge* difference between User 1 telling your app User 2 will be signing up soon, use her email address and your app slurping down hundreds of email addresses in the off chance that someday, maybe, one or more of them will become users of your app. To look at this another way: when a desktop program slurps down hundreds of email addresses and sends it to a third party Web service, we call it malware. Why is this somehow different? I don't think it cuts into privacy because at this point people are used to using their email address as their identifier on almost every web site out there. Let's go back to User 1 and User 2. User 1 signs up for your service and hands over User 1's email address. That's fine, because User 1 is the one agreeing to sign up. Sometime in the future, User 2 signs up for your service and hands over User 2's email address. That's all fine too, because User 2 is the one agreeing to sign up. What you're proposing is that User 1 also gives you User 2's email address. User 2 didn't exactly get a vote in this decision. Perhaps User 2 wants to use a different address (e.g., a unique one for your app, to minimize possible spam). Perhaps User 2 won't sign up for your app after realizing she has to provide you with her email address just to play some game. Perhaps User 2 isn't quite the friend that User 1 thinks she is. Of course, what you're *really* proposing is for User 1 to give you the email addresses of User 2, User 3, User 4, ..., User N (have each user register for the online service by providing all of their contact email addresses). You really should talk to qualified legal counsel about your concept, as I suspect there are several US states' attorney generals (attornies general?) who might disagree with your position. Particularly if your game may involve minors. My goal is to make it as easy as possible to create games with users that aren't registered yet but will be registering in the future. That's a noble goal. Just don't assume you can rummage around somebody's contact list in achieving that goal. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ 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 Custom Horizontal Scroll?
You are talking about @+id/MenuBarLayout right? Did you set its width to FILL_PARENT when you get the screen width? If you did this, it is totally right that your code returns the screen width, because its grand parent's width is FILL_PARENT. In this case, i think you should fix MenuBarLayout's width. On 9 jan, 01:57, Moto medicalsou...@gmail.com wrote: Also let me ask you this: I'm trying to get the total length of my LinearLayout which contains few buttons all positioned horizontally roughly 600px. Now when I try to get the width of that layout it returns the width of the what is only shown, essentially the screen width... So I tried setting wrap_content for the width on but it doesn't work. But when I set 600px it works fine... Any ideas? here is my XML if needed: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_height=fill_parent android:layout_width=fill_parent LinearLayout android:id=@+id/MenuBarHolder android:layout_height=wrap_content android:layout_width=fill_parent LinearLayout android:id=@+id/MenuBarLayout android:layout_height=wrap_content android:layout_marginBottom=0px android:layout_width=wrap_content android:layout_weight=1 Button android:id=@+id/btn1 android:text=1 android:layout_width=80px android:layout_height=50px /Button Button android:id=@+id/btn2 android:text=2 android:layout_width=80px android:layout_height=50px /Button Button android:id=@+id/btn3 android:text=3 android:layout_width=80px android:layout_height=50px /Button Button android:id=@+id/btn4 android:text=4 android:layout_width=80px android:textSize=12px android:layout_height=50px /Button Button android:id=@+id/btn5 android:text=5 android:layout_width=80px android:layout_height=50px /Button Button android:id=@+id/btn6 android:text=6 android:layout_width=80px android:layout_height=50px /Button /LinearLayout /LinearLayout /LinearLayout --~--~-~--~~~---~--~~ 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: native C+ + SIP stack on Android
Should be.the JSR180 or JSR 281 inteface given out as JNI native interface, and the higher layer runs in JAVA space. --- 09年1月9日,周五, David Turner di...@android.com 写道: 发件人: David Turner di...@android.com 主题: [android-developers] Re: native C++ SIP stack on Android 收件人: android-developers@googlegroups.com 日期: 2009,19,周五,1:08上午 first, you cannot have C++ code in the kernel. however, depending on how your stack is designed, you may be able to use it from Java through JNI given that you give absolutely no information about your stack's interface, it's really difficult to answer your question On Thu, Jan 8, 2009 at 5:57 PM, pinguin e...@vinacom.de wrote: Can i port SIP stack written in C++ to android and let it running as service in kernel ? and the GUI will communicate with SIP stack through JNI ? ___ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.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: DRAG AND DROP
I don't know what your final code looks like that you use, but you can change the visibility of the original item you are dragging temporarily using setVisibility(View.INVISIBLE) or View.GONE depending on how your layout is organized, so that only one item is visible while dragging. You could post your code here if you need further help. Peli On 9 Jan., 08:41, kaushik sur kaushik@gmail.com wrote: hi all i have mentioned about a code link which can be used as an e.g. of the Drag_N_Drop feature, but there will be small change. the onMotionEvent(MotionEvent event) has to be replaced by onTouchEvent(MotionEvent event). though it starts the Drag_n_drop but it not smooth as u expect. rather here i am getting a abnormal behavior,i.e, i am getting double image of the button, that i drag and drop,Can anyone run the code sample and solve the issue...? regards Kaushik On Fri, Jan 9, 2009 at 2:39 AM, Peli peli0...@googlemail.com wrote: which can be found here: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;... with the related classes being here: http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;... but this is the luxury version, including scaling of the image, scroll zones, and vibration :-) Peli On Jan 8, 8:16 pm, Romain Guy romain...@google.com wrote: You can also look at the source code of the Home (Launcher) application, in particular the class called DragLayer. On Thu, Jan 8, 2009 at 11:12 AM, Peli peli0...@googlemail.com wrote: The code sample you linked to should work. The basic idea is that you continuously put your image to a new position according to the coordinates that you obtain through ACTION_MOVE to give the illusion of dragging. In ACTION_UP you check whether the finger position is close to the target. in ACTION_DOWN you can remember the initial finger coordinates so that you can grab your icon everywhere correctly. Basically you have to code everything by yourself, but it should not be very difficult. Peli www.openintents.org On Jan 8, 7:06 pm, kaushik sur kaushik@gmail.com wrote: hi i got a suggestion here. but i really doubt whether it will work or not.http://groups.google.com/group/android-beginners/browse_thread/thread. .. please give me a valid reasoning or example. regards Kaushik On Thu, Jan 8, 2009 at 9:43 PM, kaushik.siso kaushik@gmail.com wrote: hi i want to know how can i enbale Drag and drop feature in android. suppose i have a image,which are to be dragged and dropped on another result and it will start a new activity. i seek your help to get a head-start atleast. regards k...@sis -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: How to bring back file-explorer window in eclipse-DDMS once after closing it
Hi Xav, Thans a lot. I got it. On Jan 9, 1:14 pm, Xavier Ducrohet x...@google.com wrote: Window Show View Other... Then you'll find it under Android. You can also reset the whole perspective (Window Reset Perspective) Xav On Thu, Jan 8, 2009 at 10:19 PM, Asif k asifk1...@gmail.com wrote: Hi All, I had closed the file-explorer window in the DDMS of eclipse by mistake. But now I am not able to find the options anywhere in DDMS to restore it again so file-explorer of an emulator gone in my DDMS.But it is needed. Can anyone tell me how can I restore it again? Thanks, Asif.- 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: Is there a SeekBar preference?
Hi Marc, Big thanks for sharing the code. I'm thinking of changing volumeLevel.setProgress(0); // You might want to fetch the value here from sharedpreferences to volumeLevel.setProgress(getPersistedInt(0)); and protected void onDialogClosed(boolean positiveResult) { if(positiveResult){ persistString(volumeLevel.getProgress()+); } } to persistInt(volumeLevel.getProgress()) and that becomes exactly the preference I need. Thanks again for sharing! Cheers, Stoyan On Fri, Jan 9, 2009 at 4:52 AM, Marc Lester Tan mail...@gmail.com wrote: Hi Stoyan, Yesterday I also asked myself if there's a Seekbar preference but I looked around and did not find any so I created my own. Here's my code if it will help you. public class SeekBarPreference extends DialogPreference{ private Context context; private SeekBar volumeLevel; public SeekBarPreference(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; } protected void onPrepareDialogBuilder(Builder builder) { LinearLayout layout = new LinearLayout(context); layout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); layout.setMinimumWidth(400); layout.setPadding(20, 20, 20, 20); volumeLevel = new SeekBar(context); volumeLevel.setMax(8); volumeLevel.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); volumeLevel.setProgress(0); // You might want to fetch the value here from sharedpreferences layout.addView(volumeLevel); builder.setView(layout); super.onPrepareDialogBuilder(builder); } protected void onDialogClosed(boolean positiveResult) { if(positiveResult){ persistString(volumeLevel.getProgress()+); } } } then in your activity you can use this class: SeekBarPreference sb = new SeekBarPreference(this, null); sb.setTitle(R.string.volume); sb.setSummary(R.string.volume_summary); sb.setKey(VOLUME_LEVEL_PREF); -Marc On Fri, Jan 9, 2009 at 9:13 AM, Stoyan Damov stoyan.da...@gmail.com wrote: Hi guys, The emulator and G1's Settings apps apparently launches a preference activity. In Settings, Sound and Display, when you touch the Ringer volume setting, a dialog pops up, which shows a SeekBar. My question is how is this implemented because I need a similar (seek bar-driven) setting in my app. I don't have Android's source code and am hesitant to download 2.1G just to check :( I'm guess this setting does NOT launch an intent which pops up the dialog (because I'd expect that intent to be wrapped in PreferenceScreen and then I'd see the circled arrow indicator) but can't be sure. I know many people on the list are Google employees and am hoping I'll get an answer. Thanks in advance, Stoyan --~--~-~--~~~---~--~~ 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] What's the handwriting recognition?
Dear All: I see the T-mobile G1 support the handwriting recognition. But I don't find any demo for handwriting recognition, I'm afraid that I misunderstand the definition of handwriting recognition. In my knowledge, the handwriting recognition is to let user use pen to write words on the screen. Am I right? Another question is the android whether to support handwriting recognition for their inputmethod ? Thanks a lot. Morris --~--~-~--~~~---~--~~ 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: native C++ SIP stack on Android
Ok, thanks. So it would be able when i have a SIP stack written in C. Is there any restrictions using JNI in adroid. Can i load all libs of my sip stack ? On 8 Jan., 18:08, David Turner di...@android.com wrote: first, you cannot have C++ code in the kernel. however, depending on how your stack is designed, you may be able to use it from Java through JNI given that you give absolutely no information about your stack's interface, it's really difficult to answer your question On Thu, Jan 8, 2009 at 5:57 PM, pinguin e...@vinacom.de wrote: Can i port SIP stack written in C++ to android and let it running as service in kernel ? and the GUI will communicate with SIP stack through JNI ? --~--~-~--~~~---~--~~ 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] apis to encode xml to wbxml 1.2 ?
hello, Does android supports any apis/scripts to encode/decode xml to wbxml ?. If so, please help me in finding it out. Thanks. Sukumar. --~--~-~--~~~---~--~~ 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 Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?
Thanks everyone for the replies: Just to clarify: I am writing an advertising server component at the moment, but other projects that I have in the pipeline essentially have the same requirement. Dianne Hackborn - As far as naming issues, this is why you should use an authority in a namespace/domain you own, so that there will not be naming collisions. My application sits in its own namespace. I am only having conflicts with different copies of the same Content Provider Component being installed with different applications. Dianne Hackborn - …any client app that is relying on a component that is not part of the base platform needs to deal with the error cases if that component does not exist. If the component is not there, then the application would show an error on start and normally refuse to run. Result: Bad user experience. Peli - Hm, I think you end up with unnecessary code duplication if you include your component / content provider in every application. This isn’t an issue, as my component is delivered as a small Java class included with the main application. When activated, the component inflates in size as it downloads content over the internet. My goal is to manage this process by having only one component activated regardless of how many applications are installed on the device. Peli - I think it would be better if every application that wants to use your component shows a small dialog You need to install the following component... with a button that brings you to the download page of the Market for your component... Catching a missing component is easy enough. It’s just that what you describe adds up to a bad user experience: - No user will download a 3rd party advertising server (or any non- core functionality) just to run a game. - Installation is already a convoluted process and should only take place once. Additional APK installations require more downloading, application permission settings, button pressing, confusion, etc. - No client of mine will accept a solution that asks the user to jump through any additional hoops (e.g. even the Android Developer Challenge only permitted a single executable). Peli - At OpenIntents we try to resolve dependencies as late as possible - i.e. not at installation time, but the first time the user actually wants to use a particular feature (they may never use it in which case there is no need to install it). This doesn’t work for me as ad funded Applications generally require my component to be available on startup. Peli - I think in the long run Market should have better tools for resolving compulsory dependencies automatically, but for the moment I think this is a good compromise for developers and end users. I agree that this needs to be improved, as there is currently no support for components (downloading, versioning, upgrading, etc) in Android or on the Android Market. Hence I am trying to get around this issue by “managing” a Content Provider. Dianne Hackborn - Oh wait if what is being talked about is having the same content provider in multiple applications, that is completely the wrong approach. For a given authority there must be one and only one content provider implementation, living in a single specific .apk. This is how it’s done at the moment, i.e. Android will log a warning (and do nothing) every time an application tries to register a Content Provider URI that’s already in use. This means that subsequent applications will be broken (and need to be reinstalled) if the original Content Provider is ever uninstalled. I don’t seem to be able to reregister a missing Content Provider URI at runtime. Muthu Ramadoss - AFAIK, a Content Provider is tied up to a unique Authority. If you want to support multiple URI's you do so accordingly by providing different URI paths using the same authority. I explored this approach initially, but it still has the following problem: Over time, I release a number of versions of my component that other developers subsequently integrate into their own applications. My component uses the following URI conventions: content://mynamespace.mycomponentnamespace.version1/ content://mynamespace.mycomponentnamespace.version2/ content://mynamespace.mycomponentnamespace.version3/ Android allows me to search and interrogate each URI to check the status of each Content Provider (allowing me to version my component). This is fine until v3 of my component becomes really popular and a user installs five games on their phone, each with the same component trying to register the same URI. The user then gets bored of the first game and uninstalls it, thereby breaking all the other games that rely on the Content Provider that it contains. As URIs are set at install time, none of the other games will work until the user reinstalls an existing game or downloads a new one - This is a terrible user experience. Regards Mark --~--~-~--~~~---~--~~ You received
[android-developers] Post Bitmap over Http
Hi, I need to send a bitmap to a server. I've written some code, however, I got stuck on the part where I need to transform my bitmap into byte []. Here is my code: public void updateBitmap(Bitmap bm){ URL url = null; HttpURLConnection conn = null; try { url = new URL(http://www.myurl.com?;); } catch (MalformedURLException e) { e.printStackTrace(); } try { conn = (HttpURLConnection) url.openConnection (); } catch (IOException e) { e.printStackTrace(); } try { conn.setRequestMethod(POST); } catch (ProtocolException e) { e.printStackTrace(); } conn.setDoOutput(true); conn.setDoInput(true); conn.addRequestProperty(user_id, user.getUsername ()); conn.addRequestProperty(pass, user.getPassword()); conn.addRequestProperty(id, pinId); OutputStream os = null; try { os = conn.getOutputStream(); } catch (IOException e) { e.printStackTrace(); } // Encode bitmap and flush the os } Could you advice me on how to complete my code? 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: imeem and buffering audio with MediaPlayer
Excellent! That should suffice (for me). I fuse 64 independent audio channels internally, but that part is not exposed to Android. Thanks On Jan 9, 4:59 am, Dave Sparks davidspa...@android.com wrote: Yes, AudioTrack and MediaPlayer will play along very nicely. MediaPlayer uses AudioTrack for its low-level audio interface. Up to 32 tracks of audio can be mixed. On Jan 8, 5:49 am, blindfold seeingwithso...@gmail.com wrote: Thanks David. You say that Cupcake's AudioTrack allows for generating raw audio in the application to be streamed to the audio output. It does not include a byte stream interface to the MediaPlayer, for example. Does this mean that it bypasses MediaPlayer altogether in accessing the audio hardware? If so, I hope it does not also bypass the low- level audio mixer, because apart from my own on-the-fly synthesized audio, I simultaneously output (asynchronously, depending on events) my own sampled human speech as well as speech from the Android TTS engine. It would be horrible if AudioTrack blocked the audio output from simultaneous access by Mediaplayer. I had been expecting a new API method like MediaPlayer.create(Context context, byte[] audioData) as a minor extension to android.media.MediaPlayer, but now I am again confused about what to expect, and actually worried about the interaction between AudioTrack and MediaPlayer. Indeed there is no word about (low-level) audio mixing or MediaPlayer in http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_... So, will AudioTrack and MediaPlayer play along nicely? 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: No reply on market
Hi, same Problem here... I ordered a phone some days ago but the order status is not being updated and no response on emails. But the credit card has alredy been charged... grml... Any experience how long it takes until a phone is being shipped? Cheers Chris On Jan 8, 6:31 pm, freeanderson freeander...@gmail.com wrote: Hello. About 10 days ago, I posted question to android market's 'support' about my order. But there was no reply until now. Is the market being operated normally? It doesn't make a sense. (Sorry for posting here.) 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] long home key press / task switcher
When one holds the home key for long key press, it invokes a notification dialog box with a list of recent applications. Is there a reason to limit that list to 6 ?? Where in the git repository can I find related to this long key homepress invoking the task switcher ? -M --~--~-~--~~~---~--~~ 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] No feedback when touch screen used for long press
I have a class that extends ListActivity which calls getListView ().setOnCreateContextMenuListener(this); and overrides onCreateContextMenu() and onContextItemSelected. If I use the D-Pad to select and press and hold an item in the list, the item background changes from black to orange and then gradually changes to white before the context menu comes up. If I use the touch screen to press and hold an item, the item background stays black. What do I have to do to get the same behavior with the touch screen that I get with the D-Pad? I've tried setting FocusableInTouchMode to true via resource and code for every view and I've tried requestFocus() in an onTouch() handler. Nothing seems to work. Any ideas? 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] bug? InputMethodManager.isWatchingCursor()
why the method InputMethodManager.isWatchingCursor() always returns false. so, i can not get the cursor position of TextView. it's a bug? --~--~-~--~~~---~--~~ 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] auto generation of Android.mk file
Hi Everyone, I am trying to port a package (library) in android. There are many subfolder in my library folder and each subfolder contains a makefile. I know that we have to write Android.mk file for building the package. Do we need to write the Andriod.mk file for each subfolder present in my library. Is there any way to generate Android.mk file from standard makefile? Regards, Krish --~--~-~--~~~---~--~~ 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] Any graphing frameworks/APIs available?
With android removing the Swing and AWT libraries from Java, I was wondering what solutions have been developed to display simple bar histograms, line graphs and other simple data visualizations charts in Android? Have any graphing libraries adapted or developed to make simple line, bar and histograms for the community? I've seen some solutions bandied about having people just pull down a google chart with a HTTP get which seems like a fine workaround. However, our eventual expected application usage is in a poor connectivity situation where network usage is expensive (unlocked phones in resource poor settings). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Oversights to an otherwise good OS
I like the Android operating system, I think it will be the choice of the averager user very very soon. I have a few suggestions that I think should be implemeted, which were overlooked, I think; they are as follows: *Smileys for texting. *Removal of or the option to hide all pictures folder. *Option to view picture folders as other than thumbnails. *To be able to change from portrait to landscape and vise-versa in picture view mode using accelrometer. *Better file management so as to be able to move pic or music file into other folders withought PC. *Be able to access and create playlists from folders created on MS directly for music. *Not change current playing track every time I want to browse another playlist. *Every time a playlist is edited it has to be saved to make edition permanent but no warning given if you forget and backout. *Also every time your saving an edited playlist, you should have a default Overight Current button. *More options on the camera software. e.g. 10 second timer *Software to record video using camera. *Be able to move icons from the tab tray as suppose to copying them. Leaves too much clutter as it is in tab tray if you have a lot of applications, and therfore makes it not a very good experiance when it is used. *Be able to password protect files and folders. *Call log should display the exact time of calling not just a calculation of how long ago. *I've noticed a dialing pad tab while on a call to some one and thoght this good; I can save numbers given to me over the call, but couldn't figure out what it did. I want to able to save numbers like while on a call to some 1. Thank you and I hope u find these suggestion helpful in improving the OS. --~--~-~--~~~---~--~~ 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] FM Radio
Hi, Is there a FM receiver or transmitter application available on the Android platform? What is preferred - HCI or I2C? What about RDS? 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: invalid statement in fillwindow
Okay, problem solved. Due to a bit of careless programming by yours truly ;) the database was closed down when it shouldn't have been, so it simply wasn't open at the point, where the requery happened. Best regards, Mads On Thu, Jan 8, 2009 at 8:01 PM, Mads wrote: I have an Activty containing a ListView attached to a SimpleCursorAdapter. A longclick on one item in the ListView will make a context menu appear. I can update the ListView by doing a requery and then a notifyDataSetChanged, when the underlying cursor has changed, so everything works as expected there. :) My problem occurs, when I have longclicked an item, had the context menu in focus and then go back to the activity. Now, when I try to requery and do notifyDataSetChanged, the ListView doesn't update anymore. The log shows the following error message: invalid statement in fillwindow Looking at the code, I can see that it occurs somewhere in android_database_SQLiteQuery.cpp: static jint native_fill_window(JNIEnv* env, jobject object, jobject javaWindow, jint startPos, jint offsetParam) { // Code removed sqlite3_stmt * statement = GET_STATEMENT(env, object); // Code removed if (statement == NULL) { LOGE(Invalid statement in fillWindow()); jniThrowException(env, java/lang/IllegalStateException, Attempting to access a deactivated, closed, or empty cursor); return 0; } // etc etc.. I am not sure if that is where the problem actually occurs, but maybe someone has seen this before and perhaps explain how it can be that the cursor becomes deactivated, closed or empty when opening a context menu? Going to the home screen and back into the application isn't a problem. Best regards, Mads Kristiansen --~--~-~--~~~---~--~~ 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: DRAG AND DROP
Refer Launcher code in the source tree. -M On Jan 8, 8:13 am, kaushik.siso kaushik@gmail.com wrote: hi i want to know how can i enbale Drag and drop feature in android. suppose i have a image,which are to be dragged and dropped on another result and it will start a new activity. i seek your help to get a head-start atleast. regards k...@sis --~--~-~--~~~---~--~~ 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] Add open Wifi to preffered list.
Hi, I'm trying to add an open WifiConfiguration, but everytime I try to add one via my code the configuration either is WAP or WEP, I just want to create an open configuration. Does someone knows how to do this? This is a part of my code. WifiConfiguration THOMSON = new WifiConfiguration(); // THOMSON.BSSID = sr.BSSID; THOMSON.SSID = \TestConfig\; THOMSON.priority = 67; // sr. THOMSON.status = 1; BitSet allowedAuthAlgorithms = new BitSet(); // allowedAuthAlgorithms.set(0, 3, true); THOMSON.allowedAuthAlgorithms = allowedAuthAlgorithms; BitSet allowedGroupCiphers = new BitSet(); allowedGroupCiphers.set(0, 3, true); THOMSON.allowedGroupCiphers = allowedGroupCiphers; BitSet allowedKeyManagement = new BitSet(); allowedKeyManagement.set(0, true); THOMSON.allowedKeyManagement = allowedKeyManagement; BitSet allowedPairwiseCiphers = new BitSet(); allowedPairwiseCiphers.set(1, 2, true); THOMSON.allowedPairwiseCiphers = allowedPairwiseCiphers; BitSet allowedProtocols = new BitSet(); allowedProtocols.set(0, 1, true); THOMSON.allowedProtocols = allowedProtocols; THOMSON.preSharedKey = null; int THOMSONnetid = mainWifi.addNetwork(THOMSON); boolean THOMSONresult = mainWifi.enableNetwork(THOMSONnetid, true); mainText.setText(Adding Manual: + THOMSONnetid + result: + THOMSONresult + \n\nSaving: + mainWifi.saveConfiguration()); --~--~-~--~~~---~--~~ 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] Suggestions for Image Libraries to use on Android.
I'm looking to develop an application for which I need to do convolutions and the like on an image. I haven't done image processing in Java before however, and stumbled upon the Java Advanced Image api. The documentation for that however says that it isn't officially supported on chipsets other than those for which there is an optimized version which does not include the G1 or any phone processors that I'm aware of. It's also a 3 mb jar which seems a bit thick for bundling with something people will be downloading on their phone. Does anyone have suggestions for what to use? If I can be reasonably certain the JAI would work I'd be fine with using it, but is there a better option? Has anyone tried doing something similar yet? --~--~-~--~~~---~--~~ 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 when launch IM application on Cupcake...
Dear all, I tried to launch IM application on cupcake, but failed... :( From DDMS log I found Ignore bad IM frontdoor plugin... and load plugin failed, no plugin found! In cupcake build IM application seems have a new plugin mechanism for providers... Seems no IM Plugin Service available... Does anyone know how to use the pulgin mechanism or how to make IM working on cupcake? Thanks a lot. Dennis --~--~-~--~~~---~--~~ 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] invalid statement in fillwindow
I have an Activty containing a ListView attached to a SimpleCursorAdapter. A longclick on one item in the ListView will make a context menu appear. I can update the ListView by doing a requery and then a notifyDataSetChanged, when the underlying cursor has changed, so everything works as expected there. :) My problem occurs, when I have longclicked an item, had the context menu in focus and then go back to the activity. Now, when I try to requery and do notifyDataSetChanged, the ListView doesn't update anymore. The log shows the following error message: invalid statement in fillwindow Looking at the code, I can see that it occurs somewhere in android_database_SQLiteQuery.cpp: static jint native_fill_window(JNIEnv* env, jobject object, jobject javaWindow, jint startPos, jint offsetParam) { // Code removed sqlite3_stmt * statement = GET_STATEMENT(env, object); // Code removed if (statement == NULL) { LOGE(Invalid statement in fillWindow()); jniThrowException(env, java/lang/IllegalStateException, Attempting to access a deactivated, closed, or empty cursor); return 0; } // etc etc.. I am not sure if that is where the problem actually occurs, but maybe someone has seen this before and perhaps explain how it can be that the cursor becomes deactivated, closed or empty when opening a context menu? Going to the home screen and back into the application isn't a problem. Best regards, Mads Kristiansen --~--~-~--~~~---~--~~ 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: javax.net.ssl.SSLException: Not trusted server certificate
Here is the way to go.. I have solved the problem using the below method. See java.net.ssl.* documentation for better idea. 1. Create a class which implements HostnameVerifier and override the method verify() such a way it always returns true; 2. Create a class which implements X509TrustManager and override the following method getAcceptedIssuers() returns a empty array and remaining leave.. 3. Implement the method TrustAllHosts() which install all trusting hostnames HttpsURLConnection.setDefaultHostnameVerifier(yourhostnameverifier -- From step1 ) 4. Implement the method TrustAllCertificates() where do the following i. get an instance of Trustmanger -- From step2 ii. Get an SSLContext instalnce say SSLContext context = SSLContext.getInstance(TLS) - Ref API Documentation iii. init the context with your trustmanger got from (i) ( context.init(null,myTrustmangers, new SecureRandom()); iv. Set the SSLSocketFactory ( HttpsURLConnection.setDefaultSSLSocketFactory(context. getSocketFactory());) In your main code ( where you use URL) you can simply call TrustAllHosts() and TrustAllCertificates() and then do the URL fetching.. related stuff. Have a fun. Best regards, Bala On Jan 8, 3:51 pm, AnuR anura...@gmail.com wrote: I was not able to fix the error the error is still there. I tried to disable the cretificate verification using the code from :http://www.exampledepot.com/egs/javax.net.ssl/TrustAll.html? l=rel // Create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; // Install the all-trusting trust manager try { SSLContext sc = SSLContext.getInstance(SSL); sc.init(null, trustAllCerts, new java.security.SecureRandom ()); HttpsURLConnection.setDefaultSSLSocketFactory (sc.getSocketFactory()); } catch (Exception e) { } // Now you can access an https URL without having the certificate in the truststore try { URL url = new URL(https://hostname/index.html;); } catch (MalformedURLException e) { } and also tried to retrive the cretificate form the help available from the sitehttp://www.exampledepot.com/egs/javax.net.ssl/GetCert.html?l=rel try { // Create the client socket int port = 443; String hostname = hostname; SSLSocketFactory factory = HttpsURLConnection.getDefaultSSLSocketFactory(); SSLSocket socket = (SSLSocket)factory.createSocket(hostname, port); // Connect to the server socket.startHandshake(); // Retrieve the server's certificate chain java.security.cert.Certificate[] serverCerts = socket.getSession().getPeerCertificates(); // Close the socket socket.close(); } catch (SSLPeerUnverifiedException e) { } catch (IOException e) { } but noe of then helped me. please help to fix this issue... thanks and regards ANUR On Nov 21 2008, 1:30 am, Anders Rundgren anders.rundg...@telia.com wrote: Are you using a commercial SSL cert vendor like VeriSign. If not you need to either disable certficate validation or install the trust anchor of the SSL cert. I don't have the G1 som I only know how to do it on the emulator. It wasn't easy BTW since Android does not use the standard SUN format but a BouncyCastle variant. I did a converter since I have so many stores in SUN format:http://groups.google.com/group/android-developers/browse_thread/threa... Anders On Nov 20, 11:13 am, AnuR anura...@gmail.com wrote: Hi, While I am trying to post a web page using DefaultHttpClient httpclient = new DefaultHttpClient(); CookieStore cookies = httpclient.getCookieStore(); HttpPost Postmethod = new HttpPost(https://urltopost;);// Submiting I agree page ArrayListBasicNameValuePair nvpairs = new ArrayList(); vpairs.add(new BasicNameValuePair(name1, value1)); nvpairs.add(new BasicNameValuePair(name2, value2)); nvpairs.add(new BasicNameValuePair(name3, value3)); httpclient.setCookieStore(cookies); UrlEncodedFormEntity p_entityIAgree = new UrlEncodedFormEntity (nvpairs); Postmethod .setEntity(new UrlEncodedFormEntity(nvpairs, HTTP.UTF_8)); Postmethod .setEntity(p_entityIAgree); ResponseHandlerString IAgreeresponseHandler = new BasicResponseHandler(); String IAgreeSubmitresponseBody = httpclient.execute(Postmethod , IAgreeresponseHandler);
[android-developers] Re: Are you localizing an app? Do you want to be?
Thanks for this, but specifically thanks for the command that switches locale. On Jan 6, 8:19 am, Dan Morrill morri...@google.com wrote: We have been working on some documentation to help developers localize their applications, in anticipation of Android devices becoming available in more countries. (You might have seen some information on this via an email to Android Market developers, recently.) We bumped into a couple issues with the SDK tools, but rather than wait for the next release we wanted to get a draft version of this documentation out there, so developers can get started. I've placed the information here:https://groups.google.com/group/android-developers/web/localizing-and... That document is a work in progress, but it should get you started. Eventually, once we've tweaked the SDK tools and the text has gone through a more formal review, it will be promoted to the core documentation. Happy hacking! - Dan --~--~-~--~~~---~--~~ 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] Anatomy of receiving a call
Is there documentation available that details, or can someone tell me, the flow of an incoming phone call? I guess that would include the detection of an incoming call, how the RingToneManager is called, how it goes off-hook, etc. -- Brad Fuller --~--~-~--~~~---~--~~ 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] Is there a way to change the website entered on registration
Hello all I have not yet finished my registration pending this question is the website entered on developer registration important? And if so is it changeable upon completing the sign up? I cannot seem to go back and change it during my registration as google seems to have made the process rather one directional even after login out and back in. Thanks in advance, Pete --~--~-~--~~~---~--~~ 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] REST Web Services and Android
I gave a presentation about Web Services at the Android Dev Camp in Amsterdam yesterday. The slides are now available on SlideShare: http://www.slideshare.net/sullis/connecting-to-web-services-on-android/ Cheers, Sean --~--~-~--~~~---~--~~ 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] Design approach - Single/multiple service
Hi, I need to create an application which has got a mina controller module and 2-3 sub-modules which should run as seperate threads. The entire application needs to be run as a background service. The job of main controller module(main controller service) is to start/ stop other sub-modules and sends messages to these sub-modules. These sub-modules also share data among themselves. Note: There is no Activity . the main controller service will start after boot complete. I'm considering two options 1) Run each of these sub-modules as seperate service and each will create a new thread for its execution i.e main controller service will call startService() for each of the sub-modules which would inturn create a new thread for its execution. 2) Have a single controller service which creates 2-3 threads which corrsponds to the sub modules. Once main controller service is stopped I want to stop all other sub- modules. I prefer approach 2. In general, is there any design guidelines for building an android application which uses background services. Your comments are welcome Regards, Manoj --~--~-~--~~~---~--~~ 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: DRAG AND DROP
Hi Peli here i attach my code, to be added , i have ressolved the issue of double image by getting rawX() value of the event , and setting my absolute layout according to that. but here i get a unique problem, whenever i click the button and try to drag it, the mouse tip comes to a certain pixels above from the topleft corner of the button,like a offset distance,if you run the code on the emulator u wil find this problem. can anyone help to solve this? package com.google.android.samples.view.draganddrop; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.os.Bundle; import android.view.MotionEvent ; import android.view.View; import android.view.View.OnClickListener; import android.widget.AbsoluteLayout; import android.widget.Button; import android.widget.Toast; public class Drag_And_Drop extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); MyView tx = new MyView(this); tx.setText(Drag Me); AbsoluteLayout l = new AbsoluteLayout(this); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams( AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,10,10); l.addView(tx,p); setContentView(l); } class MyView extends Button { public MyView(Context c){ super(c); } @Override public boolean dispatchTouchEvent(MotionEvent event) { intmCurX=(int)event.getRawX(); int mCurY=(int)event.getRawY();; System.out.println(scrollx +this.getScrollX()); int action = event.getAction(); if ( action == MotionEvent.ACTION_MOVE ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams(AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,this.getScrollX()+ mCurX, this.getScrollY()+mCurY); this.setLayoutParams (p); } return true; } @Override public void draw(Canvas canvas) { // TODO Auto-generated method stub super.draw(canvas); } } } #main.xml# ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android; * android:orientation=*vertical * android:layout_width=*fill_parent * android:layout_height=*fill_parent * TextView android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:text=*@string/hello * / Button android:id=*@+id/button * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:text=*start transfer * / /LinearLayout regards Kaushik On Thu, Jan 8, 2009 at 11:23 PM, Dan Raaka micromys...@gmail.com wrote: Refer Launcher code in the source tree. -M On Jan 8, 8:13 am, kaushik.siso kaushik@gmail.com wrote: hi i want to know how can i enbale Drag and drop feature in android. suppose i have a image,which are to be dragged and dropped on another result and it will start a new activity. i seek your help to get a head-start atleast. regards k...@sis --~--~-~--~~~---~--~~ 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] Message Broadcast while talking on phone?
Hi all, Can anyone let me know which message is broadcast when call is on. It means when call is either dialled or received then is there any message is broadcast. Or can we use the constant CALL_STATE_OFFHOOK. Will this provide the required information. Looking forward for a quick reply. Regards Sunil --~--~-~--~~~---~--~~ 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: Restart application
You can automatically restart your closed app Activity after a few seconds using the OneShotAlarm approach described at http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/ using a scheduled app (re)launch. Regards On Jan 8, 2:39 pm, Evgeny V evgen...@gmail.com wrote: Hi All, Any ideas how to restart the app from itself? I'm trying following code but failed with null pointer exception. Where is my fault? public void Restart() { newIntent.setClassName(mypackage.name, MyMainClass); newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); app.startActivity(newIntent); finish();} Thanks On Tue, Jan 6, 2009 at 5:34 PM, goldfish courtingthegoldf...@gmail.comwrote: I need to restart my application after a user changes some preferences. I want to restart my application as if the user hit home and relaunched my application. Does anyone know how to do this? --~--~-~--~~~---~--~~ 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: Is there a SeekBar preference?
Hey Marc, I just want to thank you again (but don't wanna flood the list). I had no idea that preferences could be extended with new types so easily. Thanks again! Cheers, Stoyan On Fri, Jan 9, 2009 at 4:52 AM, Marc Lester Tan mail...@gmail.com wrote: Hi Stoyan, Yesterday I also asked myself if there's a Seekbar preference but I looked around and did not find any so I created my own. Here's my code if it will help you. public class SeekBarPreference extends DialogPreference{ private Context context; private SeekBar volumeLevel; public SeekBarPreference(Context context, AttributeSet attrs) { super(context, attrs); this.context = context; } protected void onPrepareDialogBuilder(Builder builder) { LinearLayout layout = new LinearLayout(context); layout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT)); layout.setMinimumWidth(400); layout.setPadding(20, 20, 20, 20); volumeLevel = new SeekBar(context); volumeLevel.setMax(8); volumeLevel.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); volumeLevel.setProgress(0); // You might want to fetch the value here from sharedpreferences layout.addView(volumeLevel); builder.setView(layout); super.onPrepareDialogBuilder(builder); } protected void onDialogClosed(boolean positiveResult) { if(positiveResult){ persistString(volumeLevel.getProgress()+); } } } then in your activity you can use this class: SeekBarPreference sb = new SeekBarPreference(this, null); sb.setTitle(R.string.volume); sb.setSummary(R.string.volume_summary); sb.setKey(VOLUME_LEVEL_PREF); -Marc On Fri, Jan 9, 2009 at 9:13 AM, Stoyan Damov stoyan.da...@gmail.com wrote: Hi guys, The emulator and G1's Settings apps apparently launches a preference activity. In Settings, Sound and Display, when you touch the Ringer volume setting, a dialog pops up, which shows a SeekBar. My question is how is this implemented because I need a similar (seek bar-driven) setting in my app. I don't have Android's source code and am hesitant to download 2.1G just to check :( I'm guess this setting does NOT launch an intent which pops up the dialog (because I'd expect that intent to be wrapped in PreferenceScreen and then I'd see the circled arrow indicator) but can't be sure. I know many people on the list are Google employees and am hoping I'll get an answer. Thanks in advance, Stoyan --~--~-~--~~~---~--~~ 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: No reply on market
Chris, there are several posts with these same questions: http://groups.google.com/group/android-developers/browse_thread/thread/60d2601d14bcfc1/ae5c4d0b35c9fa4b http://groups.google.com/group/android-developers/browse_thread/thread/f0dcbdbfdb1705e3/07946e86bd3d231b http://groups.google.com/group/android-developers/browse_thread/thread/50ad2fbbb075952e/b516df98fc700e63 --- sergi.ve...@gmail.com [In theory, theory and practice are the same. In practice, they are not.] On Thu, Jan 8, 2009 at 21:10, cfuch...@googlemail.com cfuch...@googlemail.com wrote: Hi, same Problem here... I ordered a phone some days ago but the order status is not being updated and no response on emails. But the credit card has alredy been charged... grml... Any experience how long it takes until a phone is being shipped? Cheers Chris On Jan 8, 6:31 pm, freeanderson freeander...@gmail.com wrote: Hello. About 10 days ago, I posted question to android market's 'support' about my order. But there was no reply until now. Is the market being operated normally? It doesn't make a sense. (Sorry for posting here.) 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: Post Bitmap over Http
On Fri, Jan 9, 2009 at 11:55 AM, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, I need to send a bitmap to a server. I've written some code, however, I got stuck on the part where I need to transform my bitmap into byte []. Here is my code: public void updateBitmap(Bitmap bm){ URL url = null; HttpURLConnection conn = null; try { url = new URL(http://www.myurl.com?;); } catch (MalformedURLException e) { e.printStackTrace(); } try { conn = (HttpURLConnection) url.openConnection (); } catch (IOException e) { e.printStackTrace(); } try { conn.setRequestMethod(POST); } catch (ProtocolException e) { e.printStackTrace(); } conn.setDoOutput(true); conn.setDoInput(true); conn.addRequestProperty(user_id, user.getUsername ()); conn.addRequestProperty(pass, user.getPassword()); conn.addRequestProperty(id, pinId); OutputStream os = null; try { os = conn.getOutputStream(); } catch (IOException e) { e.printStackTrace(); } // Encode bitmap and flush the os bm.compress(CompressFormat.PNG, 100, os); Note that PNG is lossless and will ignore the 2nd argument. Now, the API *could* have a helper method called save(CompressFormat, Stream) passing the max quality as a default 2nd parameter but that's another story... Cheers, Stoyan --~--~-~--~~~---~--~~ 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: auto generation of Android.mk file
You don't need one Android.mk per sub-directory. It's perfectly possible to use one top-level Android.mk that references all sources required for your project. just refer to them with their subpath, as in subdir/filename. and no, it's not possible to convert an arbitrary Makefile into an Android.mk (especially the bizarre convolutions used/generated with Automake). The good news is that writing an Android.mk file is not very difficult as long as you know which files you want to build. On Fri, Jan 9, 2009 at 7:29 AM, krish24 krish2...@gmail.com wrote: Hi Everyone, I am trying to port a package (library) in android. There are many subfolder in my library folder and each subfolder contains a makefile. I know that we have to write Android.mk file for building the package. Do we need to write the Andriod.mk file for each subfolder present in my library. Is there any way to generate Android.mk file from standard makefile? Regards, Krish --~--~-~--~~~---~--~~ 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: Concern about application file size for publishing due to Media files
AusR, Thanks a lot for your reply. The sound quality is very much important to me as entire charm of my application depends on those music files. But can anyone throw some light on storage limitation of android application? Friends, this question will be important to us much more when market will allow paid application. So please start a discussion on this. On Fri, Jan 9, 2009 at 1:10 PM, AusR austinjr...@gmail.com wrote: Hi, Are you sure the mp3s need to be of the quality and duration they are. For the purposes of a mobile handset application, for which the audio playback technology is not fixed they could be re-encoded with a lower bit-rate (or shortened) without too much loss in audible quality. this could reduce the file size significantly. (Just a suggestion) Aus. On Jan 9, 4:57 am, Mahesh Vaghela mah...@indianic.com wrote: Hi Friends, I want to develop an application which can play sound (.mp3) files. I am able to play this as I wish. But I am concern about the total file size of my application due to this mp3 files. I have total 6 mp3 files and total size of them becomes more than 30mb. This is very large when we talk for android. (For Iphone it's not a large one!) I have read that total allocated size for android application is just 128 or 256 MB only. a) Is this information right (Or we can use more than this)? b) What is the maximum application size google market allows for publishing an application? c) Is there any way by which we can put our mp3 files on some other place? Many thanks in advance. Mahesh Vaghela http://www.indianic.com -- Mahesh Vaghela http://www.indianic.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] Touch *extremely* expensive performance-wise
Hi guys, I'm developing a touch-controlled game and have noticed that when I touch the screen and don't lift my finger off it the game's frame rate drops in *half*. My touch-related code does nothing but record the touch event, that is, setting a few members of an object. No locking, no nothing. I've noticed that a long time ago and wasn't very concerned because even with this unreasonable frame drop the game plays at 25 fps and is still visually pleasing, but it doesn't look as good as when playing at full fps. I'm wondering if anyone knows (especially guys who have developed or are developing similar games) whether there's something I can do to make this performance problem go away. The only thing I've figured out so far is to disable the long press on the surface view (thinking that Android itself is making something funny if long press is requested) but it didn't make any difference. Thanks! Stoyan --~--~-~--~~~---~--~~ 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: DRAG AND DROP
what you have to do is, remember the coordinates that you get with the ACTION_DOWN event. Remember the distance (difference) between those coordinates and the original coordinates of your image (call that offsetX and offsetY), and subsequently in ACTION_MOVE always add those offset values. Peli On Jan 9, 11:36 am, kaushik sur kaushik@gmail.com wrote: Hi Peli here i attach my code, to be added , i have ressolved the issue of double image by getting rawX() value of the event , and setting my absolute layout according to that. but here i get a unique problem, whenever i click the button and try to drag it, the mouse tip comes to a certain pixels above from the topleft corner of the button,like a offset distance,if you run the code on the emulator u wil find this problem. can anyone help to solve this? package com.google.android.samples.view.draganddrop; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.os.Bundle; import android.view.MotionEvent ; import android.view.View; import android.view.View.OnClickListener; import android.widget.AbsoluteLayout; import android.widget.Button; import android.widget.Toast; public class Drag_And_Drop extends Activity { /** Called when the activity is first created. */ �...@override public void onCreate(Bundle icicle) { super.onCreate(icicle); MyView tx = new MyView(this); tx.setText(Drag Me); AbsoluteLayout l = new AbsoluteLayout(this); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams( AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,10,10); l.addView(tx,p); setContentView(l); } class MyView extends Button { public MyView(Context c){ super(c); } @Override public boolean dispatchTouchEvent(MotionEvent event) { int mCurX=(int)event.getRawX(); int mCurY=(int)event.getRawY();; System.out.println(scrollx +this.getScrollX()); int action = event.getAction(); if ( action == MotionEvent.ACTION_MOVE ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams(AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,this.getScrollX()+ mCurX, this.getScrollY()+mCurY); this.setLayoutParams (p); } return true; } @Override public void draw(Canvas canvas) { // TODO Auto-generated method stub super.draw(canvas); } } } #main.xml# ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android; * android:orientation=*vertical * android:layout_width=*fill_parent * android:layout_height=*fill_parent * TextView android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:text=*@string/hello * / Button android:id=*@+id/button * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:text=*start transfer * / /LinearLayout regards Kaushik On Thu, Jan 8, 2009 at 11:23 PM, Dan Raaka micromys...@gmail.com wrote: Refer Launcher code in the source tree. -M On Jan 8, 8:13 am, kaushik.siso kaushik@gmail.com wrote: hi i want to know how can i enbale Drag and drop feature in android. suppose i have a image,which are to be dragged and dropped on another result and it will start a new activity. i seek your help to get a head-start atleast. regards k...@sis --~--~-~--~~~---~--~~ 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 Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?
Indeed, for an advertising server, it makes more sense to include that in every application separately, for the reasons you mentioned. I could suggest the following: Obviously it is easier to work with multiple instances of the same intent through the PackageManager than it is to work with multiple instances of the same ContentProvider. The point is, you don't have to use a single ContentProvider at all, at least not directly. Have each application have its own content provider in their own namespace (e.g. in the namespace of the client, so there is never a name collision), and handle all the synchronization through intents. For example there could be a broadcast intent SEND_ACTIVE_CONTENT_PROVIDER_URI that you send to all installed applications that can receive this. The one application that has maintains the currently active content provider answers with a broadcast intent, and in the extra it contains the uri of the ContentProvider in use (e.g. content://com.some_client.whitemice.ads/). So all other applications can access that content provider subsequently. If no other application replies with an active content provider for 5 seconds (or 900 ms or whatever), then the current application can create the master content provider in its own namespace and subsequently answer to the SEND_ACTIVE_CONTENT_PROVIDER_URI with its own content provider uri (e.g. content://com.another_client.whitemice.ads/). (to add version information, include this in an extra CONTENT_PROVIDER_VERSION, so only applications answer that have an active content provider with the correct version). So there is never a collision of content provider name spaces, but only one of the content providers is active (and filled with information) at a time, and all applications can access that one content provider. Would this sound like a suitable solution? Peli www.openintents.org www.openintents.biz On Jan 9, 10:54 am, whitemice markbr...@zedray.co.uk wrote: Thanks everyone for the replies: Just to clarify: I am writing an advertising server component at the moment, but other projects that I have in the pipeline essentially have the same requirement. Dianne Hackborn - As far as naming issues, this is why you should use an authority in a namespace/domain you own, so that there will not be naming collisions. My application sits in its own namespace. I am only having conflicts with different copies of the same Content Provider Component being installed with different applications. Dianne Hackborn - …any client app that is relying on a component that is not part of the base platform needs to deal with the error cases if that component does not exist. If the component is not there, then the application would show an error on start and normally refuse to run. Result: Bad user experience. Peli - Hm, I think you end up with unnecessary code duplication if you include your component / content provider in every application. This isn’t an issue, as my component is delivered as a small Java class included with the main application. When activated, the component inflates in size as it downloads content over the internet. My goal is to manage this process by having only one component activated regardless of how many applications are installed on the device. Peli - I think it would be better if every application that wants to use your component shows a small dialog You need to install the following component... with a button that brings you to the download page of the Market for your component... Catching a missing component is easy enough. It’s just that what you describe adds up to a bad user experience: - No user will download a 3rd party advertising server (or any non- core functionality) just to run a game. - Installation is already a convoluted process and should only take place once. Additional APK installations require more downloading, application permission settings, button pressing, confusion, etc. - No client of mine will accept a solution that asks the user to jump through any additional hoops (e.g. even the Android Developer Challenge only permitted a single executable). Peli - At OpenIntents we try to resolve dependencies as late as possible - i.e. not at installation time, but the first time the user actually wants to use a particular feature (they may never use it in which case there is no need to install it). This doesn’t work for me as ad funded Applications generally require my component to be available on startup. Peli - I think in the long run Market should have better tools for resolving compulsory dependencies automatically, but for the moment I think this is a good compromise for developers and end users. I agree that this needs to be improved, as there is currently no support for components (downloading, versioning, upgrading, etc) in Android or on the Android Market. Hence I am trying to get around this issue by “managing” a Content
[android-developers] Re: Concern about application file size for publishing due to Media files
This question has been raised quite a few times here and on the web and not ONCE I've seen a definitive answer from a Google employee on the question what's the maximum .apk size which will install on an Android device with sufficient memory. The regular answers have always been along the make your app smaller, the device's memory is shared (well you should have thought about that before releasing Android and making it possible to launch apps from the SD card, right?), re-encode your .mp3s, etc. I guess the only way to be sure is to start adding files to your project, building the .apk and checking whether it would install (that's what I'm planning to do anyway). Re .mp3s, you surely can't expect the device to play a 48KHz .mp3 w/ a 320kbps bitrate so you can safely drop the quality to say 32KHz @ 128kbps and the user wouldn't notice it for sure. On Fri, Jan 9, 2009 at 2:35 PM, Mahesh Vaghela mah...@indianic.com wrote: AusR, Thanks a lot for your reply. The sound quality is very much important to me as entire charm of my application depends on those music files. But can anyone throw some light on storage limitation of android application? Friends, this question will be important to us much more when market will allow paid application. So please start a discussion on this. On Fri, Jan 9, 2009 at 1:10 PM, AusR austinjr...@gmail.com wrote: Hi, Are you sure the mp3s need to be of the quality and duration they are. For the purposes of a mobile handset application, for which the audio playback technology is not fixed they could be re-encoded with a lower bit-rate (or shortened) without too much loss in audible quality. this could reduce the file size significantly. (Just a suggestion) Aus. On Jan 9, 4:57 am, Mahesh Vaghela mah...@indianic.com wrote: Hi Friends, I want to develop an application which can play sound (.mp3) files. I am able to play this as I wish. But I am concern about the total file size of my application due to this mp3 files. I have total 6 mp3 files and total size of them becomes more than 30mb. This is very large when we talk for android. (For Iphone it's not a large one!) I have read that total allocated size for android application is just 128 or 256 MB only. a) Is this information right (Or we can use more than this)? b) What is the maximum application size google market allows for publishing an application? c) Is there any way by which we can put our mp3 files on some other place? Many thanks in advance. Mahesh Vaghela http://www.indianic.com -- Mahesh Vaghela http://www.indianic.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: Android Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?
whitemice wrote: My application sits in its own namespace. I am only having conflicts with different copies of the same Content Provider Component being installed with different applications. Don't use a ContentProvider. This isn’t an issue, as my component is delivered as a small Java class included with the main application. When activated, the component inflates in size as it downloads content over the internet. My goal is to manage this process by having only one component activated regardless of how many applications are installed on the device. Since the content in question is going on /sdcard (right? right?!?), solve the problem by managing the space, not managing the components. Since you already require each application to have your own code anyway, just use a regular Java class to access the /sdcard data store and dump the ContentProvider interface. I agree that this needs to be improved, as there is currently no support for components (downloading, versioning, upgrading, etc) in Android or on the Android Market. I'm in total agreement on that point! -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: Concern about application file size for publishing due to Media files
Mahesh Vaghela wrote: But I am concern about the total file size of my application due to this mp3 files. I have total 6 mp3 files and total size of them becomes more than 30mb. Don't bundle the MP3 files in your APK. Instead, have your application download the MP3 files to /sdcard when first run. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: Concern about application file size for publishing due to Media files
Another possibility also mentioned elsewhere is to not include mp3 files in the apk, but store them on a server. Your application downloads the mp3 files the first time it is launched, and saves them on the SD card. Then there is not much internal memory used, and you can still have a lot of data for your application. A sample application that demonstrates how to do it is available here: http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Samples/Downloader See also the readme: http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/Downloader/README.txt Peli www.openintents.org www.openintents.biz On Jan 9, 1:55 pm, Stoyan Damov stoyan.da...@gmail.com wrote: This question has been raised quite a few times here and on the web and not ONCE I've seen a definitive answer from a Google employee on the question what's the maximum .apk size which will install on an Android device with sufficient memory. The regular answers have always been along the make your app smaller, the device's memory is shared (well you should have thought about that before releasing Android and making it possible to launch apps from the SD card, right?), re-encode your .mp3s, etc. I guess the only way to be sure is to start adding files to your project, building the .apk and checking whether it would install (that's what I'm planning to do anyway). Re .mp3s, you surely can't expect the device to play a 48KHz .mp3 w/ a 320kbps bitrate so you can safely drop the quality to say 32KHz @ 128kbps and the user wouldn't notice it for sure. On Fri, Jan 9, 2009 at 2:35 PM, Mahesh Vaghela mah...@indianic.com wrote: AusR, Thanks a lot for your reply. The sound quality is very much important to me as entire charm of my application depends on those music files. But can anyone throw some light on storage limitation of android application? Friends, this question will be important to us much more when market will allow paid application. So please start a discussion on this. On Fri, Jan 9, 2009 at 1:10 PM, AusR austinjr...@gmail.com wrote: Hi, Are you sure the mp3s need to be of the quality and duration they are. For the purposes of a mobile handset application, for which the audio playback technology is not fixed they could be re-encoded with a lower bit-rate (or shortened) without too much loss in audible quality. this could reduce the file size significantly. (Just a suggestion) Aus. On Jan 9, 4:57 am, Mahesh Vaghela mah...@indianic.com wrote: Hi Friends, I want to develop an application which can play sound (.mp3) files. I am able to play this as I wish. But I am concern about the total file size of my application due to this mp3 files. I have total 6 mp3 files and total size of them becomes more than 30mb. This is very large when we talk for android. (For Iphone it's not a large one!) I have read that total allocated size for android application is just 128 or 256 MB only. a) Is this information right (Or we can use more than this)? b) What is the maximum application size google market allows for publishing an application? c) Is there any way by which we can put our mp3 files on some other place? Many thanks in advance. Mahesh Vaghela http://www.indianic.com -- Mahesh Vaghela http://www.indianic.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: Post Bitmap over Http
Hi, I added the following code, however, I got an OutOfMemoryError. It comes from the bos.flush() line... Am I doing it wrong? I BufferedOutputStream bos = new BufferedOutputStream(os); bm.compress(CompressFormat.JPEG, 100, bos); try { bos.flush(); bos.close(); os.close(); } catch (IOException e) { e.printStackTrace(); } conn.disconnect(); Thank you! bm.compress(CompressFormat.PNG, 100, os); Note that PNG is lossless and will ignore the 2nd argument. Now, the API *could* have a helper method called save(CompressFormat, Stream) passing the max quality as a default 2nd parameter but that's another story... Cheers, Stoyan --~--~-~--~~~---~--~~ 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 media api's relation to PVMF api's
There are several documents shared in Opencore git repository. http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree;f=doc;h=ef64867e9bc507fd9d4965bee74be363d2548646;hb=84e4f93158e7ad325118aca385a2c6153e5c8954 On Fri, Jan 9, 2009 at 9:13 PM, vishy s vishy.s1...@gmail.com wrote: Dave, Thank you very much for the information. I also would like to know how to integrate components like OpenMAX compliant codecs, parsers, protocols.. Is there any document or link that can guide me? Thanks and regards, -Vishwa On Jan 9, 8:56 am, Dave Sparks davidspa...@android.com wrote: MediaPlayer is a high level abstraction for OpenCore. There are no immediate plans to expose any of OpenCore's lower level API's to Java. On Jan 8, 1:43 am, vishy s vishy.s1...@gmail.com wrote: Hi folks, I am trying find the relation between android media api's available ( http://code.google.com/android/reference/android/media/MediaPlayer.html) for android applications and the PVMF api's which are available as a part of openCORE. Some of the API's are differing. How are these linked internally? Is there an interface class or headerfile that we can see? I ran around the net but failed failed to find one such doc that explains this Thanks in advance !!! -Vishwa- 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: Android media api's relation to PVMF api's
Dave, Thank you very much for the information. I also would like to know how to integrate components like OpenMAX compliant codecs, parsers, protocols.. Is there any document or link that can guide me? Thanks and regards, -Vishwa On Jan 9, 8:56 am, Dave Sparks davidspa...@android.com wrote: MediaPlayer is a high level abstraction for OpenCore. There are no immediate plans to expose any of OpenCore's lower level API's to Java. On Jan 8, 1:43 am, vishy s vishy.s1...@gmail.com wrote: Hi folks, I am trying find the relation between android media api's available (http://code.google.com/android/reference/android/media/MediaPlayer.html) for android applications and the PVMF api's which are available as a part of openCORE. Some of the API's are differing. How are these linked internally? Is there an interface class or headerfile that we can see? I ran around the net but failed failed to find one such doc that explains this Thanks in advance !!! -Vishwa- 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: How to register a ContentProvider
I think I have exactly the same probleme... The Androidmanifest file shows : provider android:name=.MyProvider android:authorities=com.myPackage.provider.MyClass / (MyProvider exetends ContentProvider) but the onCreate() methode of MyProvider is never called so my database is never created... Is there something I forgot... ? I've also followed the example from the notePad project. On 8 jan, 14:55, Inderjeet Singh inder...@gmail.com wrote: Thanks, that helps. How do I find out what all content providers are registered and who has ability to access them? Thanks Inder On Wed, Jan 7, 2009 at 9:50 AM, Dianne Hackborn hack...@android.com wrote: It is backwards, android:name is the class name (like all of the other manifest components). The android:authorities is one or more URI authorities for the name of your content provider... which means it should NOT be anything like com.google.* since that namespace is owned by Google. --~--~-~--~~~---~--~~ 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 Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?
Since the content in question is going on /sdcard (right? right?!?), Ad images and banners should be placed on the SD card, but private data for accounting (number of times an ad had been shown, click- through-rate, last ad shown, etc.) could be stored in a content provider, and it makes sense to share this content provider among several applications installed (e.g. so that the end user is not presented the same ad in every application they launch). Peli --~--~-~--~~~---~--~~ 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] Anybody uses Positron on Windows?
Hi, Does someone uses Positron on Windows for Android automated testing? If so, could you, please, refer me to the setup instructions? I've tried many and always fail. 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: use camera in portrait mode
For what little help it is, I tried failed to do this, and logged it as a bug: http://code.google.com/p/android/issues/detail?id=1193 Richard On Jan 9, 11:20 am, Christian Wiesbauer christian.wiesba...@bdc.at wrote: Hi, is it possible to use the camera of the G1 in portrait mode? Maybe there is a trick like rotate the SurfaceView degrees? Thanks, Christian Wiesbauer --~--~-~--~~~---~--~~ 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 adding open AP to preferred ap-list.
Hi, I'm trying to add an open WifiConfiguration, but everytime I try to add one via my code the configuration either is WAP or WEP, I just want to create an open configuration. Does someone knows how to do this? This is a part of my code: WifiConfiguration THOMSON = new WifiConfiguration(); // THOMSON.BSSID = sr.BSSID; THOMSON.SSID = \TestConfig\; THOMSON.priority = 67; // sr. THOMSON.status = 1; BitSet allowedAuthAlgorithms = new BitSet(); // allowedAuthAlgorithms.set(0, 3, true); THOMSON.allowedAuthAlgorithms = allowedAuthAlgorithms; BitSet allowedGroupCiphers = new BitSet(); allowedGroupCiphers.set(0, 3, true); THOMSON.allowedGroupCiphers = allowedGroupCiphers; BitSet allowedKeyManagement = new BitSet(); allowedKeyManagement.set(0, true); THOMSON.allowedKeyManagement = allowedKeyManagement; BitSet allowedPairwiseCiphers = new BitSet(); allowedPairwiseCiphers.set(1, 2, true); THOMSON.allowedPairwiseCiphers = allowedPairwiseCiphers; BitSet allowedProtocols = new BitSet(); allowedProtocols.set(0, 1, true); THOMSON.allowedProtocols = allowedProtocols; THOMSON.preSharedKey = null; int THOMSONnetid = mainWifi.addNetwork(THOMSON); boolean THOMSONresult = mainWifi.enableNetwork(THOMSONnetid, true); mainText.setText(Adding Manual: + THOMSONnetid + result: + THOMSONresult + \n\nSaving: + mainWifi.saveConfiguration()); --~--~-~--~~~---~--~~ 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: DRAG AND DROP
hi Can you please illustrate the scenarios of the constants ACTION_MOVE,ACTION_DOWN,ACTION_UP ? regards Kaushik On Fri, Jan 9, 2009 at 6:22 PM, Peli peli0...@googlemail.com wrote: what you have to do is, remember the coordinates that you get with the ACTION_DOWN event. Remember the distance (difference) between those coordinates and the original coordinates of your image (call that offsetX and offsetY), and subsequently in ACTION_MOVE always add those offset values. Peli On Jan 9, 11:36 am, kaushik sur kaushik@gmail.com wrote: Hi Peli here i attach my code, to be added , i have ressolved the issue of double image by getting rawX() value of the event , and setting my absolute layout according to that. but here i get a unique problem, whenever i click the button and try to drag it, the mouse tip comes to a certain pixels above from the topleft corner of the button,like a offset distance,if you run the code on the emulator u wil find this problem. can anyone help to solve this? package com.google.android.samples.view.draganddrop; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.os.Bundle; import android.view.MotionEvent ; import android.view.View; import android.view.View.OnClickListener; import android.widget.AbsoluteLayout; import android.widget.Button; import android.widget.Toast; public class Drag_And_Drop extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); MyView tx = new MyView(this); tx.setText(Drag Me); AbsoluteLayout l = new AbsoluteLayout(this); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams( AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,10,10); l.addView(tx,p); setContentView(l); } class MyView extends Button { public MyView(Context c){ super(c); } @Override public boolean dispatchTouchEvent(MotionEvent event) { intmCurX=(int)event.getRawX(); int mCurY=(int)event.getRawY();; System.out.println(scrollx +this.getScrollX()); int action = event.getAction(); if ( action == MotionEvent.ACTION_MOVE ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams(AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,this.getScrollX()+ mCurX, this.getScrollY()+mCurY); this.setLayoutParams (p); } return true; } @Override public void draw(Canvas canvas) { // TODO Auto-generated method stub super.draw(canvas); } } } #main.xml# ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android * android:orientation=*vertical * android:layout_width=*fill_parent * android:layout_height=*fill_parent * TextView android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:text=*@string/hello * / Button android:id=*@+id/button * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:text=*start transfer * / /LinearLayout regards Kaushik On Thu, Jan 8, 2009 at 11:23 PM, Dan Raaka micromys...@gmail.com wrote: Refer Launcher code in the source tree. -M On Jan 8, 8:13 am, kaushik.siso kaushik@gmail.com wrote: hi i want to know how can i enbale Drag and drop feature in android. suppose i have a image,which are to be dragged and dropped on another result and it will start a new activity. i seek your help to get a head-start atleast. regards k...@sis --~--~-~--~~~---~--~~ 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 Custom Horizontal Scroll?
Hey Roland, yeah I did try doing super(ev) as the code above: @Override public boolean dispatchTouchEvent(MotionEvent ev){ dispatchTouchEvent.super(ev); mGestureDetector.onTouchEvent(ev); return true; } This would allow me to scroll down but definitely messes things up. I think there are too many touch event listeners that overwrite eachother giving a shaking effect on scrolling. I tried different things to solve this issue in my case with my menubar layout and it just seems that any listeners on the clickable area will give this effect. I tried many ways but as of now no luck. I think the next thing I will try would be to disable all button listeners on a gesture event and after the gesture re-enable them? If this doesn't work I'm out of ideas. Any input on this? --~--~-~--~~~---~--~~ 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: Anybody uses Positron on Windows?
You can refer to below link: http://code.google.com/p/autoandroid/wiki/Positron On Fri, Jan 9, 2009 at 9:35 PM, hmmm akul...@mail.ru wrote: Hi, Does someone uses Positron on Windows for Android automated testing? If so, could you, please, refer me to the setup instructions? I've tried many and always fail. 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: How To Custom Horizontal Scroll?
Hi, Moto. I would say good luck. Waiting for your good news. On 9 jan, 14:54, Moto medicalsou...@gmail.com wrote: Hey Roland, yeah I did try doing super(ev) as the code above: �...@override public boolean dispatchTouchEvent(MotionEvent ev){ dispatchTouchEvent.super(ev); mGestureDetector.onTouchEvent(ev); return true; } This would allow me to scroll down but definitely messes things up. I think there are too many touch event listeners that overwrite eachother giving a shaking effect on scrolling. I tried different things to solve this issue in my case with my menubar layout and it just seems that any listeners on the clickable area will give this effect. I tried many ways but as of now no luck. I think the next thing I will try would be to disable all button listeners on a gesture event and after the gesture re-enable them? If this doesn't work I'm out of ideas. Any input on this? --~--~-~--~~~---~--~~ 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] JMI and android
Hi guys! A simple question: Is JMI supported by Android? Regards --~--~-~--~~~---~--~~ 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: WebView loadUrl using Post Method
I have written an Service that uses commons http client for receiving content from the web. I call it by using the aidl defined binderInterface: mHTTPService.doRequest(mmiEvent.getContentUrl(), HTTPRequest.HTTP_METHOD_POST, gui=+mmiEvent.getData()); The last parameter what i want to send as requestParameter There is a callback registered that my service pushs the received content back to. To display the content I use a handler where within I do: mWebView.loadDataWithBaseURL(BASE_URL,(String)msg.obj, text/html, utf-8,FAIL_URL); And.. my POST requested Webpage is displayed! On 7 Jan., 17:06, Jakob Sachse jako...@gmail.com wrote: i think the second approach is the way to go here: looking at the docs i found : public void loadData(String data, String mimeType, String encoding) , which will most likely take my markup as first parameter. i'll see and keep this thread updated. On 7 Jan., 16:54, Jakob Sachse jako...@gmail.com wrote: or could i possibly load the content outside thewebviewby using commons http client, and let the returned markup be rendered by thewebview? On 7 Jan., 16:51, Jakob Sachse jako...@gmail.com wrote: hey, is there a way of loading an URL with thePOSTMethod instead of GET? I have a very long xml String that I need to deliver to a .JSP , GET Parameters don't allow the needed parameter length. I am looking for something like: mWebView.loadUrl(http://foo.bar/my.jsp,POST,params); --~--~-~--~~~---~--~~ 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: Post Bitmap over Http
You might want to actually compress that JPG by passing a value less than 100. Try saving the image on your SD card, check what compression gives you a reasonable size and then set that compression and check w/ the network code. Also, you probably won't get that much benefit with buffering the output because the network is not that fast, unless you're on 3G, so either set an explicit buffer size or remove the buffering altogether. On Fri, Jan 9, 2009 at 3:18 PM, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, I added the following code, however, I got an OutOfMemoryError. It comes from the bos.flush() line... Am I doing it wrong? I BufferedOutputStream bos = new BufferedOutputStream(os); bm.compress(CompressFormat.JPEG, 100, bos); try { bos.flush(); bos.close(); os.close(); } catch (IOException e) { e.printStackTrace(); } conn.disconnect(); Thank you! bm.compress(CompressFormat.PNG, 100, os); Note that PNG is lossless and will ignore the 2nd argument. Now, the API *could* have a helper method called save(CompressFormat, Stream) passing the max quality as a default 2nd parameter but that's another story... Cheers, Stoyan --~--~-~--~~~---~--~~ 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: DRAG AND DROP
Introduce new member variables of your class: int mOffsetX; int mOffsetY; Then below you do something like: if ( action == MotionEvent.ACTION_DOWN ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); mOffsetX = mCurX - 10; // 10 was the initial coordinate mOffsetY = mCurY - 10; } else if ( action == MotionEvent.ACTION_MOVE ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams (AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,this.getScrollX()+ mCurX + mOffsetX, this.getScrollY()+mCurY + mOffsetY); Here you add the offset values. this.setLayoutParams (p); } I hope this helps as a pointer. Note that after you placed the object to a new position, you have to remember the new coordinates (instead of (10,10) where you started originally). ACTION_DOWN is called when you click the mouse button, ACTION_MOVE is called while you click and drag, and ACTION_UP is called when you release the mouse button. Replace mouse by finger on the actual device :-) I hope this is what you meant. Peli www.openintents.org On Jan 9, 2:46 pm, kaushik sur kaushik@gmail.com wrote: hi Can you please illustrate the scenarios of the constants ACTION_MOVE,ACTION_DOWN,ACTION_UP ? regards Kaushik On Fri, Jan 9, 2009 at 6:22 PM, Peli peli0...@googlemail.com wrote: what you have to do is, remember the coordinates that you get with the ACTION_DOWN event. Remember the distance (difference) between those coordinates and the original coordinates of your image (call that offsetX and offsetY), and subsequently in ACTION_MOVE always add those offset values. Peli On Jan 9, 11:36 am, kaushik sur kaushik@gmail.com wrote: Hi Peli here i attach my code, to be added , i have ressolved the issue of double image by getting rawX() value of the event , and setting my absolute layout according to that. but here i get a unique problem, whenever i click the button and try to drag it, the mouse tip comes to a certain pixels above from the topleft corner of the button,like a offset distance,if you run the code on the emulator u wil find this problem. can anyone help to solve this? package com.google.android.samples.view.draganddrop; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.os.Bundle; import android.view.MotionEvent ; import android.view.View; import android.view.View.OnClickListener; import android.widget.AbsoluteLayout; import android.widget.Button; import android.widget.Toast; public class Drag_And_Drop extends Activity { /** Called when the activity is first created. */ �...@override public void onCreate(Bundle icicle) { super.onCreate(icicle); MyView tx = new MyView(this); tx.setText(Drag Me); AbsoluteLayout l = new AbsoluteLayout(this); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams( AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,10,10); l.addView(tx,p); setContentView(l); } class MyView extends Button { public MyView(Context c){ super(c); } @Override public boolean dispatchTouchEvent(MotionEvent event) { int mCurX=(int)event.getRawX(); int mCurY=(int)event.getRawY();; System.out.println(scrollx +this.getScrollX()); int action = event.getAction(); if ( action == MotionEvent.ACTION_MOVE ) { System.out.println(X=+mCurX+ y=+mCurY); this.setText(x: + mCurX + ,y: + mCurY ); AbsoluteLayout.LayoutParams p = new AbsoluteLayout.LayoutParams(AbsoluteLayout.LayoutParams.WRAP_CONTENT, AbsoluteLayout.LayoutParams.WRAP_CONTENT,this.getScrollX()+ mCurX, this.getScrollY()+mCurY); this.setLayoutParams (p); } return true; } @Override public void draw(Canvas canvas) { // TODO Auto-generated method stub super.draw(canvas); } } } #main.xml# ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android * android:orientation=*vertical * android:layout_width=*fill_parent * android:layout_height=*fill_parent * TextView android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:text=*@string/hello * / Button android:id=*@+id/button * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:text=*start transfer * / /LinearLayout regards Kaushik On Thu, Jan 8, 2009 at 11:23 PM, Dan Raaka micromys...@gmail.com wrote: Refer Launcher code in the source tree. -M
[android-developers] Re: Any graphing frameworks/APIs available?
I haven't tried this, but you might want to look at Open Flash Charts ( http://teethgrinder.co.uk/open-flash-chart/). I've used their 1.0 version in PHP and was pretty happy with it. On Thu, Jan 8, 2009 at 11:39 AM, dmyung dmy...@dimagi.com wrote: With android removing the Swing and AWT libraries from Java, I was wondering what solutions have been developed to display simple bar histograms, line graphs and other simple data visualizations charts in Android? Have any graphing libraries adapted or developed to make simple line, bar and histograms for the community? -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.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: what want defineClass(...) ?!
but in some cases this is not an option. i.e I want to run Rhino on Andorid, which goes well for the interpreter mode, but not in compilation mode since it produces bytecode. On 28 Nov. 2008, 19:46, Ralf ralfo...@gmail.com wrote: You can't. Simply package your java .class in your project and ant/eclipse willconvertit when building your app. R/ On Fri, Nov 28, 2008 at 7:13 AM, HotHeart korshakov.ste...@gmail.com wrote: Hi, I read some topics and founded that defineClass fails if use java bytecode. But how toconvertJava Byte-code to DalvikByteCodeonruntime? 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: what want defineClass(...) ?!
Jakob Sachse wrote: but in some cases this is not an option. i.e I want to run Rhino on Andorid, which goes well for the interpreter mode, but not in compilation mode since it produces bytecode. Which gets back to Ralf's original point: You can't. AFAIK, dynamic languages that generate Java VM bytecode will need to be augmented to generate Dalvik VM bytecode. Or, use interpreters that do not generate bytecode (e.g., beanshell). -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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 Bug/Architectural Issue: How do I handle multiple versions of my own Content Provider?
Peli - Indeed, for an advertising server, it makes more sense to include that in every application separately, for the reasons you mentioned. I could suggest the following…and all applications can access that one content provider. Would this sound like a suitable solution? I didn’t think of just doing the synchronisation using intents (as they support a one-to-many relationship between components). I’ll do a proof of concept on Monday to see if this works. It’ll be a bit of a hassle for the guy who has to incorporate this into their application, but it will do until Android is improved to support components. ;-) Thank you kindly!! Mark Murphy - Since the content in question is going on /sdcard (right? right?!?), solve the problem by managing the space, not managing the components. Since you already require each application to have your own code anyway, just use a regular Java class to access the /sdcard data store and dump the ContentProvider interface. Peli - Ad images and banners should be placed on the SD card, but private data for accounting (number of times an ad had been shown, click- through-rate, last ad shown, etc.) could be stored in a content provider, and it makes sense to share this content provider among several applications installed (e.g. so that the end user is not presented the same ad in every application they launch). While Mark Murphy’s solution could be made to work, communicating outside of the OS would be quite ugly in terms of the security and the hardware assumptions which would need to be made. I also expect the security regime and file permissions to morph somewhat over the next couple of Android releases, potentially breaking my OS bypass hack. I’ll put this idea down as a plan B, thanks anyway!! I think I have enough ideas to get this to work now, and will post my results to the thread and blog early next week. Thank you Android Developers. :-D Mark --~--~-~--~~~---~--~~ 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: Concern about application file size for publishing due to Media files
Stoyan Damov wrote: Re .mp3s, you surely can't expect the device to play a 48KHz .mp3 w/ a 320kbps bitrate so you can safely drop the quality to say 32KHz @ 128kbps and the user wouldn't notice it for sure. What is the audio limitations of the android platform/G1? How do you know that 32KHz/128kbps is the best quality that can be heard? I'm not trying to be a jerk, but I would like to know the best audio quality from android played through a good set of ear buds or headphones. File size is critical as well, so this is very important information to get correct. 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: Concern about application file size for publishing due to Media files
On Fri, Jan 9, 2009 at 5:08 PM, madcoder paperga...@gmail.com wrote: Stoyan Damov wrote: Re .mp3s, you surely can't expect the device to play a 48KHz .mp3 w/ a 320kbps bitrate so you can safely drop the quality to say 32KHz @ 128kbps and the user wouldn't notice it for sure. What is the audio limitations of the android platform/G1? How do you know that 32KHz/128kbps is the best quality that can be heard? These numbers can be found if you google around for best/sufficient bitrate for phones. I can assure you that on my G1 I can barely make any difference (w/o the headset) between an insane quality (48KHz/320 kbps) mp3 and a 22Khz/96kbps one. I'm not trying to be a jerk, but I would like to know the best audio quality from android played through a good set of ear buds or headphones. File size is critical as well, so this is very important information to get correct. 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: Anybody uses Positron on Windows?
Yep, I guess, I did and even downloaded positron-enabled notepad. Only it says to me when I attempt to run the tests 'don't know how to run tool on windows platform'. Did these exact instructions work for you? Thanks! - Original Message - From: freepine To: android-developers@googlegroups.com Sent: Friday, January 09, 2009 5:01 PM Subject: [android-developers] Re: Anybody uses Positron on Windows? You can refer to below link: http://code.google.com/p/autoandroid/wiki/Positron On Fri, Jan 9, 2009 at 9:35 PM, hmmm akul...@mail.ru wrote: Hi, Does someone uses Positron on Windows for Android automated testing? If so, could you, please, refer me to the setup instructions? I've tried many and always fail. 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: Touch *extremely* expensive performance-wise
OK, I measured how many moves per sec the view gets when I hold my finger as still as possible. The result is surprising (I expected more and was hoping that's the reason for the slow down) and is about 70 moves/second. I still don't get why the view gets 70 moves/sec if I'm not moving my finger at all :( Can anyone shed some light on why touching the device's screen and holding the finger on it will decrease the speed of my app as much as *twice*? Thanks! On Fri, Jan 9, 2009 at 2:40 PM, Stoyan Damov stoyan.da...@gmail.com wrote: Hi guys, I'm developing a touch-controlled game and have noticed that when I touch the screen and don't lift my finger off it the game's frame rate drops in *half*. My touch-related code does nothing but record the touch event, that is, setting a few members of an object. No locking, no nothing. I've noticed that a long time ago and wasn't very concerned because even with this unreasonable frame drop the game plays at 25 fps and is still visually pleasing, but it doesn't look as good as when playing at full fps. I'm wondering if anyone knows (especially guys who have developed or are developing similar games) whether there's something I can do to make this performance problem go away. The only thing I've figured out so far is to disable the long press on the surface view (thinking that Android itself is making something funny if long press is requested) but it didn't make any difference. Thanks! Stoyan --~--~-~--~~~---~--~~ 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: XML Layout Ordering Problem
Try to change the height of the LinearLayout from fill_parent to wrap_content. This didn't work. I tinkered with both the LinearLayout parameters and ScrollView but haven't found the solution. Thanks for the quick response!! --~--~-~--~~~---~--~~ 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] Licensing/Protecting apps
We've made an application licensing system available which will allow you to lock your apps down to a device, phone number, or expire on a date. It's currently free to use for anyone and we'd appreciate any feedback developers have to give. More details are at http://localhost/AndroidPhoneApplications/licensing.jsp Al. http://andappstore.com/ -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ 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: Licensing/Protecting apps
Al Sutton wrote: We've made an application licensing system available which will allow you to lock your apps down to a device, phone number, or expire on a date. It's currently free to use for anyone and we'd appreciate any feedback developers have to give. More details are at http://localhost/AndroidPhoneApplications/licensing.jsp This too is a localhost URL. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: Licensing/Protecting apps
Maybe the live URL would be useful... http://andappstore.com/AndroidPhoneApplications/licensing.jsp :) Al. Al Sutton wrote: We've made an application licensing system available which will allow you to lock your apps down to a device, phone number, or expire on a date. It's currently free to use for anyone and we'd appreciate any feedback developers have to give. More details are at http://localhost/AndroidPhoneApplications/licensing.jsp Al. http://andappstore.com/ -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ 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: long home key press / task switcher
Found it finally http://android.git.kernel.org/?p=platform/frameworks/policies/base.git;a=blob_plain;f=phone/com/android/internal/policy/impl/RecentApplicationsDialog.java;hb=HEAD -M On Jan 8, 4:55 pm, Dan Raaka micromys...@gmail.com wrote: When one holds the home key for long key press, it invokes a notification dialog box with a list of recent applications. Is there a reason to limit that list to 6 ?? Where in the git repository can I find related to this long key homepress invoking the task switcher ? -M --~--~-~--~~~---~--~~ 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: REST Web Services and Android
Thanks for the slides!! Do you know of any current resources for accessing web API's (examples, explanations, etc.)? The android implementation has undergone some changes and most resources I have found do not work any longer. Also, I am not familiar with Web protocol, so documentation is unclear both on the android and apache sites. Evertime I execute this code: HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpGet get_request = new HttpGet(URI); HttpResponse response = httpClient.execute(get_request, localContext); It throws a Socket Exception on the last line. Any ideas why?? --~--~-~--~~~---~--~~ 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: XML Layout Ordering Problem
The height of ScrollView should be fill_parent, and the height of LinearLayout should be wrap_content. Does this work? If not, try to rebuild your project in Eclipse (sometimes changes in xml files are not immediately updated). Peli PS: What is woot? On Jan 9, 5:21 pm, Jamie jamie.hu...@gmail.com wrote: Try to change the height of the LinearLayout from fill_parent to wrap_content. This didn't work. I tinkered with both the LinearLayout parameters and ScrollView but haven't found the solution. Thanks for the quick response!! --~--~-~--~~~---~--~~ 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] ScrollView initialization - bug or stupidity?
On the G1. I have a pre-rotated activity (via android:screenOrientation=portrait). It contains a ScrollView with a linear layout child. The XML sets scrollX=0dip and scrollY=0dip (although I assume this is the default anyway). I launch this activity via a button in another activity. If I press the button with my finger, the activity with the ScrollView comes up as expected, scrolled to the top (0,0). If I press the button with the G1 track ball, the activity with the ScrollView comes up scrolled all the way to the bottom. Smells like a bug to me, but... Attempts to force the scroll to the top in Java at onCreate() or onResume() time do nothing (although the view scrolls fine with a finger or trackball focus changes once it is up). What say the assembly? Thanks -- Ward --~--~-~--~~~---~--~~ 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] Launching activity within an apk file thorough intent
This is something to do with the launching activties when there are multiple available in a apk. Take an example is Settings com.android.settings.WirelessSettings and com.android.settings.SoundAndDisplaySettings From an example application A, when I launch WirelessSettings, it pops the screen showing wireless settings. Now when I switch to A using the task switcher (long keypress of HOME), and try to launch SoundAndDisplaySettings, I see the screen for wireless settings. !! This after using flags like . ComponentName toLaunch; .. if(selectedIcon == ICON_WIRELESS) toLaunch = new ComponentName(com.android.settings, com.android.settings.WirelessSettings); else toLaunch = new ComponentName(com.android.settings, com.android.settings.SoundAndDisplaySettings); . void launchApp() { if (toLaunch != null) { Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); intent.setComponent(toLaunch); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); mActivity.getInstance().startActivity(intent); } } I was expecting it a behave otherwise. This works fine if I were to hit BACK key from the settings, go back to A, and launch the Settings again. Is this behavior by design ? --~--~-~--~~~---~--~~ 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: JMI and android
hello, JMI what ? On Fri, Jan 9, 2009 at 3:05 PM, arnouf arnaud.far...@gmail.com wrote: Hi guys! A simple question: Is JMI supported by Android? Regards --~--~-~--~~~---~--~~ 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 Use Google Accounts in Android Application
I am researching the same issues... I think I have my research bookmarked at my del.icio.us account..its on left middle link bar right hand side of my blog.. http://www.jroller.com/sahreme At the moment I do not remember what I tagged it under... On Jan 8, 11:39 pm, jeffkyjin jeffky...@gmail.com wrote: Hello all, I want to use users' Google accounts in my application, example Google 's services which need login. Any one knows how to build it into android applications? 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: REST Web Services and Android
You need android.permission.INTERNET declared in your manifest. Cheers, Justin Android Team @ Google On Jan 9, 5:07 pm, Jamie jamie.hu...@gmail.com wrote: Thanks for the slides!! Do you know of any current resources for accessing web API's (examples, explanations, etc.)? The android implementation has undergone some changes and most resources I have found do not work any longer. Also, I am not familiar with Web protocol, so documentation is unclear both on the android and apache sites. Evertime I execute this code: HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpGet get_request = new HttpGet(URI); HttpResponse response = httpClient.execute(get_request, localContext); It throws a Socket Exception on the last line. Any ideas why?? --~--~-~--~~~---~--~~ 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: XML Layout Ordering Problem
The height of ScrollView should be fill_parent, and the height of LinearLayout should be wrap_content. Does this work? If not, try to rebuild your project in Eclipse (sometimes changes in xml files are not immediately updated). This did not work. Not sure what the problem is, I do not access the views attributes in my code except, setContentView(R.layout.main), and setting the content in each ImageButton and TextView. PS: What is woot? its a great website that hosts One Deal, One Day: www.woot.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] I want to make some foreigner friends!
I want to make friends with some foreigher, I am a chinese, I want discuss android with the foreign friends, there are two purpose, first is the technology discuss, second, I want to practise oral English with foreigners. --~--~-~--~~~---~--~~ 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] Inject key event for call camera app
Hi guys, Somebody know how can I call the camera capture application from my application ? I tried to use inject key event without success using KEY CAMERA BUTTON. If the user push key camera button from any applications, the camera capture application work. Is there a mode to call camera capture application from my activiy ? Thanks at all Stefano --~--~-~--~~~---~--~~ 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: REST Web Services and Android
Thank you sooo very much!! --~--~-~--~~~---~--~~ 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: File download in Browser
The download manager, by design, only allows to download files for which there are registered viewers (ACTION_VIEW, file:///, mime type). Installing an app that can view any file (e.g. a hex dump app) will let you download any file. JBQ On Wed, Dec 24, 2008 at 9:36 PM, TBoom8669 tboom8...@gmail.com wrote: Unless I am missing something... The Browser should allow the download of 3gp files from GMail. All attempts thus far have resulted in the error The content being downloaded is not supported on the phone. The same file works fine if the attachment is first downloaded to a pc and transferred via USB. Is there a glitch in my browser? Will there be an update to allow the device to download any file regardless of device support? In some cases, you may need to store the file to connect the device to a pc at a later time and access it via usb by a supported application. From previous experience this functionality is available in other smartphones. If i have missed a thread on this please point me in the right direction or let me know what I may need to do on my device. -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. --~--~-~--~~~---~--~~ 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: Is it possible to replace or extend the dialer application ?
On Fri, Jan 9, 2009 at 9:34 AM, Mark K mark.ka...@gmail.com wrote: The dialer app, like other built in apps uses private API's that are not available as part of the developer SDK API, such as com.android.internal.telephony.* . You'd have to build you're own version of Android from source to have your own dialer app. Is the same true on the other side -- with detecting a phone call? Can you detect that the phone is receiving a call and then replace with your own code? -- Brad Fuller --~--~-~--~~~---~--~~ 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: ScrollView initialization - bug or stupidity?
It's probably because you have a focusable item at the bottom of your ScrollView. Which means that when you launch the ScrollView, the framework looks for an item to give focus to, which causes the ScrollView to scroll. On Fri, Jan 9, 2009 at 9:08 AM, Ward Willats goo...@wardco.com wrote: On the G1. I have a pre-rotated activity (via android:screenOrientation=portrait). It contains a ScrollView with a linear layout child. The XML sets scrollX=0dip and scrollY=0dip (although I assume this is the default anyway). I launch this activity via a button in another activity. If I press the button with my finger, the activity with the ScrollView comes up as expected, scrolled to the top (0,0). If I press the button with the G1 track ball, the activity with the ScrollView comes up scrolled all the way to the bottom. Smells like a bug to me, but... Attempts to force the scroll to the top in Java at onCreate() or onResume() time do nothing (although the view scrolls fine with a finger or trackball focus changes once it is up). What say the assembly? Thanks -- Ward -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: XML Layout Ordering Problem
It is hard to imagine that it does not work. Do you have extremely large images? Set image sizes to 30dip for height and weight, or all images and texts to wrap_content everywhere. So, just to be sure, you see: [image] [image] [image] [text] [text] [text] instead of [image] [text] [image] [text] [image] [text] ? Does this also happen if you comment out the scroll view for a test? !-- -- Peli On Jan 9, 6:30 pm, Jamie jamie.hu...@gmail.com wrote: The height of ScrollView should be fill_parent, and the height of LinearLayout should be wrap_content. Does this work? If not, try to rebuild your project in Eclipse (sometimes changes in xml files are not immediately updated). This did not work. Not sure what the problem is, I do not access the views attributes in my code except, setContentView(R.layout.main), and setting the content in each ImageButton and TextView. PS: What is woot? its a great website that hosts One Deal, One Day:www.woot.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: JMI and android
I think he meant JNI On Jan 9, 11:17 am, David Turner di...@android.com wrote: hello, JMI what ? On Fri, Jan 9, 2009 at 3:05 PM, arnouf arnaud.far...@gmail.com wrote: Hi guys! A simple question: Is JMI supported by Android? Regards --~--~-~--~~~---~--~~ 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: Inject key event for call camera app
You want to broadcast android.media.action.IMAGE_CAPTURE intent. On Jan 9, 9:55 am, fala70 fal...@gmail.com wrote: Hi guys, Somebody know how can I call the camera capture application from my application ? I tried to use inject key event without success using KEY CAMERA BUTTON. If the user push key camera button from any applications, the camera capture application work. Is there a mode to call camera capture application from my activiy ? Thanks at all Stefano --~--~-~--~~~---~--~~ 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: Suggestions for Image Libraries to use on Android.
What does J2me CDC profile use at the moment? That would be my best guess as j2ME CDC would be optimized for ARM chipsets Or check optional JSRs under j2me at jsr.org and see what they use..as their might be some sort of port for j2me under CDC On Jan 8, 11:37 pm, Ryan Moulton ryanmoul...@gmail.com wrote: I'm looking to develop an application for which I need to do convolutions and the like on an image. I haven't done image processing in Java before however, and stumbled upon the Java Advanced Image api. The documentation for that however says that it isn't officially supported on chipsets other than those for which there is an optimized version which does not include the G1 or any phone processors that I'm aware of. It's also a 3 mb jar which seems a bit thick for bundling with something people will be downloading on their phone. Does anyone have suggestions for what to use? If I can be reasonably certain the JAI would work I'd be fine with using it, but is there a better option? Has anyone tried doing something similar yet? --~--~-~--~~~---~--~~ 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: use camera in portrait mode
There is an interaction between the screen orientation and the camera that causes problems for portrait mode. There will be a platform fix in a future release, however it's possible that some devices will not be able to support portrait mode. On Jan 9, 5:37 am, jarkman jark...@gmail.com wrote: For what little help it is, I tried failed to do this, and logged it as a bug:http://code.google.com/p/android/issues/detail?id=1193 Richard On Jan 9, 11:20 am, Christian Wiesbauer christian.wiesba...@bdc.at wrote: Hi, is it possible to use the camera of the G1 in portrait mode? Maybe there is a trick like rotate the SurfaceView degrees? Thanks, Christian Wiesbauer --~--~-~--~~~---~--~~ 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] ScrollView initialization - bug or stupidity?
So it was stupidity then! At onCreate() time, I was manually setting focus on the OK button at the bottom of a scrolling setup screen. Removing that fixes. Thank you very much. I am surprised that since I was causing this by calling setFocus(), that the behavior doesn't happen in both touch-mode and keyboard-mode. Should setFocus() enable keyboard mode? (I leave that to the experts...) -- Ward It's probably because you have a focusable item at the bottom of your ScrollView. Which means that when you launch the ScrollView, the framework looks for an item to give focus to, which causes the ScrollView to scroll. On Fri, Jan 9, 2009 at 9:08 AM, Ward Willats goo...@wardco.com wrote: On the G1. I have a pre-rotated activity (via android:screenOrientation=portrait). It contains a ScrollView with a linear layout child. The XML sets scrollX=0dip and scrollY=0dip (although I assume this is the default anyway). I launch this activity via a button in another activity. If I press the button with my finger, the activity with the ScrollView comes up as expected, scrolled to the top (0,0). If I press the button with the G1 track ball, the activity with the ScrollView comes up scrolled all the way to the bottom. Smells like a bug to me, but... Attempts to force the scroll to the top in Java at onCreate() or onResume() time do nothing (although the view scrolls fine with a finger or trackball focus changes once it is up). What say the assembly? Thanks -- Ward -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Android media api's relation to PVMF api's
Ah... then you should be asking over in android-framework. This forum is for application developers. As freepine mentioned, there are some docs to get you started in the source tree. On Jan 9, 5:13 am, vishy s vishy.s1...@gmail.com wrote: Dave, Thank you very much for the information. I also would like to know how to integrate components like OpenMAX compliant codecs, parsers, protocols.. Is there any document or link that can guide me? Thanks and regards, -Vishwa On Jan 9, 8:56 am, Dave Sparks davidspa...@android.com wrote: MediaPlayer is a high level abstraction for OpenCore. There are no immediate plans to expose any of OpenCore's lower level API's to Java. On Jan 8, 1:43 am, vishy s vishy.s1...@gmail.com wrote: Hi folks, I am trying find the relation between android media api's available (http://code.google.com/android/reference/android/media/MediaPlayer.html) for android applications and the PVMF api's which are available as a part of openCORE. Some of the API's are differing. How are these linked internally? Is there an interface class or headerfile that we can see? I ran around the net but failed failed to find one such doc that explains this Thanks in advance !!! -Vishwa- 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 -~--~~~~--~~--~--~---