[android-developers] Cached Background Bitmaps From Widgets?

2009-05-29 Thread snctln
So I was just reading a great overview of some of the IO happenings written by Mark Murphy and posted over at http://androidguys.com/?p=5342 and was very intrigued by something... here is the relevant text Next, Romain moved into images, particularly backgrounds for widgets. Backgrounds will

[android-developers] Re: Cached Background Bitmaps From Widgets?

2009-05-29 Thread Romain Guy
Hi, A way to do this is to use the onSizeChanged() method. In that method, you know what the exact size of your view is. From there you can easily call Bitmap.createScaledBitmap() to scale your bitmap down. On Thu, May 28, 2009 at 11:00 PM, snctln catlin.s...@gmail.com wrote: So I was just

[android-developers] Re: Hide the virtual keyboard

2009-05-29 Thread Alex B
Indeed, Sujay, thank you! This will disable (suppress) the soft keyboard: editText_input_field.setOnTouchListener(otl); private OnTouchListener otl = new OnTouchListener() { public boolean onTouch (View v, MotionEvent event) { return true; // the listener has

[android-developers] Authorization Idea

2009-05-29 Thread info+farm
Hello all, I would like to apply authorization on my Android application. Once the user logs in I would like to be able to hide or display the actions/activities according to user's role. For instance; If the user in standard role I do not want to let her to start some activities(also hide the

[android-developers] Re: Cached Background Bitmaps From Widgets?

2009-05-29 Thread snctln
Romain, Thank you very much for the quick response I really appreciate it. This sounds like a very reasonable approach to this problem, but unfortunately I am still confused. I apologize in advance, because I am sure this is a simple concept that I am just not understanding at the moment...

[android-developers] Re: Application.onPause()? Is there a hook like this?

2009-05-29 Thread matthias
... It's a static reference, ie global to the process. So as activities are started the ref points to the new activity. That said, I agree the right thing to do here isn't obvious. But it's also not obvious to me why you think it's bad to unregister the listener in your apps onDestroy. I

[android-developers] Re: howto: scroll a text view

2009-05-29 Thread schwiz
k thanks again mark, not sure what was wrong the first time, guess I should stay away from the xml wizard seems to always cause problems for me On May 28, 11:43 pm, Mark Murphy mmur...@commonsware.com wrote: So are you saying this will actually work and did I possibly just have a typo

[android-developers] how to make a view drawable

2009-05-29 Thread Saurav Mukherjee
i have a custom view on which i have drawn some lines(to represent a grid) i want to use it as a background to another view!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Sensor not being notified when in standby

2009-05-29 Thread MrChaz
It is possible but keeping the phone on to receive the events will seriously hurt battery life and should be avoided if at all possible. On May 28, 4:58 pm, Éderson M Ferreira ederso...@gmail.com wrote: Hi, I am listening events from accelerometer sensor and everything is going right. The

[android-developers] Re: video capture doesn't seem to work in 1.5

2009-05-29 Thread zeeshan
Activity just close at recorder.prepare(); dont see any exception On May 28, 5:30 pm, Marco Nelissen marc...@android.com wrote: What do you mean by no luck? Does something crash? Do you get an exception? Does it create the recording file? Is there any data in it? On Thu, May 28, 2009 at 9:25

[android-developers] How to log messages sent using SMS service?

2009-05-29 Thread Kasmoori Bindu
Hi All, I am beginner to Android platform. I would like to know how to capture the SMS messages that i sent using SMS service. I have used my own editor instead of Messaging Composer. I am able to send the messages using the SMS service from my Editor but Some how i could not see the messages

[android-developers] Error in running Google Map and Calendar in Android SDK1.5 Release

2009-05-29 Thread arun choudhary
Hi All, I am trying to run Google Map and Calendar Application in SDK 1.5 release emulator but not able to do same These services work fine in* android-sdk-linux_x86-1.0_r1* So I tried several approaches like getting Calendar.apk and CalendarProvider.apk from this release and installing the

[android-developers] Re: how to make a view drawable

2009-05-29 Thread schwiz
in xml its android:background=@drawable/background or in the oncreate for your canvas call setBackgroundREsource (R.drawable.background); i think :) On May 29, 2:16 am, Saurav Mukherjee to.saurav.mukher...@gmail.com wrote: i have a custom view on which i have drawn some lines(to represent a

[android-developers] Re: PNG transparency and OpenGL ES

2009-05-29 Thread Nate
Thank you both for the solution (images must be power of two dimensions) and the additional helpful information! Cheers! -Nate On May 28, 12:56 pm, Anton socialhac...@gmail.com wrote:     The ball.png that you reference above is 30x30 pixels.  As MrChaz said, you must use power of two sized

[android-developers] throughput tools

2009-05-29 Thread krish24
Hi All, How I can measure USB/MMC throughput at Android Level? Is there any tool/executable available for measuring USB/MMC throughput. Regard, krish --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android

[android-developers] can i use 15MB space for my App?

2009-05-29 Thread zeeshan
Hi , i am wondering my application have too many images in assets which is about 15MB but there is only 14MB space available for android App. is there any way to increase this space? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[android-developers] Re: video capture doesn't seem to work in 1.5

2009-05-29 Thread zeeshan
is anybody come across the same problem or anyone have a working video capture example. your help is appreciated waiting for the help On May 29, 9:17 am, zeeshan genx...@gmail.com wrote: Activity just close at recorder.prepare(); dont see any exception On May 28, 5:30 pm, Marco Nelissen

[android-developers] Re: Adding intent filter in code

2009-05-29 Thread Peli
I thought, (1) only works for broadcast intents, not for activity intents? Does (2) work for activity intents? Peli On May 29, 4:25 am, Mark Murphy mmur...@commonsware.com wrote: My question is that is it possible to add an intent-filter in code, for example from a background service? I

[android-developers] Does the android 1.5 browser support navigator.geolocation?

2009-05-29 Thread zero_star
Hi guys, Can anyone tell me whether the android browser in 1.5 supports the geolocation W3C standard? I tried loading some demo pages on the emulator and it doesn't seem to work. As I don't have an actual phone, i 'm curious whether it works. Thanks

[android-developers] How to know if we are in home screen

2009-05-29 Thread srinivas
Hi, How to know if we are in home screen? For a USAT GCF case i need to know this. Is there a way to know this? Atleast can we get a reference to the top most activity in the activity stack maintained by andriod? This information will be very helpful. Thanks InAdvance Srinivas

[android-developers] Re: PNG transparency and OpenGL ES

2009-05-29 Thread djp
I was wandering if you managed to load a RGBA texture without pre- multiplied alpha. I'm working with an assumption that every texture is alpha pre- multiplied, because I was unable to load a RGBA texture without pre- multiplication (on G1). I'd love to know if it's possible or not. Thanks,

[android-developers] Re: How to create a simple list of names, with personal image for each row

2009-05-29 Thread Morelli Giuseppe
Thank you Vincent, I've read the link you sent, and it was opening my mind. Now I've solved the problem inheriting from BaseAdapter. There are also some methods to ovverride, and the most important is getView for callback. Then I created a simple class that inherit from LynearLayout, to define

[android-developers] Re: how can i put 15MB images in my App?

2009-05-29 Thread zeeshan
i think download option would be the better solution. i need to download in a bunch like 50 images on next click. i only have idea to take image and display with fowllowing approach: private static Bitmap getImageBitmap(String url) { Bitmap bm = null; try { URL aURL

[android-developers] Re: how to have onItemClickListener for setListAdapter(new EfficientAdapter(this));?

2009-05-29 Thread zeeshan
ohh thanks. this can do my job. @Override protected void onListItemClick(ListView l, View v, int position, long id) { } On May 28, 5:34 pm, Marco Nelissen marc...@android.com wrote: You don't set a separate OnItemClickListener for each position, you set one for the entire

[android-developers] how convert bitmap to byte array?

2009-05-29 Thread Mike Lanin
Hi, guys! I want to store pictures from the internet in my data base as byte arrays. I get the pictures as bitmaps, but can't find way to convert it to byte array. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Re: Where do i put 45 MB Audio Files.

2009-05-29 Thread Robert Green
Perhaps you need to think hard about whether you actually need 45MB of audio files? What format are you using? What bitrate? Are these full songs? What does your application do? There are usually more efficient ways to do most everything. Sometimes it requires a totally new approach to the

[android-developers] Re: Can't keep AlertDialog on screen when KeyEvent.KEYCODE_BACK is handled with 1.5 (??)

2009-05-29 Thread Rob Franz
FYI, looks like setPositiveButton and setNegativeButton are gone, and now you have setButton, setButton2, and setButton3. On Fri, May 29, 2009 at 12:50 AM, Rob Franz rob.fr...@gmail.com wrote: Thanks Marco. Took out the super.onKeyDown and it does block... you're right. However, my complaint

[android-developers] Deleting buffer cache for IO throughput

2009-05-29 Thread vrukesh
Hi, We are writing an application to measure throughput speed of SD card on ARM-based Android target using Java APIs. When we execute the application twice for read operation, results are seen to be affected with buffer cache. For example, first read throughput is 275 KBps and second read

[android-developers] Re: TextView Highlight/Select Issue

2009-05-29 Thread mscwd01
Please, this is getting so frustrating now. I have tried setting the TextView highlight colour to transparent but that doesn't work. If I set the ListView selector to draw on top, it covers the ImageView I have on the row but the textView remains on top. If I apply a normal style to the TextView

[android-developers] An android application to display cursor position

2009-05-29 Thread arun choudhary
Hi All, I am new in Android application programming. I need to develop an android application which simply displays the cursor position (co ordinates) very urgently. If any has some pointers in same wud be a great help to me Regards, Arun -- wish u all the best

[android-developers] How to put an AppWidget on lock screen?

2009-05-29 Thread dar
The documentation hints that: ...the lock screen could also contain widgets, and it would have a different way of adding, removing and otherwise managing widgets. [1] Now that I have 1.5, I can see the lock screen changed to show the same background as the home screen. Is there a way to put

[android-developers] Speech Recognition Grammar

2009-05-29 Thread Bhargavi
Hi, can someone please tell me how to create a new Grammar for speech recognition..when i tried to do this , iam seeing the following error D/RecognizerEngine( 236): start new grammar E/Srec( 236): ESR_READ_ERROR: Problem loading syntax from image This is how iam trying to create a

[android-developers] NP API Plugin

2009-05-29 Thread Migol
Does any know how to install NP plugin into Android's browser? --~--~-~--~~~---~--~~ 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

[android-developers] How to know when map has zoomed?

2009-05-29 Thread Mika
Hi all, I was wondering is there any way of knowing when the zoom animation in map view has ended?? After each zoom I need to calculate how far my overlays are from each other, but I haven't figured out yet how to know when the map has been zoomed. Is there any way to do that?? -Mika

[android-developers] Re: An android application to display cursor position

2009-05-29 Thread Streets Of Boston
Which cursor? Do you mean the position of the user's finger when it's on the screen? On May 29, 9:03 am, arun choudhary achoudhary2...@gmail.com wrote: Hi All, I am new in Android application programming. I need to develop an android application which simply displays  the cursor position (co

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Streets Of Boston
So, how do I keep the service alive between orientations but shut it down when the user has totally exited the app? I use this 'trick' to figure out if an onDestroy is really a destroy or just a configuration change by the user (e.g. closing keyboard): Use onRetainNonConfigurationInstance() and

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Streets Of Boston
This code seems to rely on the fact that your background thread does not die immediately. If your service is rebound within 30 * 1000 milliseconds, then it all works well. - This is an unlikely scenario, but what if the re-bind happens more than 30 seconds later? - What if the service is stopped

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Mike Hearn
Done!  Man I'm happy to have that working.  I've been retrofitting all the netcode with this service for the past 20 hours of coding and I can't wait to not be working on this anymore! Well, I did show you a simpler way to do it. I'm not sure you should write a tutorial on this - like I

[android-developers] Re: how convert bitmap to byte array?

2009-05-29 Thread Romain Guy
Hi, Use Bitmap.compress() and store the bitmap in PNG. That's what the Home screen does. On Fri, May 29, 2009 at 5:08 AM, Mike Lanin mike.la...@gmail.com wrote: Hi, guys! I want to store pictures from the internet in my data base as byte arrays. I get the pictures as bitmaps, but can't find

[android-developers] Re: Remove screen lock like the MENU key do?

2009-05-29 Thread andrew
Walter androidremotecont...@gmail.com wrote: I've been looking for this, as my research, no way to do it for now. - 显示引用的文字 - Thanks for Walter ! I have been looking into the source code,and did'nt find there has a way to do this too! Maybe it is true that we can't remove the lock in our

[android-developers] Parsing Dates in other Locales

2009-05-29 Thread EboMike
I need to parse a date using a flexible date format (like MM/dd/ or dd-MMM), and so far I've always used SimpleDateFormat for that (since unfortunately, android.text.format.Time.parse doesn't support date format strings). This works fine in an US environment, but as soon as I switch to any

[android-developers] Re: Hide the virtual keyboard

2009-05-29 Thread Alex B
Actually, there's still a problem. I only want suppress the soft keyboard from showing up -- because I have a custom on-screen keypad. Consuming the touch event suppresses the soft keyboard, but it also holds the focus on the text field, making it impossible to touch another text field. I have

[android-developers] embedding photo in body of email

2009-05-29 Thread Shre555
Can we embed a photo in the body of the email Is there a way to embed a photo in the body of the email if yes then how?? Please help me someone. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[android-developers] Android UI guidelines again

2009-05-29 Thread Andriy Zakharchuk
Hello All, I know there were a lot of topics like this created earlier, but most of them haven't got any response. I'd like to raise this topic once again and probably ask more concrete questions. I need to create several forms which allow users entering data. Form allows entering text

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Mike Hearn
On May 28, 4:40 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Is it safe to cache a Handler (in a static variable)? It should be OK, from my reading of the code. It keeps a reference to the current threads looper, but that should exist for as long as the process does anyway. I *think*

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Robert Green
Mike: I DO need it to run in the background, that is, while orientation is changing. The service is also really nice because I can do things like submit a score in the background while the user is going from the game back to the game menu. I don't like the static handler idea because it can't

[android-developers] Re: G1 ManageApplications - the size of the application data does not change when ...

2009-05-29 Thread jade
I've added a call to the vacuum command but after I delete all of the data from the database, the G1's Manage Applications screen still shows 2MB of data for our app. Here's a snippet of my code that calls vacuum: if (!dbInstance.inTransaction()) { dbInstance.execSQL(vacuum);

[android-developers] Toast without light up

2009-05-29 Thread daniel.benedykt
Hi If I am running a service, and I want to sent a toast, the phone lights up. Is there a way to show the Toast without turning on the light? Thanks Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Android UI guidelines again

2009-05-29 Thread Andriy Zakharchuk
Minor add-on about buttons: Contacts application has: Done/Revert buttons. Calendar application has: Save/Discard changes buttons. Besides there is another difference when user edits existing item (not creating new one): Contacts application: you can delete a contact using view contact screen

[android-developers] Android FancyGestureDetector

2009-05-29 Thread lucky4me
Android port of fantastic Fancy Gestures http://bakhtiyor.com/2009/05/fancy-gesture-detector/ --~--~-~--~~~---~--~~ 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] How to add a keyboard setting screen

2009-05-29 Thread Nitin67
Hello, The Android keyboard has a Android Keyboard Settings screen in the Settings-LocaleText menu. I am developing an input method, using the Sample keyboard program as a starting point. How can I add a Setting screen for my keyboard, in the Settings-LocaleText menu, similar to

[android-developers] Re: Toast without light up

2009-05-29 Thread Sundog
Is there a way to show the Toast without turning on the light? I don't know, but that has to be my all-time favorite question here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: Android UI guidelines again

2009-05-29 Thread Disconnect
What they've said in the past on IRC is that they don't have guidelines so much as they have actual designers walking over and saying that sucks. (Which explains the inconsistencies as well.) On Fri, May 29, 2009 at 12:49 PM, Andriy Zakharchuk andriy.zakharc...@gmail.com wrote: Minor add-on

[android-developers] Re: Android UI guidelines again

2009-05-29 Thread Romain Guy
Follow what Contacts does :) On Fri, May 29, 2009 at 9:05 AM, Andriy Zakharchuk andriy.zakharc...@gmail.com wrote: Hello All, I know there were a lot of topics like this created earlier, but most of them haven't got any response. I'd like to raise this topic once again and probably ask

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Mike Hearn
I DO need it to run in the background, that is, while orientation is changing. That's not in the background - the activity manager will keep your process alive during configuration changes anyway, regardless of whether you have a service or not. The only reason to use a service is if you need

[android-developers] Re: 1.5: Phone no longer stays awake when Stay Awake is enabled under Development settings

2009-05-29 Thread Rob Franz
It's very strange, but now it looks like I don't have that problem anymore. I'm sitting here looking at the phone (which is connected to my computer) and it has not gone into screen lock - i can still see what's on the screen. Only difference is I updated to 1.5r2, but I would imagine resolving

[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-29 Thread Gautam
Can some one please respond? Appreciate it. --~--~-~--~~~---~--~~ 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

[android-developers] Re: NP API Plugin

2009-05-29 Thread Mark Murphy
Migol wrote: Does any know how to install NP plugin into Android's browser? You can't install any plugins to Browser, except by modifying the device firmware. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 0.95

[android-developers] Re: Adding intent filter in code

2009-05-29 Thread Mark Murphy
Peli wrote: I thought, (1) only works for broadcast intents, not for activity intents? Does (2) work for activity intents? Both are for broadcast intents, but I was totally baffled by the ability to share via my activity statement, so I elected to provide a broader answer. Besides, I was

[android-developers] Re: implementation of onDestroy for a service containing a worker or backround thread

2009-05-29 Thread Streets Of Boston
onDestroy() can still be called. If an activity calls stopService(...), the service's onDestroy may be called. On May 28, 12:24 pm, Gautam gautam_raychaudh...@hotmail.com wrote: Thanks... The plan is to start the service once (startService()) and never call stopService. I want my service to

[android-developers] Re: Why the Android docs are inconsistent?

2009-05-29 Thread havexz
OK i ll do that On May 28, 9:55 am, Hamy hamilt...@gmail.com wrote: Agreed. Please file doc bugs for the benefit of is all. Hamy On May 27, 11:12 pm, Raphael r...@android.com wrote: Please file doc bugs athttp://b.android.com--the API probably evolved before 1.0 without the javadoc

[android-developers] ADC2 announced

2009-05-29 Thread gsmd
http://code.google.com/android/adc/ - 'open only to applications that have not been published'. Thanks for screwing devs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Android UI guidelines again

2009-05-29 Thread Andriy Zakharchuk
Do you mean that in Donut we'll see Calendar application rewritten and its look closer to the current Contacts style? Actually, I thought about it a little bit. It seems to me that Contacts form is more convenient in case when you have many optional/ multiple (I mean you may have from 0 to many

[android-developers] Re: How to find out screen status: active/dark?

2009-05-29 Thread Jeff Sharkey
I've dug through the documentation but couldn't find a call that would fit: Is there a way to find out the screen status (Active/dark)? You can listen for Intent.ACTION_SCREEN_OFF and ACTION_SCREEN_ON broadcasts. However, I would strongly recommend registering for these dynamically at runtime

[android-developers] Re: How to put an AppWidget on lock screen?

2009-05-29 Thread Jeff Sharkey
That documentation is describing an example of what another AppWidgetHost might look like, but we haven't implemented widgets on the default lock screen that shipped with 1.5. j On Fri, May 29, 2009 at 6:13 AM, dar dher...@gmail.com wrote: The documentation hints that: ...the lock screen

[android-developers] Re: ADC2 announced

2009-05-29 Thread Ivan Soto
Think about it for a moment, it's SO unfair to submit already published applications. Ivan Soto Fernandez Web Developer http://ivansotof.com On Fri, May 29, 2009 at 12:35 PM, gsmd gsm...@gmail.com wrote: http://code.google.com/android/adc/ - 'open only to applications that have not been

[android-developers] Re: Why the Android docs are inconsistent?

2009-05-29 Thread Romain Guy
Or better yet, contribute documentation patches :) On Fri, May 29, 2009 at 11:31 AM, havexz bali.param...@gmail.com wrote: OK i ll do that On May 28, 9:55 am, Hamy hamilt...@gmail.com wrote: Agreed. Please file doc bugs for the benefit of is all. Hamy On May 27, 11:12 pm, Raphael

[android-developers] Re: Why the Android docs are inconsistent?

2009-05-29 Thread havexz
Dats a good idea ..I just have to figure out how to do it... On May 29, 1:44 pm, Romain Guy romain...@google.com wrote: Or better yet, contribute documentation patches :) On Fri, May 29, 2009 at 11:31 AM, havexz bali.param...@gmail.com wrote: OK i ll do that On May 28, 9:55 am,

[android-developers] Re: Why the Android docs are inconsistent?

2009-05-29 Thread Romain Guy
source.android.com explains everything :) On Fri, May 29, 2009 at 12:03 PM, havexz bali.param...@gmail.com wrote: Dats a good idea ..I just have to figure out how to do it... On May 29, 1:44 pm, Romain Guy romain...@google.com wrote: Or better yet, contribute documentation patches :)

[android-developers] Re: How to put an AppWidget on lock screen?

2009-05-29 Thread dar
Thanks for answering. It'll be pretty cool when you add that in. On May 29, 2:42 pm, Jeff Sharkey jshar...@android.com wrote: That documentation is describing an example of what another AppWidgetHost might look like, but we haven't implemented widgets on the default lock screen that shipped

[android-developers] SDCard becoming un-writeable

2009-05-29 Thread GiladH
Hey, My app occationaly fails with this/that sort of an IO error when trying to _write_ a file to the sdcard. No problems in reading files. I have tested it on both textual files ( via FileWriter etc) and binary files ( new RandomAccessFile( filepath, rw); ). I have no reasun to believe that

[android-developers] Re: ADC2 announced

2009-05-29 Thread Sundog
Lost my attention immediately. The few pennies I'll get from the Android Mock-it Place are better than nothing at all. What a joke. On May 29, 12:35 pm, gsmd gsm...@gmail.com wrote: http://code.google.com/android/adc/- 'open only to applications that have not been published'. Thanks for

[android-developers] Re: Help with Services

2009-05-29 Thread clemsongrad
Sujay, There are two ways I know of doing this: 1. Easy way is to have the service to broadcast the result. 2. A little more complex way is to have an AIDL which is very similar to CORBA and enable the IPC between the service and your app components. This i assume would be more sync in

[android-developers] xmlbeans support in 1.5

2009-05-29 Thread pavan
This question has been asked before. However, the slideshow at http://www.slideshare.net/sullis/web-services-and-android-osspac-2009 says that xmlbeans is not supported in 1.0 and 1.1. Does that mean xmlbeans is supported now?. Has anyone managed to get xmlbeans working in android?. Thanks.

[android-developers] how to get classes in an apk using DexClassLoader?

2009-05-29 Thread sherry
I have an apk installed in /data/app. I want to use the class methods in there. Here is what I tried: public void test0method(){ DexClassLoader dLoader = new DexClassLoader(/data/app/ com.my.internal.apk, /data/local/tmp, null,

[android-developers] Re: OpenGL

2009-05-29 Thread Nilz
I have worked this out! So for anyone who's interested: When I removed gl.glEnableClientState(GL10.GL_COLOR_ARRAY); from the code, it started working on the device, as well as continuing to work on the emulator. When I put it back in we only get coloured shapes in the emulator, and not on the

[android-developers] SampleView in a Layout?

2009-05-29 Thread guruk
Hi, @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new SampleView(this)); } private static class SampleView extends View implements OnGestureListener { but how could I make

[android-developers] Re: Telephony Manager functions don't work

2009-05-29 Thread Mark Murphy
alexdonnini wrote: I have low expectations that this message will get any response as it seems that Google developers do not like to address issues too close to the Android core and to strategic mobility applications. Do you honestly think insulting Google developers will improve your chances

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Robert Green
Are you trying to tell me that it's totally safe to throw stuff in static fields? I've always avoided it because of years of shared space in a JVM in web apps. I know Android uses separate processes for each application but is it safe to say that it will kill all of your static allocations even

[android-developers] Re: What's the best way to handle an task w/progress dialog on orientation change?

2009-05-29 Thread Mark Murphy
Robert Green wrote: Are you trying to tell me that it's totally safe to throw stuff in static fields? I wouldn't go with totally safe, but it's an unfortunate requirement in some Android cases (e.g., sharing a WakeLock between a BroadcastReceiver triggered by AlarmManager and a Service doing

[android-developers] Re: Parsing Dates in other Locales

2009-05-29 Thread Urs Grob
I think this is because many locales are not included in the cupcake release due to size issues. (even less were included in the 1.0 and 1.1 releases) Locales.getAvailableLocales() should return all locales that are supported. The goal will be to include all the locales ICU has to offer. But

[android-developers] Re: How to find out screen status: active/dark?

2009-05-29 Thread clemsongrad
Jeff, What would the behavior be if you registered the broadcast receiver and listed these intents in the manifest? Would the run time start the service to invoke the onReceive() method? If so this is a great tip for optimization. Thanks On May 29, 1:38 pm, Jeff Sharkey

[android-developers] Screen Brightness

2009-05-29 Thread guruk
Hi, I read here in several posts thats possible with WindowManager.LayoutParams lp = getWindow().getAttributes(); lp.screenBrightness = 100 / 100.0f; getWindow().setAttributes(lp); to change the screen brightness. ok, but it looks only for the actual activity. (there it

[android-developers] Re: Bluetooth and Serial Port Profile

2009-05-29 Thread Nick Pelly
Hi Manny, Sounds like your socket was not getting closed properly. There is some discussion of a new interface BluetoothSocket.java on android-platform. An implementation will soon be available in the open source tree. Nick On Wed, May 27, 2009 at 5:14 AM, Manny manfred.spell...@gmail.com

[android-developers] Re: Help with Services

2009-05-29 Thread Streets Of Boston
Take a look at the API Demoes source code. There is source code for a Service that handles request from an activity and that can do callbacks back to an activity for updates (e.g. progress). On May 29, 1:03 am, Sujay Krishna Suresh sujay.coold...@gmail.com wrote: Hi all,               i'm

[android-developers] Re: Parsing Dates in other Locales

2009-05-29 Thread Michael Krehan
All the more a reason for me to switch to android.text.format, because that one DOES have those strings in several languages - but I can't see a replacement for SimpleDateFormat.parse(). Is there no way other than writing my own parser? On May 29, 2009 1:37 PM, Urs Grob grob@gmail.com wrote:

[android-developers] SpriteText and coloured surfaces

2009-05-29 Thread Nilz
I've tried to modify the SpriteText sample code, so that it doesn't use textures on the shapes, but instead colour the shapes. For example, modify the sample so that it's a coloured triangle instead of one with the android image. But is doesn't work, and I can't see why. I tried replacing the

[android-developers] Re: can not find a file in dynamically loaded jar

2009-05-29 Thread sherry
Thanks for your advice. I created an apk using the same classes and installed it using adb install to Emulator. Now I tried to use the following code to access the methods in Class SystemProperties which is part of newly installed apk. I still got ClassNotFoundException: public void

[android-developers] Re: Telephony Manager functions don't work

2009-05-29 Thread alexdonnini
My application does have uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_COARSE_UPDATES / Here is an example of the fialure I referred to in my

[android-developers] Re: audio recorder

2009-05-29 Thread intbt
I think I found my problem. First - the AudioRecord only seems to work for this combination of parameters: ar_test = new AudioRecord(MediaRecorder.AudioSource.MIC, 8000, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, 10); (buffer size must be 4096

[android-developers] Re: Telephony Manager functions don't work

2009-05-29 Thread Mark Murphy
alexdonnini wrote: My application does have uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / uses-permission android:name=android.permission.ACCESS_COARSE_UPDATES / Oh, well, so much for the

[android-developers] Re: Sending SMS more than 160 characters

2009-05-29 Thread Andrew
On May 28, 11:26 pm, Mark mark.ka...@gmail.com wrote: On May 28, 12:42 am, devendra.madhe...@gmail.com devendra.madhe...@gmail.com wrote: I am trying to send large SMS more than 160 characters using SendMultipartText() API. But On receivver side , i am getting two messages ( SMS).

[android-developers] Re: How to find out screen status: active/dark?

2009-05-29 Thread Jeff Sharkey
When you define a receiver in the manifest, the system will force your process awake to handle those broadcasts, even when your process may not be running. The overhead of ramping up a new process every time the user turns on/off the display is very high, which is why you want to avoid it. But

[android-developers] Market Not Updating Version Info

2009-05-29 Thread CaseyB
I just uploaded a new version of my application to the Android Market and then I choose to upload an update it doesn't update the version number of the app. It is only doing this as of Cupcake. Anyone else seeing this? --~--~-~--~~~---~--~~ You received this

[android-developers] Console logging missing on Eclipse

2009-05-29 Thread Brian Conrad
I'm running Eclipse Ganymede on Ubuntu 8.04 and suddenly with no configuration changes as of yesterday am missing logging on the Console Window. I see startup logging when I launch an app but once launched there are no more lines of information. The buttons for Verbose etc are also missing.

[android-developers] Re: Telephony Manager functions don't work

2009-05-29 Thread alexdonnini
Sorry Mark, I thought you had tried it. I will file a bug report. Thanks. Alex Donnini On May 29, 5:01 pm, Mark Murphy mmur...@commonsware.com wrote: alexdonnini wrote: My application does have uses-permission android:name=android.permission.ACCESS_COARSE_LOCATION / uses-permission

[android-developers] Re: Console logging missing on Eclipse

2009-05-29 Thread brianjtools
Never mind. Somehow LogCat (not Console) got turned off and digging around I found the setting to turn it on. On May 29, 2:14 pm, Brian Conrad brianjto...@gmail.com wrote: I'm running Eclipse Ganymede on Ubuntu 8.04 and suddenly with no configuration changes as of yesterday am missing logging

[android-developers] Re: Sending SMS more than 160 characters

2009-05-29 Thread David Turner
The SMS protocol allows for fragmented SMS delivery, where one long message is splitted into several SMS packets sent to the wire (each one charged separately, of course :-)) This involves setting a fragment bit in the packet, as well as filling an optional header with fragment index+count and

[android-developers] Re: how to get classes in an apk using DexClassLoader?

2009-05-29 Thread sherry
Now I used dexdump on /data/app/com.my.internal.apk and saw SystemProperties class is in the classes.dex file: Class #9- Class descriptor : 'Lcom/sprint/internal/SystemProperties;' Access flags : 0x30001 (PUBLIC VERIFIED OPTIMIZED) Superclass: 'Ljava/lang/Object;'

[android-developers] Re: how to get classes in an apk using DexClassLoader?

2009-05-29 Thread Mark Murphy
sherry wrote: Now I used dexdump on /data/app/com.my.internal.apk and saw SystemProperties class is in the classes.dex file: Class #9- Class descriptor : 'Lcom/sprint/internal/SystemProperties;' Access flags : 0x30001 (PUBLIC VERIFIED OPTIMIZED) Superclass:

  1   2   >