[android-developers] Re: Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?
Hi Dianne, I have tried to annotate the test method with UiThreadTest, but still it doesn't work, the trace log is: java.lang.RuntimeException: This method can not be called from the main application thread at android.app.Instrumentation.validateNotAppThread (Instrumentation.java:1500) at android.app.Instrumentation.waitForIdleSync(Instrumentation.java: 397) at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: 45) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod (InstrumentationTestCase.java:191) at android.test.InstrumentationTestCase.access$000 (InstrumentationTestCase.java:36) at android.test.InstrumentationTestCase$2.run (InstrumentationTestCase.java:171) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java: 1538) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3948) at java.lang.reflect.Method.invokeNative(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) at dalvik.system.NativeStart.main(Native Method) So what's the problem? And is there any other method I can use to perform a call on UI thread? On Aug 25, 9:40 am, Dianne Hackborn wrote: > As the error says, you are calling peformClick() for a different thread than > the UI thread (here the instrumentation thread). You can use the > Instrumentation API to perform a call on the UI thread. > > On Mon, Aug 24, 2009 at 6:08 PM, android.bu...@gmail.com < > > > > > > android.bu...@gmail.com> wrote: > > > no one know it? > > > On Aug 24, 11:01 am, "android.bu...@gmail.com" > > wrote: > > > I am using ActivityInstrumentationTestCase2 to do some test for an > > > activity. > > > I get a button in the setUp() method like this: > > > protected void setUp() throws Exception { > > > super.setUp(); > > > act = getActivity(); > > > > > > btn = (Button)act.findViewById( R.id.bike_button ); // this > > > button has been defined in layout > > > } > > > Then I use this button to perform a click in a test method like this: > > > public void testBikeButton(){ > > > //click the bike button > > > btn.performClick(); > > > ..} > > > > When run it as android junit, there will be an error like this: > > > "android.view.ViewRoot$CalledFromWrongThreadException: Only the > > > original thread that created a view hierarchy can touch its views. > > > at android.view.ViewRoot.checkThread(ViewRoot.java:2440) > > > at android.view.ViewRoot.playSoundEffect(ViewRoot.java:2261) > > > at android.view.View.playSoundEffect(View.java:7457) > > > at android.view.View.performClick(View.java:2178) > > > at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > > 40) > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > at android.test.InstrumentationTestCase.runMethod > > > (InstrumentationTestCase.java:191) > > > at android.test.InstrumentationTestCase.runTest > > > (InstrumentationTestCase.java:181) > > > at android.test.ActivityInstrumentationTestCase2.runTest > > > (ActivityInstrumentationTestCase2.java:175) > > > at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164) > > > at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151) > > > at android.test.InstrumentationTestRunner.onStart > > > (InstrumentationTestRunner.java:418) > > > at android.app.Instrumentation$InstrumentationThread.run > > > (Instrumentation.java:1520)" > > > > How do I fix it? > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- 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] Error : Unknown URI: content://media/external/images/media
Hi Why I have this error, please ? It' s the same java code than the following url: http://developer.android.com/intl/fr/guide/topics/providers/content-providers.html / / package dany.android.databasejpeg; import java.io.OutputStream; import android.app.Activity; import android.content.ContentValues; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore.Images.Media; import android.util.Log; public class testjpeg extends Activity { private static final String TAG = null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Save the name and description of an image in a ContentValues map. ContentValues values = new ContentValues(3); values.put(Media.DISPLAY_NAME, "road_trip_1"); values.put(Media.DESCRIPTION, "Day 1, trip to Los Angeles"); values.put(Media.MIME_TYPE, "image/jpeg"); // Add a new record without the bitmap, but with the values just set. // insert() returns the URI of the new record. Log.v(TAG, Media.EXTERNAL_CONTENT_URI.toString()); Uri uri = getContentResolver().insert (Media.EXTERNAL_CONTENT_URI, values); // Now get a handle to the file for that record, and save the data into it. // Here, sourceBitmap is a Bitmap object representing the file to save to the database. Bitmap sourceBitmap = BitmapFactory.decodeResource(getResources (), R.drawable.test); try { OutputStream outStream = getContentResolver ().openOutputStream(uri); sourceBitmap.compress(Bitmap.CompressFormat.JPEG, 50, outStream); outStream.close(); } catch (Exception e) { Log.e(TAG, "exception while writing image: ", e); } } } / / 08-25 07:08:09.507: ERROR/DatabaseUtils(656): Writing exception to parcel 08-25 07:08:09.507: ERROR/DatabaseUtils(656): java.lang.UnsupportedOperationException: Unknown URI: content://media/external/images/media 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at com.android.providers.media.MediaProvider.insertInternal (MediaProvider.java:1139) 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at com.android.providers.media.MediaProvider.insert(MediaProvider.java: 1118) 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at android.content.ContentProvider$Transport.insert(ContentProvider.java: 140) 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at android.content.ContentProviderNative.onTransact (ContentProviderNative.java:125) 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at android.os.Binder.execTransact(Binder.java:287) 08-25 07:08:09.507: ERROR/DatabaseUtils(656): at dalvik.system.NativeStart.run(Native Method) 08-25 07:08:09.536: DEBUG/AndroidRuntime(735): Shutting down VM 08-25 07:08:09.536: WARN/dalvikvm(735): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 08-25 07:08:09.536: ERROR/AndroidRuntime(735): Uncaught handler: thread main exiting due to uncaught exception 08-25 07:08:09.546: ERROR/AndroidRuntime(735): java.lang.RuntimeException: Unable to start activity ComponentInfo {dany.android.databasejpeg/dany.android.databasejpeg.testjpeg}: java.lang.UnsupportedOperationException: Unknown URI: content://media/external/images/media 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2268) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.os.Handler.dispatchMessage(Handler.java:99) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.os.Looper.loop(Looper.java:123) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at android.app.ActivityThread.main(ActivityThread.java:3948) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at java.lang.reflect.Method.invokeNative(Native Method) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at java.lang.reflect.Method.invoke(Method.java:521) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 08-25 07:08:09.546: ERROR/AndroidRuntime(735): at dalvik.system.NativeStart.main(Native Metho
[android-developers] Re: Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?
I have found the root cause of this problem. That's because of getInstrumentation().waitForIdleSync() I have seen someone else use waitForIdleSync() after UI action, I want to know if it is necessary, and in which case we need to call this method? If we want to call it, how do we call it correctly? On Aug 25, 3:08 pm, "android.bu...@gmail.com" wrote: > Hi Dianne, > I have tried to annotate the test method with UiThreadTest, but still > it doesn't work, the trace log is: > java.lang.RuntimeException: This method can not be called from the > main application thread > at android.app.Instrumentation.validateNotAppThread > (Instrumentation.java:1500) > at android.app.Instrumentation.waitForIdleSync(Instrumentation.java: > 397) > at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > 45) > at java.lang.reflect.Method.invokeNative(Native Method) > at android.test.InstrumentationTestCase.runMethod > (InstrumentationTestCase.java:191) > at android.test.InstrumentationTestCase.access$000 > (InstrumentationTestCase.java:36) > at android.test.InstrumentationTestCase$2.run > (InstrumentationTestCase.java:171) > at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java: > 1538) > at android.os.Handler.handleCallback(Handler.java:587) > at android.os.Handler.dispatchMessage(Handler.java:92) > at android.os.Looper.loop(Looper.java:123) > at android.app.ActivityThread.main(ActivityThread.java:3948) > at java.lang.reflect.Method.invokeNative(Native Method) > at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:782) > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) > at dalvik.system.NativeStart.main(Native Method) > > So what's the problem? And is there any other method I can use to > perform a call on UI thread? > > On Aug 25, 9:40 am, Dianne Hackborn wrote: > > > > > As the error says, you are calling peformClick() for a different thread than > > the UI thread (here the instrumentation thread). You can use the > > Instrumentation API to perform a call on the UI thread. > > > On Mon, Aug 24, 2009 at 6:08 PM, android.bu...@gmail.com < > > > android.bu...@gmail.com> wrote: > > > > no one know it? > > > > On Aug 24, 11:01 am, "android.bu...@gmail.com" > > > wrote: > > > > I am using ActivityInstrumentationTestCase2 to do some test for an > > > > activity. > > > > I get a button in the setUp() method like this: > > > > protected void setUp() throws Exception { > > > > super.setUp(); > > > > act = getActivity(); > > > > > > > > btn = (Button)act.findViewById( R.id.bike_button ); // this > > > > button has been defined in layout > > > > } > > > > Then I use this button to perform a click in a test method like this: > > > > public void testBikeButton(){ > > > > //click the bike button > > > > btn.performClick(); > > > > ..} > > > > > When run it as android junit, there will be an error like this: > > > > "android.view.ViewRoot$CalledFromWrongThreadException: Only the > > > > original thread that created a view hierarchy can touch its views. > > > > at android.view.ViewRoot.checkThread(ViewRoot.java:2440) > > > > at android.view.ViewRoot.playSoundEffect(ViewRoot.java:2261) > > > > at android.view.View.playSoundEffect(View.java:7457) > > > > at android.view.View.performClick(View.java:2178) > > > > at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > > > 40) > > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > > at android.test.InstrumentationTestCase.runMethod > > > > (InstrumentationTestCase.java:191) > > > > at android.test.InstrumentationTestCase.runTest > > > > (InstrumentationTestCase.java:181) > > > > at android.test.ActivityInstrumentationTestCase2.runTest > > > > (ActivityInstrumentationTestCase2.java:175) > > > > at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164) > > > > at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151) > > > > at android.test.InstrumentationTestRunner.onStart > > > > (InstrumentationTestRunner.java:418) > > > > at android.app.Instrumentation$InstrumentationThread.run > > > > (Instrumentation.java:1520)" > > > > > How do I fix it? > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see and > > answer them.- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Having a TextView auto complete with SearchSuggestions
Hi There, I have been successful in copying the APIDemo search example and I have search suggestions from search history popping up in the drop down search pane that appears at the top of the screen. However since search is the main function of my app, I have also created a start up screen with a search text box and "Go" button so that the user does not have to hit any keys to bring up the search prompt. So I hooked my search AutoCompleteTextView and "Go" button up to the same search framework, and it all works just fine, but I don't get the search suggestions on the AutoCompleteTextView. I had sort of been assuming that I could grab a list of search suggestions from SearchRecentSuggestions: SearchRecentSuggestions suggestions = new SearchRecentSuggestions( activity, SearchSuggestionSampleProvider.AUTHORITY, SearchSuggestionSampleProvider.MODE); but it seems I can only use that to add queries, not to get a list of them. That, I read, is all taken care of behind the scenes. I have read http://developer.android.com/reference/android/app/SearchManager.html which seems to hint that I can have recent search suggestions associated with my own search forms, but for the moment I am kind of stumped as to how to make them show up in the AutoCompleteTextView, or some other kind of TextView. Has anyone else managed to do this? i.e. have search suggestions pop up for something other than the special android search dialog? Many thanks in advance CHEERS> SAM --~--~-~--~~~---~--~~ 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: Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?
Annotations have nothing to do with this, waitForIdleSync() has nothing to do with this, it's just a basic aspect of Android that you can only call on to UI objects from the thread running the UI. Use this: http://developer.android.com/reference/android/app/Instrumentation.html#runOnMainSync%28java.lang.Runnable%29 On Tue, Aug 25, 2009 at 12:43 AM, android.bu...@gmail.com < android.bu...@gmail.com> wrote: > > I have found the root cause of this problem. > That's because of getInstrumentation().waitForIdleSync() > I have seen someone else use waitForIdleSync() after UI action, I want > to know if it is necessary, and in which case we need to call this > method? > If we want to call it, how do we call it correctly? > > On Aug 25, 3:08 pm, "android.bu...@gmail.com" > wrote: > > Hi Dianne, > > I have tried to annotate the test method with UiThreadTest, but still > > it doesn't work, the trace log is: > > java.lang.RuntimeException: This method can not be called from the > > main application thread > > at android.app.Instrumentation.validateNotAppThread > > (Instrumentation.java:1500) > > at android.app.Instrumentation.waitForIdleSync(Instrumentation.java: > > 397) > > at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > 45) > > at java.lang.reflect.Method.invokeNative(Native Method) > > at android.test.InstrumentationTestCase.runMethod > > (InstrumentationTestCase.java:191) > > at android.test.InstrumentationTestCase.access$000 > > (InstrumentationTestCase.java:36) > > at android.test.InstrumentationTestCase$2.run > > (InstrumentationTestCase.java:171) > > at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java: > > 1538) > > at android.os.Handler.handleCallback(Handler.java:587) > > at android.os.Handler.dispatchMessage(Handler.java:92) > > at android.os.Looper.loop(Looper.java:123) > > at android.app.ActivityThread.main(ActivityThread.java:3948) > > at java.lang.reflect.Method.invokeNative(Native Method) > > at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > > (ZygoteInit.java:782) > > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) > > at dalvik.system.NativeStart.main(Native Method) > > > > So what's the problem? And is there any other method I can use to > > perform a call on UI thread? > > > > On Aug 25, 9:40 am, Dianne Hackborn wrote: > > > > > > > > > As the error says, you are calling peformClick() for a different thread > than > > > the UI thread (here the instrumentation thread). You can use the > > > Instrumentation API to perform a call on the UI thread. > > > > > On Mon, Aug 24, 2009 at 6:08 PM, android.bu...@gmail.com < > > > > > android.bu...@gmail.com> wrote: > > > > > > no one know it? > > > > > > On Aug 24, 11:01 am, "android.bu...@gmail.com" > > > > wrote: > > > > > I am using ActivityInstrumentationTestCase2 to do some test for an > > > > > activity. > > > > > I get a button in the setUp() method like this: > > > > > protected void setUp() throws Exception { > > > > > super.setUp(); > > > > > act = getActivity(); > > > > > > > > > > btn = (Button)act.findViewById( R.id.bike_button ); // this > > > > > button has been defined in layout > > > > > } > > > > > Then I use this button to perform a click in a test method like > this: > > > > > public void testBikeButton(){ > > > > > //click the bike button > > > > > btn.performClick(); > > > > > ..} > > > > > > > When run it as android junit, there will be an error like this: > > > > > "android.view.ViewRoot$CalledFromWrongThreadException: Only the > > > > > original thread that created a view hierarchy can touch its views. > > > > > at android.view.ViewRoot.checkThread(ViewRoot.java:2440) > > > > > at android.view.ViewRoot.playSoundEffect(ViewRoot.java:2261) > > > > > at android.view.View.playSoundEffect(View.java:7457) > > > > > at android.view.View.performClick(View.java:2178) > > > > > at > com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > > > > 40) > > > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > > > at android.test.InstrumentationTestCase.runMethod > > > > > (InstrumentationTestCase.java:191) > > > > > at android.test.InstrumentationTestCase.runTest > > > > > (InstrumentationTestCase.java:181) > > > > > at android.test.ActivityInstrumentationTestCase2.runTest > > > > > (ActivityInstrumentationTestCase2.java:175) > > > > > at > android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164) > > > > > at > android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151) > > > > > at android.test.InstrumentationTestRunner.onStart > > > > > (InstrumentationTestRunner.java:418) > > > > > at android.app.Instrumentation$InstrumentationThread.run > > > > > (Instrumentation.java:1520)" > > > > > > > How do I fix it? > > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@android.com > > > > > Note: please don't send private questions to me, as I don't have
[android-developers] How to know software keyboard is on screen or not?
Hi, Does anyone knows how to know current software keyboard is on screen or not in program? 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: ADC 2 Submission Site -- Now live
Dan, a little larger window would be very useful. May be an extension by a week or two .. as the site opened on 24th late night only. You could decide to pass it over to market .. say after 15th sept. And if announcing an extension, please let us know earlier than 28th so that we can work accordingly. Regards, R.S On Aug 25, 4:20 am, Dan Morrill wrote: > This is correct: upgraded versions of apps submitted to Market before 1 > August are ineligible; this includes UI upgrades. > - Dan > > On Mon, Aug 24, 2009 at 4:09 PM, mgpc wrote: > > > Hi Ehab, > > > The rules say: > > > "An Entry (or substantially similar application by the same > > Participant) must not have previously been publicly available through > > the Android Market prior to August 1, 2009. For the avoidance of > > doubt, any beta, demo, trial, or incomplete version of an application > > that was submitted to and posted in the Android Market prior to August > > 1, 2009 is ineligible" > > > So it sounds like an older app with new features will not be eligible. > > > On Aug 24, 8:18 pm, Ehab Bassilli > > wrote: > > > Ok, thanks david. But what if the release after 1st august had new and > > > different features? > > > > On Aug 24, 2009 7:44 PM, "David McLaughlin (Android Advocate)" < > > > > d...@google.com> wrote: > > > > Hi, > > > > Per the official ADC2 website, "The ADC 2 contest is open only to > > > applications that have not been made publicly available through the > > > Android Market prior to August 1, 2009." Thus, you may publish your > > > new release to the Market and submit to the ADC2, provided of course > > > that you had not previously submitted the app (even with a different > > > UI) to the Market prior to August 1. > > > > Thanks, > > > David > > > > On Aug 24, 11:25 am, Ehab Bassilli > > > wrote: > > > > > Hello, > > I have a question. > > I published my app on the android > > market > > > > to get feedback and see... > > > > > d...@google.com> wrote: > > So...will ADC2 apps be used by people > > outside > > > > of ADC2 judging? > > No,... --~--~-~--~~~---~--~~ 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: Writing a Bitmap to a a outputstream
This is what i am doing can u please guide me as to what should be corrected here, On opening the file, mBitmap = BitmapFactory.decodeStream(concontentresolver.openInputStream (uri)); //to create a mutable bitmap out of it mBitmap = Bitmap.createScaledBitmap(mBitmap,mBitmap.getwidth (),mBitmap.getHeight(), true); //also tried, for making the bitmap mutable //mBitmap =mBitmap.copy(Config.ARGB_, true); After i make changes to the bitmap i try to save it by, OutputStream out = getContentResolver().openOutputStream(file); if (type.equalsIgnoreCase("image/jpeg")) { mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out); } else { mBitmap.compress(Bitmap.CompressFormat.PNG, 100, out); } out.flush(); out.close(); But what i can see is that when i save it in a jpeg format there is a loss in quality, and when i open a jpeg file for 3-4 time and save it, the image is totally blurred. And the size of the jpeg image file increases each time i save the image. When i save it using Bitmap.CompressFormat.PNG the image is saved properly, please guide me. Is there any process that i have to do while opening a jpeg file and writing it to a bitmap? Regards, R.Karthik --~--~-~--~~~---~--~~ 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: ADC 2 Submission Site -- Now live
Dan, Sorry to be a pain but what about upgraded versions of apps sumitted after aug 1st? I.e. the new features and ui were available after aug 1st? Thanks On Aug 25, 2009 4:21 AM, "Dan Morrill" wrote: This is correct: upgraded versions of apps submitted to Market before 1 August are ineligible; this includes UI upgrades. - Dan On Mon, Aug 24, 2009 at 4:09 PM, mgpc wrote: > > > Hi Ehab, > > The rules say... You received this message because you are subscribed to the Google Groups "Android Developers" grou... --~--~-~--~~~---~--~~ 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: ADC 2 Submission Site -- Now live
On 25 Sie, 10:08, RS wrote: > Dan, a little larger window would be very useful. > May be an extension by a week or two .. as the site opened on 24th > late night only. > You could decide to pass it over to market .. say after 15th sept. Oh, no my dear. They did that year ago. NOT AGAIN, Dan, you hear me ?. I wasted ALL my vacations for hard work 10-16 hours per day, and making "larger window" will be just INSULT for me and many people, who have working, when they should rest. We have the same amount of time, just 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 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: Why there is an error when I doing unit test with ActivityInstrumentationTestCase2?
Hi Dianne, The following code can work well in my computer: @UiThreadTest public void testBikeButton(){ //click the bike button bike_btn.performClick(); .. //I delete the following code, then it works //getInstrumentation().waitForIdleSync(); .. } So what I mean is that, in which case we need to use waitForIdleSync (), and how to use this method? On Aug 25, 3:57 pm, Dianne Hackborn wrote: > Annotations have nothing to do with this, waitForIdleSync() has nothing to > do with this, it's just a basic aspect of Android that you can only call on > to UI objects from the thread running the UI. Use this: > > http://developer.android.com/reference/android/app/Instrumentation.ht... > > On Tue, Aug 25, 2009 at 12:43 AM, android.bu...@gmail.com < > > > > > > android.bu...@gmail.com> wrote: > > > I have found the root cause of this problem. > > That's because of getInstrumentation().waitForIdleSync() > > I have seen someone else use waitForIdleSync() after UI action, I want > > to know if it is necessary, and in which case we need to call this > > method? > > If we want to call it, how do we call it correctly? > > > On Aug 25, 3:08 pm, "android.bu...@gmail.com" > > wrote: > > > Hi Dianne, > > > I have tried to annotate the test method with UiThreadTest, but still > > > it doesn't work, the trace log is: > > > java.lang.RuntimeException: This method can not be called from the > > > main application thread > > > at android.app.Instrumentation.validateNotAppThread > > > (Instrumentation.java:1500) > > > at android.app.Instrumentation.waitForIdleSync(Instrumentation.java: > > > 397) > > > at com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > > 45) > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > at android.test.InstrumentationTestCase.runMethod > > > (InstrumentationTestCase.java:191) > > > at android.test.InstrumentationTestCase.access$000 > > > (InstrumentationTestCase.java:36) > > > at android.test.InstrumentationTestCase$2.run > > > (InstrumentationTestCase.java:171) > > > at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java: > > > 1538) > > > at android.os.Handler.handleCallback(Handler.java:587) > > > at android.os.Handler.dispatchMessage(Handler.java:92) > > > at android.os.Looper.loop(Looper.java:123) > > > at android.app.ActivityThread.main(ActivityThread.java:3948) > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > > > (ZygoteInit.java:782) > > > at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) > > > at dalvik.system.NativeStart.main(Native Method) > > > > So what's the problem? And is there any other method I can use to > > > perform a call on UI thread? > > > > On Aug 25, 9:40 am, Dianne Hackborn wrote: > > > > > As the error says, you are calling peformClick() for a different thread > > than > > > > the UI thread (here the instrumentation thread). You can use the > > > > Instrumentation API to perform a call on the UI thread. > > > > > On Mon, Aug 24, 2009 at 6:08 PM, android.bu...@gmail.com < > > > > > android.bu...@gmail.com> wrote: > > > > > > no one know it? > > > > > > On Aug 24, 11:01 am, "android.bu...@gmail.com" > > > > > wrote: > > > > > > I am using ActivityInstrumentationTestCase2 to do some test for an > > > > > > activity. > > > > > > I get a button in the setUp() method like this: > > > > > > protected void setUp() throws Exception { > > > > > > super.setUp(); > > > > > > act = getActivity(); > > > > > > > > > > > > btn = (Button)act.findViewById( R.id.bike_button ); // this > > > > > > button has been defined in layout > > > > > > } > > > > > > Then I use this button to perform a click in a test method like > > this: > > > > > > public void testBikeButton(){ > > > > > > //click the bike button > > > > > > btn.performClick(); > > > > > > ..} > > > > > > > When run it as android junit, there will be an error like this: > > > > > > "android.view.ViewRoot$CalledFromWrongThreadException: Only the > > > > > > original thread that created a view hierarchy can touch its views. > > > > > > at android.view.ViewRoot.checkThread(ViewRoot.java:2440) > > > > > > at android.view.ViewRoot.playSoundEffect(ViewRoot.java:2261) > > > > > > at android.view.View.playSoundEffect(View.java:7457) > > > > > > at android.view.View.performClick(View.java:2178) > > > > > > at > > com.liufeng.vehicle.test.BikeTests.testBikeButton(BikeTests.java: > > > > > > 40) > > > > > > at java.lang.reflect.Method.invokeNative(Native Method) > > > > > > at android.test.InstrumentationTestCase.runMethod > > > > > > (InstrumentationTestCase.java:191) > > > > > > at android.test.InstrumentationTestCase.runTest > > > > > > (InstrumentationTestCase.java:181) > > > > > > at android.test.ActivityInstrumentationTestCase2.runTest > > > > > > (ActivityInstrumentationTestCase2.java:175)
[android-developers] Please, some layout help.
Hello list, i think i need some help with a layout issue. I have three views, two TextViews (header and footer) and in between a ListView. They are rendered good, in portait mode. When i go into landscape mode, the ViewList is gone. Switching back to portait mode and the ViewList is still goneHere is my xml. http://schemas.android.com/apk/res/android"; android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> Any ideas why this is happening? Thnx Jiri --~--~-~--~~~---~--~~ 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] Regarding streaming files
If i am using the streaming API's provided by the SDK that is mMediaPlayer.setDataSource(url); mMediaPlayer.prepareAsync(); If we are using this and if there are some max file transfer per connection rules set by the connection provider,does the SDK automatically take care of such issues where in different carriers have different file transfers per connection limit. What i really want to know is say i have an url for a song for streaming ,do i need to send it in chunks because of the limitations of the carrier settings.When is the program given in the following link useful otherwise? http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/ 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: CTS fails for java.io.OutputStreamWriterTest
Anybody here? --~--~-~--~~~---~--~~ 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 compatible with Skype & yahoo for Android
Hi All, I want to develope a application in Android just like Fring in which I can chat using skype & yahoo also. I found that using XMPP it is possible to connect the app with the gtalk server & we can chat on that. But I want the APIs for the Skype & Yahoo that are compatible with Android OS. I have done some R&D on that & found that skype APIs are available for windows, mac & linux development but there is not any description about Android OS. Can anyone give me any useful link or code sample which can be useful to me? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Spinner custom view bug
Good morning, Found a little bug in Spinner widget when using a ImageView (or widget that doesn't have a baseline) as view for Spinner. Spinner source code: @Override public int getBaseline() { View child = null; if (getChildCount() > 0) { child = getChildAt(0); } else if (mAdapter != null && mAdapter.getCount() > 0) { child = makeAndAddView(0); // TODO: We should probably put the child in the recycler } if (child != null) { return child.getTop() + child.getBaseline(); } else { return -1; } } ImageView doesn't have valid baseline, so when Spinner shows on device the Spinner widget is drawn to low. Overriding getBaseLine() in ImageView and returning 15 seem to positioning the Spinner widget correctly. Does anybody know how i can calculate the value that should be returned by getBaseLine()? Kind regards, Twan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
FLYERS
Dear Sir My name is Mr. Richard Garry and i am interested in purchasing Flyers which i want to donate to a Church .I am lookong for 40,000 pieces of the Flyers with the size 8.5"x11 in full paper and i want you to the art work in the atachment with a Red ink and with a doubles sided on the Flyers and the colour should be white paper .I want you to print them on both side ...I want you to send me an email and let me know if you can get them for me and also get me the total cost including Tax and i am going to handle the Shipping myself .Also let me know how you accept your payment before we proceed with the order .I also need you full name and phone number so that i can give you a call when necessary .Do not hesitate to contact me back regarding this order .I will be wating for your soonest response .Thank you .. Best regards, Mr. Garry
[android-developers] Re: China to have there own Android Market?
they will upload your app whether you allow them or not... they don't care if you say no... On Aug 7, 10:30 am, biAji wrote: > On Aug 6, 1:27 pm, CraigsRace wrote: > > > > As far as I know .. NetDragon is an evil company.. > > > Really, why do you say that? I googled them, Electronic Arts are > > working with them. They pulled in $595 million last year. > > Ok, as a developer in china. I myself don't like their company. They > always act as bluffer than anyone do real work. > > for example, they build a android bbs and release some roms mod from > xda. and they never give the source out and declare they all do it by > themself... > > > > OpHone Sdk is Android 1.0 you have to port it to Android 1.0 for it work > > > I asked them about the OPhone SDK only working on 1.1, no response. > > yes, it's true. you have to care about the compatibility more > carefully. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Application run on an emulator cannot fix the screen size of a real device
Hi guys, My application has an activity to display a textview on the screen, and it ran well on the emulator (it can fulfill the whole screen). However, when I try to run it on the device with the resolution 640x480, my application cannot fix the whole screen of this device (just keep the size as of 480x320). I tried to set the fullscreen flag to hide the title bar, this is implemented in 'onCreate()' method of the activity as below: this.getWindow().setFlags (WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); And I also set the layout for .xml file like this: http://schemas.android.com/apk/res/ android" android:id="@+id/root" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/black"> I don't know why my application cannot fulfill the whole screen as expected. Can anyone find out the reason why. Best regards, Minh --~--~-~--~~~---~--~~ 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 is the approx time taken to register as a developer and to be able to publish apps on the Android Market?
Hi All What is the approx time taken to register as a developer and to be able to publish apps on the Android Market? Do we need to wait for any approval from google to be able to publich the apps once registered as a developer and a Google checkout merchant? Thanks in advance Soniya --~--~-~--~~~---~--~~ 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 approx time taken to register as a developer and to be able to publish apps on the Android Market?
<> its simple 15 mins max. <> No.u just need to agree to the terms and conditions On Tue, Aug 25, 2009 at 5:11 PM, soniya wrote: > > Hi All > > What is the approx time taken to register as a developer and to be > able to publish apps on the Android Market? > > Do we need to wait for any approval from google to be able to publich > the apps once registered as a developer and a Google checkout > merchant? > > Thanks in advance > Soniya > > > --~--~-~--~~~---~--~~ 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 approx time taken to register as a developer and to be able to publish apps on the Android Market?
Heyy thanks for such a quick reply. On Aug 25, 4:43 pm, for android wrote: > < able to publish apps on the Android Market?>> > its simple 15 mins max. > < the apps once registered as a developer and a Google checkout > merchant?>> > No.u just need to agree to the terms and conditions > > > > On Tue, Aug 25, 2009 at 5:11 PM, soniya wrote: > > > Hi All > > > What is the approx time taken to register as a developer and to be > > able to publish apps on the Android Market? > > > Do we need to wait for any approval from google to be able to publich > > the apps once registered as a developer and a Google checkout > > merchant? > > > Thanks in advance > > Soniya- 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] Running listeners in separate threads (=> not in the main thread)
Hi everybody, I would like to know how to run a listener on an isolated thread. Because I would like to use a LocationListener and make some calculations in the main thread. So the LocationListener would be "slow down", because of those calculations. Is it possible to have it run in a different thread? Or is it by default in a separate thread? Thanks, Best regards, D. --~--~-~--~~~---~--~~ 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 know software keyboard is on screen or not?
probably this(i have not tried it though) android-sdk-windows-1.5_r1/docs/reference/android/view/inputmethod/InputMethodManager.html#isActive(android.view.View) On Tue, Aug 25, 2009 at 1:33 PM, aby wrote: > > Hi, > Does anyone knows how to know current software keyboard is on screen > or not in program? > 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: How to use the RotationMatrix, actually how to get it
To deep copy an array, you can use System.arraycopy(..) http://developer.android.com/reference/java/lang/System.html#arraycopy%28java.lang.Object,%20int,%20java.lang.Object,%20int,%20int%29 System.arraycopy(b, 0, a, 0, 3); but for a float array of length 3, you can simply write a[0]=b[0]; a[1]=b[1]; a[2]=b[2]; or for (i=0; i<3; i++) a[i] = b[i]; I've never tried to profile which of the 3 ways is actually the fastest on a real Android device. If someone has the time, please try all 3 in a tight loop and report back :-) (there is also for(i=3; i-->0;) a[i] = b[i]; which may be even faster?) Note: all assume that you have initialized a already beforehand, a = new float[3]; Peli On Aug 25, 8:24 am, Rud wrote: > Hi, > > The code is originally from my Blog. The reason for the clone is > explained there. > > I admit to not having worked with Java enough to have the deep > understanding of how containers deal with objects. In my application I > ran into a problem trying to make a copy of an array and had to write > my own copy. > > I had a set of data that gets consumed while the app runs. I wanted to > reset that data at times. I put the data in an array and then cloned > it to the working array. I was surprised when the original data got > changed when the cloned data was changed. I also realized that the > sensor code wasn't doing what I thought it was but haven't taken the > time to adjust it. > > How in Java do you actually make a deep copy of an array? > > Rudhttp://mysticlakesoftware.blogspot.com/ > > On Aug 21, 7:07 am, Peli wrote: > > > > = event.values.clone(); > > > Note that this creates new objects constantly that have to be garbage > > collected later. Depending on the kind of application, it may be > > better to just copy the values into a persisting array. > > > Peliwww.openintents.org > > > On Aug 21, 4:06 am, mscwd01 wrote: > > > > Heres my code, which works: > > > > public void onSensorChanged(SensorEvent event) { > > > > Sensor sensor = event.sensor; > > > int type = sensor.getType(); > > > switch (type) { > > > case Sensor.TYPE_MAGNETIC_FIELD: > > > mags = event.values.clone(); > > > isReady = true; > > > break; > > > case Sensor.TYPE_ACCELEROMETER: > > > accels = event.values.clone(); > > > break; > > > case Sensor.TYPE_ORIENTATION: > > > orients = event.values.clone(); > > > break; > > > } > > > > if (mags != null && accels != null && isReady) { > > > isReady = false; > > > > SensorManager.getRotationMatrix(R, I, accels, mags); > > > SensorManager.remapCoordinateSystem(R, > > > SensorManager.AXIS_Y, SensorManager.AXIS_MINUS_X, outR); > > > SensorManager.getOrientation(outR, values); > > > > azimuth = > > > getAzimuth(-convert.radToDeg(values[0])); > > > pitch= convert.radToDeg(values[1]); > > > roll = -convert.radToDeg(values[2]); > > > > } > > > > } > > > > On Aug 21, 2:39 am, Mike Collins wrote: > > > > > I have a sensor event handler that gets fired and I have no problem > > > > getting and processing acceleration readings. However this code > > > > always fails. > > > > > if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) > > > > { > > > > float[] geomagnetic = new float[3]; > > > > geomagnetic[0] = geomagnetic[1] = > > > > geomagnetic[2] = 0; > > > > > float[] r = new float[9]; > > > > float[] I = new float[9]; > > > > boolean b = SensorManager.getRotationMatrix(r, > > > > I, event.values.clone > > > > (), event.values.clone()); > > > > if ( ! b) > > > > { > > > > Log.e(LOG_TAG, "getRotationMatrix > > > > failed"); > > > > return; > > > > } > > > > ... > > > > > tia, > > > > mike- 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: bluetooth use in android
Dianne, I was very happy to see Stefano's contribution as I wanted to get a head start on developing some ideas requiring interfacing Android to hardware via bluetooth. Yes I'm very aware it can break at any time. I am really looking forward to the official Android Bluetooth APIs for DUN, SPP etc and hope the wait was worth it. Can you comment on what the ETA on that is? Joe. PS: Wondering (half jokingly) will there ever be Zigbee support in Android phones :-) On Aug 23, 6:43 pm, Dianne Hackborn wrote: > Hi Stefano, I know you already say this in your site, but just to be extra > clear -- the code here is accessing private APIs, so we make no guarantees > about it working in future versions of the platform. There is a very good > chance that applications using it will break at a platform update. > > > > On Sun, Aug 9, 2009 at 7:49 AM, Stefano Sanna wrote: > > > Hi. > > > On Sun, Aug 9, 2009 at 1:29 PM, Honest wrote: > > > > I want to use bluetooth APIS in my android application. I could found > > > the API related to wifi but i could not find the API for bluetooth. > > > Can some one tell me how can i use it ? any links for API docs and > > > code snippt will be much useful to me. > > > I've written an experimental Bluetooth API that provides Bluetooth > > stack on/off, device discovery and rfcomm (SPP) client connections. It > > does not need to get root access on the device and it have been > > successfully tested on firmware 1.1 and 1.5, on HTC Dream, HTC Magic > > and Samsung Galaxy. > > > This Bluetooth API and a sample application (published on the Android > > Market as "Bluetooth Samples") is published under Apache 2.0 license > > at: > > >http://code.google.com/p/android-bluetooth/ > > > Feel free to contact me if you need further details. > > > Ciao, > > Stefano. > > > -- > > Stefano Sanna > > gerda...@gmail.com (Skype: gerdavax) > > > Personal blog:http://www.gerdavax.it > > Linkedin profile:http://www.linkedin.com/in/gerdavax > > QuadraSpace Project:http://www.quadraspace.org > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Please, some layout help.
I recommend using DroidDraw ...compare how it does what you are trying to do OR paste your code into it and try tweaking. http://www.droiddraw.org/ Jason Van Anden BubbleBeats, LLC http://www.bubblebeats.com On Tue, Aug 25, 2009 at 6:17 AM, Jiri wrote: > > Hello list, > > i think i need some help with a layout issue. I have three views, two > TextViews (header and footer) and in between a ListView. They are > rendered good, in portait mode. When i go into landscape mode, the > ViewList is gone. Switching back to portait mode and the ViewList is > still goneHere is my xml. > > > http://schemas.android.com/apk/res/android"; >android:orientation="vertical" >android:layout_width="fill_parent" >android:layout_height="wrap_content"> >android:id="@+id/header" >android:layout_width="fill_parent" >android:layout_height="wrap_content" >android:gravity="top" >android:text="HEADER" > /> >android:orientation="vertical" >android:layout_width="fill_parent" >android:layout_height="fill_parent" >android:layout_below="@+id/header" >android:layout_above="@+id/footer"> >android:id="@+id/ListView01" >android:layout_width="wrap_content" >android:layout_height="fill_parent" >android:divider="@null" >android:fadingEdge="none"> > > >android:id="@+id/footer" >android:layout_alignParentBottom="true" >android:layout_width="fill_parent" >android:layout_height="wrap_content" >android:text="FOOTER" > /> > > > Any ideas why this is happening? > > Thnx > > Jiri > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How do you populate a spinner from a cursor
How do you populate a spinner from a cursor accessing an SQLite database? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to manage service lifecycle when device kills it due to low memory
Hi! I have a service that polls for data. To indicate this to the user I have a persistent notification in the statusbar. In some cases when the device goes low on memory it destroys the service but OnDestroy is not called. Later when there is available memory OnCreate is called. Is this normal behavior? I had hoped that OnDestroy would be called to I could remove the notification in the statusbar. Now the user thinks that the service is still running, while it has been stopped by the OS. In order to restart the polling how do I know that the OnCreate is really a restart event and not first time creation of the service? I thought about checking for the presence of the notification in the statusbar, but I couldn't find a API to check if a notification was showing or not. I have not tried "SetForeground" on the service, since the service isn't that important to the user, but maybe that would minimize the problem... -Christer --~--~-~--~~~---~--~~ 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: URL url
I am also get this error. Did you find solution? On Jul 29, 8:57 pm, Dato bera wrote: > ok but when i write like this Exeption trows that Unable to connect server, > can you help me to make connection to ftp server? > > 2009/7/29 Mark Murphy > > > > > > > dario wrote: > > > can someone tell me how must be URL > > > > is this wright? > > > URL url = new URL("ftp://user:p...@ftp://user.freewebhostx.com/";); > > > That's not really an Android question. > > > But it should probably be: > > > ftp://user:p...@user.freewebhostx.com/ > > > -- > > Mark Murphy (a Commons Guy) > >http://commonsware.com|http://twitter.com/commonsguy > > > Need help for your Android OSS project?http://wiki.andmob.org/hado- 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: SingleTask...
hm... okay, so I check for null in my onCreate() method. public void onCreate(Bundle savedInstanceData) { if (savedInstanceData == null) { // do everything I did before. // show splash screen super.onCreate(savedInstanceState); } } However, now if I'm in my app, I click on "home", and then click on the icon again, it behaves as expected, it simply brings the app back in the expected state. If I hit "back" and then click on the icon again, it behaves like I launched a brand new app - shows the splash screen, etc... On Aug 24, 11:24 pm, Dianne Hackborn wrote: > The simple fact that it is non-null tells you. And you can have placed > anything else you want in there in onSaveInstanceState() for whatever other > data you want to retain. See here: > > http://developer.android.com/guide/topics/fundamentals.html#actlife > > and here: > > http://developer.android.com/reference/android/app/Activity.html > > > > On Mon, Aug 24, 2009 at 10:51 PM, sdphil wrote: > > > "You can use the state passed in to onCreate() to determine whether > > you are starting for the first time or not." > > > How do I do that? > > > I'm looking at onCreate -- > > > public void onCreate(Bundle savedInstanceState) { > > > and I look at savedInstanceState, nothing jumps out at me... > > > On Aug 24, 10:39 pm, Dianne Hackborn wrote: > > > If you just want pressing back to not close the activity, just catch the > > > BACK key and call Activity.moveTaskToBack() instead of letting it do the > > > default behavior (of calling finish()). > > > > There is no need to use launchMode nor alwaysRetainTaskState. > > > > However, you DO need to deal with the normal lifecycle behavior -- in > > > particular, when you are in the background, regardless of how this > > happened, > > > the system is free to kill your process, so when the user next returns to > > > your app a new instance of your activity will be created. You can use > > the > > > state passed in to onCreate() to determine whether you are starting for > > the > > > first time or not. > > > > Also, a "quit" menu on an android application is not normal, expected, > > nor > > > desired. Please don't do it; there is no need. I think you will have a > > > much better time if you try to design your app to follow the kind of flow > > > shown by the existing applications, rather than trying to make it work > > like > > > a desktop application. > > > > For example: you could save your current state to persistent storage when > > > the user leaves the app, and restore it when they return, so they know > > they > > > will always come back to the same thing. If it makes for them to > > actually > > > throw away that state, you could have an option for them to reset the app > > so > > > they can decide to do that at the time they want, rather than having to > > > decide earlier on to have this happen as a side-effect of some unusual > > > "quit" command. > > > > On Mon, Aug 24, 2009 at 10:16 PM, sdphil > > wrote: > > > > > I want my application to work like this: > > > > > 1. When the user launches the application, it starts up. > > > > 2. When the user hits back, or home, the application is still running > > > > (although not visible). > > > > 3. If the user hits "menu->quit" the application exits cleanly. > > > > 4. If the user starts the application, hits "home" and selects the > > > > application icon *again*, I want it to bring up the existing insance > > > > of the application with whatever activity state it had before it left. > > > > 5. I do not ever want more than one instance of my application to be > > > > running (i.e. singleton). > > > > 6. I always want to retain activity stack/state. when you come back > > > > into the application, it's like you never left. > > > > > > > > > http://schemas.android.com/apk/res/android"; > > > > package="com.company.gui" > > > > android:versionCode="1" > > > > android:versionName="1.0"> > > > > > > > android:label="@string/app_name" > > > > android:debuggable="true"> > > > > > > > android:launchMode="singleTask" > > > > android:alwaysRetainTaskState="true" > > > > android:label="@string/app_name" > > > > android:screenOrientation="portrait" > > > > android:theme="@android:style/Theme.NoTitleBar"> > > > > > > > > > > > > > > > android:name="android.intent.category.LAUNCHER" /> > > > > > > > > > > > > > > > > android:label="@string/app_name"> > > > > > > > > > > > > > > > > > > > > permission> > > > > > > > > > my main activity onCreate() looks like this: > > > > > startActivityForResult( new Intent(this, SplashScreen.class), > > > > SPLASH_REQUEST_ID ); > > > > new Thread() { > > > > public void run() { > > > >
[android-developers] Re: URL url
URL have Exception ! you must catch() it before! 2009/8/25 engin > > I am also get this error. Did you find solution? > > On Jul 29, 8:57 pm, Dato bera wrote: > > ok but when i write like this Exeption trows that Unable to connect > server, > > can you help me to make connection to ftp server? > > > > 2009/7/29 Mark Murphy > > > > > > > > > > > > > dario wrote: > > > > can someone tell me how must be URL > > > > > > is this wright? > > > > URL url = new URL("ftp://user:p...@ftp://user.freewebhostx.com/";); > > > > > That's not really an Android question. > > > > > But it should probably be: > > > > > ftp://user:p...@user.freewebhostx.com/ > > > > > -- > > > Mark Murphy (a Commons Guy) > > >http://commonsware.com|http://twitter.com/commonsguy > > > > > Need help for your Android OSS project?http://wiki.andmob.org/hado-Hide > > > quoted text - > > > > - Show quoted text - > > > -- SIDIBE Ali-Broma --~--~-~--~~~---~--~~ 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] Writting and AIDL between a service and an applciation.
Cordialement Thierry GAYET NextInnovation.org +33(0)663.849.589 --~--~-~--~~~---~--~~ 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: Broken OpenGL texture output after resuming the app
Could someone on the Android graphics team comment on whether people should code around this or if people should ignore it because it has a good chance of being changed in a 1.5 update? I'm asking because I need to know what to tell developers in the next edition of "Hello, Android". The 1.5 version of the OpenGL example at http://www.pragprog.com/titles/eband/source_code exhibits this issue, but I hate to put in hacks for short-term problems because they cloud the examples and may be inefficient or even stop working in the future. Thanks, --Ed On Aug 21, 4:58 pm, Ed Burnette wrote: > I have opened Issue 3623 for this > problem.http://code.google.com/p/android/issues/detail?id=3623 --~--~-~--~~~---~--~~ 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] google maps question
Hello, I am displaying MAP and some point on it. But some how it is not displaying directly on particular point. Instead of it is displaying screen from which i have left previously. Can some one tell me how can i make display of the map on particular point. Another thing is i want to display line between two points of map how it is possible ? --~--~-~--~~~---~--~~ 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] Handset screen sizes
G1, Dream, Magic, Hero, Galaxy and more to come... Does anybody have a rundown of their screen sizes (and of some of the devices to come out)? --~--~-~--~~~---~--~~ 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: Running listeners in separate threads (=> not in the main thread)
Listeners are called back in the thread of the instance for which they registered. Usually this means that listeners' callback methods are run in the main GUI thread. If you want to do 'heavy' work when a callback to a listener is issued, you have to do it yourself. Your listener should start/resume an AsyncTask (or Future task created from ExecutorService), return immediately and your AsyncTask should do the 'heavy work and post the result back to the main GUI thread. On Aug 25, 8:04 am, DaminouU wrote: > Hi everybody, > > I would like to know how to run a listener on an isolated thread. > Because I would like to use a LocationListener and make some > calculations in the main thread. So the LocationListener would be > "slow down", because of those calculations. > > Is it possible to have it run in a different thread? Or is it by > default in a separate thread? > > Thanks, > > Best regards, > > D. --~--~-~--~~~---~--~~ 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 do you populate a spinner from a cursor
Something like this should work: Cursor cur = managedQuery(People.CONTENT_URI, PROJECTION, null, null); SimpleCursorAdapter adapter = new SimpleCursorAdapter( this, android.R.layout.simple_spinner_item, cur, new String[] {People.NAME}, new int[] {android.R.id.text1}); adapter.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 25, 5:54 am, MMC2 wrote: > How do you populate a spinner from a cursor accessing an SQLite > database? --~--~-~--~~~---~--~~ 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: URL url
I did not understand what you mean? On Aug 25, 5:03 pm, SIDIBE ALI BROMA wrote: > URL have Exception ! you must catch() it before! > > 2009/8/25 engin > > > > > > > > > I am also get this error. Did you find solution? > > > On Jul 29, 8:57 pm, Dato bera wrote: > > > ok but when i write like this Exeption trows that Unable to connect > > server, > > > can you help me to make connection to ftp server? > > > > 2009/7/29 Mark Murphy > > > > > dario wrote: > > > > > can someone tell me how must be URL > > > > > > is this wright? > > > > > URL url = new URL("ftp://user:p...@ftp://user.freewebhostx.com/";); > > > > > That's not really an Android question. > > > > > But it should probably be: > > > > > ftp://user:p...@user.freewebhostx.com/ > > > > > -- > > > > Mark Murphy (a Commons Guy) > > > >http://commonsware.com|http://twitter.com/commonsguy > > > > > Need help for your Android OSS > > > > project?http://wiki.andmob.org/hado-Hidequoted text - > > > > - Show quoted text - > > -- > SIDIBE Ali-Broma- 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: Adding Threshold to Bitmap Images
You can create a color-filter with color-matrix that will give the effect of 'Threshold'. To get the correct values for the color-matrix, i used this web-site: http://www.quasimondo.com/archives/000565.php and the sources you can find here when you click on "Download the source files here." This will download a zip file. Open up ColorMatrix.as and look for the method 'threshold'. It should be easy to translate this into Java. On Aug 24, 9:37 pm, Abdul Mateen wrote: > Yes, probably the same. > On Mon, Aug 24, 2009 at 7:42 PM, Streets Of Boston > wrote: > > > > > > > You mean 'threshold' as a color-effect (turning a pic into a black and > > white (no grey) image)? > > > On Aug 24, 1:09 am, Abdul Mateen wrote: > > > Hi, > > > I have a question about adding a threshold images into bitmap images, can > > > this be possible with the Android SDK, if not can anyone here generate > > the > > > Algorithm for that to add threshold to images. > > > > Thank You, > > > Abdul Mateen.- 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] Problem to communicate with a service from an application
Hi, i have some problem to communicate with a service from an Android application. The service is in a first package "package com.myService" and the application in another on "package com.myApplication". My service work and start well but my next step is to add an AIDL interface to external applications. I have tried to follow the recomandation described here : http://developer.android.com/guide/developing/tools/aidl.html, but i have still the following error (given in the log service): W/ActivityManager( 568): Unable to start service Intent { action=com.MyApplication.IBootstrapService }: not found My AIDL defined in both packages is : interface IMyservice { String GetVal1(); String GetVal2(); // Get the status of the public API int getStatus(); } About the AndroidManifest.xml files : >From the service : package="com.Myservice" android:versionCode="1" android:versionName="1.0"> >From the application : package="com.MyApplication" android:versionCode="1" android:versionName="1.0"> Why in each example, there is an application AND a service in the same package ? Is is mandatory to do this ? Regards Thierry GAYET NextInnovation.org +33(0)663.849.589 --~--~-~--~~~---~--~~ 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: Writing a Bitmap to a a outputstream
If you write a JPG, information is written with a loss. Always. Even with quality=100, some loss will occur. If you do this repeatedly, losses in image-data will compound. Why not use the PNG format? Why do you need to write a JPG? On Aug 25, 4:23 am, karthikr wrote: > This is what i am doing can u please guide me as to what should be > corrected here, > > On opening the file, > > mBitmap = BitmapFactory.decodeStream(concontentresolver.openInputStream > (uri)); > //to create a mutable bitmap out of it > mBitmap = Bitmap.createScaledBitmap(mBitmap,mBitmap.getwidth > (),mBitmap.getHeight(), true); > //also tried, for making the bitmap mutable > //mBitmap =mBitmap.copy(Config.ARGB_, true); > > After i make changes to the bitmap i try to save it by, > > OutputStream out = getContentResolver().openOutputStream(file); > if (type.equalsIgnoreCase("image/jpeg")) { > mBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);} else { > > mBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);} > > out.flush(); > out.close(); > > But what i can see is that when i save it in a jpeg format there is a > loss in quality, and when i open a jpeg file for 3-4 time and save it, > the image is totally blurred. And the size of the > jpeg image file increases each time i save the image. > When i save it using Bitmap.CompressFormat.PNG the image is saved > properly, please guide me. > > Is there any process that i have to do while opening a jpeg file and > writing it to a bitmap? > > Regards, > R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to change the color of the text frequently?
Hi friends, I would like to change the text color frequently which is drawn already. Actually, I have taken the app, AlphaBitmap from APIDemos. There, I draw some 10 lines. Now I would like to put the background as black, and the initial text color as white. after every 1 sec, each word in the line should be painted with yellow color. I did that, but didn't get what I needed. Can any one please help me. Thansk, 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] are SharedPreferences really private?
I want preferences that only my application can access. When i read the docs for SharedPreferences it seemed to suggest that, but i just wanted to confirm (the word "shared" scares me :) ). tia. --~--~-~--~~~---~--~~ 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: China to have there own Android Market?
They also operate jailbreak iPhone apps and pirated iPhone apps, if you so care. --~--~-~--~~~---~--~~ 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] GL11 Implementation Issues
Regarding the support or lack of support for OpenGL ES 1.1. I know that officially the emulator and also the G1 device do not support OpenGL 1.1. And I suppose that officially, the SDK does support OpenGL 1.1 (the interface exists). Fact is that when GLSurfaceView creates an instance of a class that implements the GL interface, that class also implements the GL11 interface (this happens on both emulator and device). I suppose some of the functions in that class are implemented as empty stubs, or only prints some 'unsupported' log message. However, the fact is that the MSM7205 chip (ATI Imageon GPU) that is inside the G1, does support 'most' of the major features of OpenGL 1.1 standard. It supports GL_COMBINE modes, user defined clipping planes, etc... (I think also buffer objects) So when running on the G1 device I would expect that calling: gl.glTexEnvx( GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_COMBINE); Will pass through the interface and the drivers and reach H/W GPU and set the TEXTURE_ENV_MODE to COMBINE. But according to tests I've made it seems someone is intercepting that call on its way to the H/W GPU. Can anyone please clarify this issue? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how can close other activity?
It is a conceptual problem which you are trying to solve with controling an activity from another activity. The Android platform tries to simplify UI development in a way that it defined a life cycle for activities. If you try to control an activity from another activity you change the current implemented approach. Which would add also much more complexity. For example when would be a main activity allowed to close another activity? I think you should be able to change the logic of your program without having the need to control another activity. -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 24, 10:27 pm, Ethan wrote: > I think I have the same question. we use startActivity() or > startActivityForResult() to start Activity, but the two functions > return void, how can I get something to control(e.g close) the started > Activity from the original Activity ? --~--~-~--~~~---~--~~ 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] Chinese name writen in Sim Contact appears to be blank
hi, All I'm trying to write some contacts into sim contact. ContentValues cv = new ContentValues(); cv.put("tag", ""); cv.put("number", ""); cv.put("newTag", "中文"); cv.put("newNumber", "12345678"); getContentResolver().insert(SIM_CONTACTS_URI, cv); After you shut down the phone and check the sim contact inerted, the name "中文" become blank. Or, you setup the sim car into another phone, and check the contact, you will also find that the Chinese name has gone. Is there anyone encounters the same problem? Thank you all. Wood --~--~-~--~~~---~--~~ 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 approx time taken to register as a developer and to be able to publish apps on the Android Market?
On Aug 25, 5:43 am, for android wrote: > < able to publish apps on the Android Market?>> > its simple 15 mins max. > < the apps once registered as a developer and a Google checkout > merchant?>> > No.u just need to agree to the terms and conditions > > > > On Tue, Aug 25, 2009 at 5:11 PM, soniya wrote: > > > Hi All > > > What is the approx time taken to register as a developer and to be > > able to publish apps on the Android Market? > > > Do we need to wait for any approval from google to be able to publich > > the apps once registered as a developer and a Google checkout > > merchant? > > > Thanks in advance > > Soniya- Hide quoted text - > > - Show quoted text - I registered in 1 minute. --~--~-~--~~~---~--~~ 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: Writing a Bitmap to a a outputstream
My application reads existing images from the mobile, and allows the user to edit it and save it, if the image is in a jpeg format there is a loss in quality when the image is edited and saved. Is there any other way to open a jpeg image edit it and save it back? Also i have noted one more thing that whenever i make changes to an image the thumbnails of it are not getting updated in the gallery, any pointers on how to implement that? Thanks a lot in for your help. Regards, R.Karthik --~--~-~--~~~---~--~~ 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: Chinese name writen in Sim Contact appears to be blank
you should start a new thread rather than hijack this thread for something totally unrelated! On Aug 25, 8:26 am, "wangysh2009" wrote: > hi, All > > I'm trying to write some contacts into sim contact. > > ContentValues cv = new ContentValues(); > cv.put("tag", ""); > cv.put("number", ""); > cv.put("newTag", "中文"); > cv.put("newNumber", "12345678"); > getContentResolver().insert(SIM_CONTACTS_URI, cv); > > After you shut down the phone and check the sim contact inerted, the name > "中文" become blank. > Or, you setup the sim car into another phone, and check the contact, you will > also find that the Chinese name has gone. > > Is there anyone encounters the same problem? > > Thank you all. > > Wood --~--~-~--~~~---~--~~ 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 change the color of the text frequently?
How are you trying to do it? You need to call View.invalidate() to force the onDraw method of SampleView to be called at the time interval you wish it to be called. Could you paste your code modifications to the sample code, please ? Balwinder Kaur Open Source Development Center ·T· · ·Mobile· stick together The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Aug 25, 8:15 am, manoj wrote: > Hi friends, > > I would like to change the text color frequently which is drawn > already. > > Actually, I have taken the app, AlphaBitmap from APIDemos. > > There, I draw some 10 lines. > > Now I would like to put the background as black, and the initial text > color as white. > > after every 1 sec, each word in the line should be painted with yellow > color. > > I did that, but didn't get what I needed. > > Can any one please help me. > > Thansk, > 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: Writing a Bitmap to a a outputstream
That's what i'm doing with my app as well. And i have the same issue. As soon as your re-read a JPEG and save it again (modified or not), you will get loss of quality. There is no other way around it. In my app, i don't save over the original image. I do a 'save-as', more or less. At least the original image is preserved. In other words; i find the same problems that you find. As soon as i find out a way to solve these, i'll let you know :-) Updating gallery and thumbnails: Take a look at the MediaScannerConnection. (note that i have had mixed results with this class. rebooting or re- mounting your sd-card usually does the trick better) On Aug 25, 11:50 am, karthikr wrote: > My application reads existing images from the mobile, and allows the > user to edit it and save it, if the image is in a jpeg format there is > a loss in quality when the image is edited and saved. Is there any > other way to open a jpeg image edit it and save it back? > > Also i have noted one more thing that whenever i make changes to an > image the thumbnails of it are not getting updated in the gallery, any > pointers on how to implement that? > > Thanks a lot in for your help. > > Regards, > R.Karthik --~--~-~--~~~---~--~~ 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: Performant implementation of the overlay (like in myTracks)
I'm interested in the implementation of MyTracks/Google Maps marker overlay as well. I also used draw() method in itemizedOverlay class and the performance is horrible. 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: ADC 2 Submission Site -- Now live
I see no need to extend the deadline, it's been public since May 27th, if you're not ready by now, you'll probably never be ready. People have to learn that a deadline means something, extending it would only punish those who are ready and reward those who can't meet project goals on time. -John Coryat --~--~-~--~~~---~--~~ 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: Writing a Bitmap to a a outputstream
Thanks a lot for your advice. Ill update u on the same once i get a solution. Regards, R.Karthik --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem to communicate with a service from an application
> Hi, i have some problem to communicate with a service from an Android > application. > > The service is in a first package "package com.myService" and the > application in another on "package com.myApplication". > > My service work and start well but my next step is to add an AIDL > interface to external applications. > > I have tried to follow the recomandation described here : > http://developer.android.com/guide/developing/tools/aidl.html, but i have > still the following error (given in the log service): > > > W/ActivityManager( 568): Unable to start service Intent { > action=com.MyApplication.IBootstrapService }: not found You do not appear to have a service named com.MyApplication.IBootstrapService. > You will probably need an here, to associate some publicly-visible name with your service. Take a look at: http://bit.ly/k4Yy3 (above link points to an example in the source code to _The Busy Coder's Guide to *Advanced* Android Development_). > Why in each example, there is an application AND a service in the same > package ? Not all examples have this. > Is is mandatory to do this ? No. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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] gui controls...
i want to create a control that looks like this: +++ |X|Y | +++ And either "X" or "Y" is selected, but not both. Is that some variation of a ToggleButton? Also, i want to create something that looks like this +++ |Y| | +++ Where the right hand side is a slider type button, when you move it to the left, it reveals -- +++ | |N | +++ thoughts? tia. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: are SharedPreferences really private?
Yes they are, unless you pass MODE_WORLD_READABLE or MODE_WORLD_WRITEABLE the first time you retrieve them. On Tue, Aug 25, 2009 at 8:33 AM, sdphil wrote: > > I want preferences that only my application can access. > > When i read the docs for SharedPreferences it seemed to suggest that, > but i just wanted to confirm (the word "shared" scares me :) ). > > tia. > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: SingleTask...
Please read the documentation. As I said in my original post, this is for when your activity gets killed while it is in the background. When you press back, the default implementation is to finish() the activity so there is no longer any instance data. On Tue, Aug 25, 2009 at 6:57 AM, sdphil wrote: > > hm... okay, so I check for null in my onCreate() method. > > public void onCreate(Bundle savedInstanceData) { >if (savedInstanceData == null) { >// do everything I did before. >// show splash screen >super.onCreate(savedInstanceState); >} > } > > However, now if I'm in my app, I click on "home", and then click on > the icon again, it behaves as expected, it simply brings the app back > in the expected state. If I hit "back" and then click on the icon > again, it behaves like I launched a brand new app - shows the splash > screen, etc... > > On Aug 24, 11:24 pm, Dianne Hackborn wrote: > > The simple fact that it is non-null tells you. And you can have placed > > anything else you want in there in onSaveInstanceState() for whatever > other > > data you want to retain. See here: > > > > http://developer.android.com/guide/topics/fundamentals.html#actlife > > > > and here: > > > > http://developer.android.com/reference/android/app/Activity.html > > > > > > > > On Mon, Aug 24, 2009 at 10:51 PM, sdphil > wrote: > > > > > "You can use the state passed in to onCreate() to determine whether > > > you are starting for the first time or not." > > > > > How do I do that? > > > > > I'm looking at onCreate -- > > > > >public void onCreate(Bundle savedInstanceState) { > > > > > and I look at savedInstanceState, nothing jumps out at me... > > > > > On Aug 24, 10:39 pm, Dianne Hackborn wrote: > > > > If you just want pressing back to not close the activity, just catch > the > > > > BACK key and call Activity.moveTaskToBack() instead of letting it do > the > > > > default behavior (of calling finish()). > > > > > > There is no need to use launchMode nor alwaysRetainTaskState. > > > > > > However, you DO need to deal with the normal lifecycle behavior -- in > > > > particular, when you are in the background, regardless of how this > > > happened, > > > > the system is free to kill your process, so when the user next > returns to > > > > your app a new instance of your activity will be created. You can > use > > > the > > > > state passed in to onCreate() to determine whether you are starting > for > > > the > > > > first time or not. > > > > > > Also, a "quit" menu on an android application is not normal, > expected, > > > nor > > > > desired. Please don't do it; there is no need. I think you will > have a > > > > much better time if you try to design your app to follow the kind of > flow > > > > shown by the existing applications, rather than trying to make it > work > > > like > > > > a desktop application. > > > > > > For example: you could save your current state to persistent storage > when > > > > the user leaves the app, and restore it when they return, so they > know > > > they > > > > will always come back to the same thing. If it makes for them to > > > actually > > > > throw away that state, you could have an option for them to reset the > app > > > so > > > > they can decide to do that at the time they want, rather than having > to > > > > decide earlier on to have this happen as a side-effect of some > unusual > > > > "quit" command. > > > > > > On Mon, Aug 24, 2009 at 10:16 PM, sdphil > > > > wrote: > > > > > > > I want my application to work like this: > > > > > > > 1. When the user launches the application, it starts up. > > > > > 2. When the user hits back, or home, the application is still > running > > > > > (although not visible). > > > > > 3. If the user hits "menu->quit" the application exits cleanly. > > > > > 4. If the user starts the application, hits "home" and selects the > > > > > application icon *again*, I want it to bring up the existing > insance > > > > > of the application with whatever activity state it had before it > left. > > > > > 5. I do not ever want more than one instance of my application to > be > > > > > running (i.e. singleton). > > > > > 6. I always want to retain activity stack/state. when you come > back > > > > > into the application, it's like you never left. > > > > > > > > > > > > http://schemas.android.com/apk/res/android"; > > > > > package="com.company.gui" > > > > > android:versionCode="1" > > > > > android:versionName="1.0"> > > > > > > > > > android:label="@string/app_name" > > > > > android:debuggable="true"> > > > > > > > > > android:launchMode="singleTask" > > > > > android:alwaysRetainTaskState="true" > > > > > android:label="@string/app_name" > > > > > android:screenOrientation="portrait" > > > > > android:theme="@android:style/Theme.NoTitleBar"> > > > > >
[android-developers] What Happened to Android Discuss Group?
I also subscribe to the Android Discuss group. I clicked on a post in today's email update and got a message saying "Cannot find android- discuss ... There is no group named android-discuss". There were a couple of threads I was watching. Anyone know what happened? --~--~-~--~~~---~--~~ 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: App shutdown during package reinstall
On Aug 21, 5:09 pm, Mark Murphy wrote: > David Golombek wrote: > > We could kill our app proactively, as soon > > as we launch the ACTION_VIEW activity, but then we're left in a bad > > state if the user aborts. > > Why? In other words, what difference is there between: > > -- the user exits your application via back-button > -- Android closes up your application to reclaim memory > -- Android kills off your application's process to reclaim memory in a hurry > -- you close up intentionally as part of the upgrade process We've set up our app to background itself when the back-button is hit (mostly in terms of services, but also a couple native threads) so that we can perform background processing. For the second and third points, what notification would the app get that it is being closed/killed? As I mentioned, our onDestroy() handler isn't called, which is what we were triggering off of, but at least in the upgrade case this isn't called. > If your concern is that you don't want to keep nagging the user about > the new version if they expressly aborted the upgrade, write yourself a > file/preference/database record indicating you've already told them > before you launch them into the APK/market and close up shop. Ah, thank you, didn't think of that. Thanks, Dave Golombek www.flexilis.com PS: Sorry for the double post, for some reason my first post wasn't showing up when I searched for 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 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 manage service lifecycle when device kills it due to low memory
Not getting onDestroy() is normal, expected, and desired behavior as for all app components -- the kernel kills processes when it needs more memory, we don't rely on them being nice and cleaning up at their leisure. The current semantics for recovering from being killed are unfortunately as you describe. I actually just checked in a change for Eclair that improves this a lot, allowing you to much better control what happens after being killed, and detecting that you were killed when restarted. Until then, you'll need to take care to implement onCreate() to recover. As far as being foreground -- if you do indeed show a notification while running, then making yourself foreground is reasonable (since the user knows you are running, and can go through the notification to stop you), and will basically ensure that you aren't killed. Note though that another change in Eclair will be that setForeground() no longer does anything, and will be replaced with a new API that requires having a notification shown while being in the foreground state. (This is because numerous apps are now abusing setForeground() by just using it to avoid having their memory used when the system needs it, instead of to let the system know the user is actively aware of what they are doing and so shouldn't be killed.) It does sound a little odd to me that you say the service isn't important to the user, but you are posting a notification while it is running. If it isn't important to them, I would suggest it shouldn't be notifying them. ;) Another thing to think about -- if you are polling, ideally you wouldn't keep your service always running. Typically how people implement polling is by scheduling an alarm to start their service after the poll interval. Then if you get killed, you can always recover when the next alarm goes off. (You can either schedule a repeating alarm, or re-schedule your alarm in onStart(); you are guaranteed to not be killed except under severe circumstances while in onCreate() or onStart().) On Tue, Aug 25, 2009 at 5:54 AM, Chister Nordvik wrote: > > Hi! > > I have a service that polls for data. To indicate this to the user I > have a persistent notification in the statusbar. In some cases when > the device goes low on memory it destroys the service but OnDestroy is > not called. Later when there is available memory OnCreate is called. > Is this normal behavior? I had hoped that OnDestroy would be called to > I could remove the notification in the statusbar. Now the user thinks > that the service is still running, while it has been stopped by the > OS. > > In order to restart the polling how do I know that the OnCreate is > really a restart event and not first time creation of the service? I > thought about checking for the presence of the notification in the > statusbar, but I couldn't find a API to check if a notification was > showing or not. > > I have not tried "SetForeground" on the service, since the service > isn't that important to the user, but maybe that would minimize the > problem... > > -Christer > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Handset screen sizes
All current android devices are 320x480. On Tue, Aug 25, 2009 at 7:30 AM, JP wrote: > > > G1, Dream, Magic, Hero, Galaxy and more to come... > > Does anybody have a rundown of their screen sizes (and of some of the > devices to come out)? > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ADC 2 Submission Site -- Now live
There's no reason that they would change the deadline. The deadline has been set at the 31st since late May (as stated before). With that deadline posted, your app should be ready to hit the submit button on the 31st or sooner. Nothing changed, they're giving you a full week to hit the "Submit" button. - Dan On Tue, Aug 25, 2009 at 12:06 PM, Maps.Huge.Info (Maps API Guru) < cor...@gmail.com> wrote: > > I see no need to extend the deadline, it's been public since May 27th, > if you're not ready by now, you'll probably never be ready. People > have to learn that a deadline means something, extending it would only > punish those who are ready and reward those who can't meet project > goals on time. > > -John Coryat > > > --~--~-~--~~~---~--~~ 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 Happened to Android Discuss Group?
No idea. I'm missing it, too. On Aug 25, 12:48 pm, Doug wrote: > I also subscribe to the Android Discuss group. I clicked on a post in > today's email update and got a message saying "Cannot find android- > discuss ... There is no group named android-discuss". There were a > couple of threads I was watching. Anyone know what happened? --~--~-~--~~~---~--~~ 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 the RotationMatrix, actually how to get it
I'm trying to get the acceleration values in the earth coordinate system. E.g. instead of knowing the phone is accelerating +Z in the phone's coordinate system I'd like to know if the phone is accelerating upwards relative to the earth. Seems like it's almost there since I can get the phone's orientation relative to the earth and the acceleration relative to the phone's mike --~--~-~--~~~---~--~~ 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: ADC 2 Submission Site -- Now live
You are right.. yeah our app is more than ready.. but not everybody was expecting a one week window. Some do travel on business during working days and it happens to be a long weekend in the UK. And submissions from business involve a paid bunch of developers who don't work like hackers over weekends and around midnights. And this request is due to the window being too short to yield for contingencies (unlike what was initially announced). Thanks for your time and thinking from shoes of another person. Regards, RS On Aug 25, 5:06 pm, "Maps.Huge.Info (Maps API Guru)" wrote: > I see no need to extend the deadline, it's been public since May 27th, > if you're not ready by now, you'll probably never be ready. People > have to learn that a deadline means something, extending it would only > punish those who are ready and reward those who can't meet project > goals on time. > > -John Coryat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android Camera : My photo is completely black :-/
Hi, I am creating a little application where I use the Android Camera class. Everything seems to work but the result is a black picture. I think I forget to set a parameter. Do you have any ideas on which parameter I must set up ? The code: public boolean takeIt() { ImageCaptureCallback iccb = null; try { String filename = "photo.jpeg"; ContentValues values = new ContentValues(); values.put(Media.TITLE, filename); values.put(Media.DESCRIPTION, "Image capture by camera"); iccb = new ImageCaptureCallback(new FileOutputStream(new File (dataMgr.getRoot(), filename))); } catch(Exception ex ){ ex.printStackTrace(); } camera.takePicture(mShutterCallback, mPictureCallbackRaw, iccb); return true; } If you need something else, just tell it ;p Thanks, D. --~--~-~--~~~---~--~~ 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: ADC 2 Submission Site -- Now live
If the app was submitted to the Market in any form before August 1st, it's not eligible. If the app was first submitted in any form after August 1st, it is eligible. So if you submitted the first version to Market after 1 August, you may submit a revised version to the ADC2. - Dan On Tue, Aug 25, 2009 at 1:43 AM, Ehab Bassilli wrote: > Dan, > > Sorry to be a pain but what about upgraded versions of apps sumitted after > aug 1st? > > I.e. the new features and ui were available after aug 1st? > > Thanks > > On Aug 25, 2009 4:21 AM, "Dan Morrill" wrote: > > This is correct: upgraded versions of apps submitted to Market before 1 > August are ineligible; this includes UI upgrades. > - Dan > > On Mon, Aug 24, 2009 at 4:09 PM, mgpc wrote: > > > Hi > Ehab, > > The rules say... > > You received this message because you are subscribed to the Google Groups > "Android Developers" grou... > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to get the duration of an audio resource using SoundPool
Hi, I have a scenario where I want to play several samples after each other. Sounds like a job for the SoundPool since they will re-occur and I want to keep them loaded. Below is a code snippet: SoundPool soundPool = new SoundPool(1, AudioManager.STREAM_MUSIC, 0); int mySampleId = soundPool.load(context, R.raw.mySample, 1); //Load a bunch of other samples here... AudioManager mgr = (AudioManager) context.getSystemService (Context.AUDIO_SERVICE); int streamVolume = mgr.getStreamVolume(AudioManager.STREAM_MUSIC); soundPool.play(mySampleId, streamVolume, streamVolume, 1, 0, 1f); The play() method of the SoundPool returns instantly so I want to be able to know how long to wait before starting to play the next sample. The MediaPlayer has a getDuration() method that would be conviniant in the SoundPool as well, i.e. to get the duration of a sound ID. Does anybody know how to get the duration of a sample fetched as a resource or do you have an alternative solution. Using a MediaPlayer instance feels a bit more heavy weight . Thanks, Pettax --~--~-~--~~~---~--~~ 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: Screen color depth supported by Android 1.5/Galaxy
My board has an lcd of 24 bpp, but android UI is 16 bpp. When 24bpp images are drawn, android will be down sampling. Is there a way to optimise it, as config some .conf files to 24 bpp? And how to do it? On 8月18日, 下午11时20分, Romain Guy wrote: > Android is perfectly capable of rendering onto 16 bits and 32 bits (or > 24 bits if you prefer) displays. However, I don't know of any display > in mobile phones that supports 24 bits. They're usually 16 or 18 bits. > > > > > > On Tue, Aug 18, 2009 at 1:35 AM, fexpop wrote: > > > Hi, > > > there's a discussion going on about the color depth on the Samsung > > Galaxy. > > > While it is advertised as having a 16 Million color display (24bpp) it > > is only running at 16bpp: > > > $ cat /sys/devices/virtual/graphics/fb0/bits_per_pixel > > 16 > > > Some say that it is a restriction of Android 1.5 itself which was only > > capable of supporting up to 16bpp screens. Android would be down > > sampling to 16bpp whatever the screen supports. > > > I've searched the available documentation over and over and can't find > > anything like that. > > > As I see it Android 1.5 would indeed be capable of displaying 24bpp > > images properly given that the screen is capable of and configured to > > do so. > > > Can anyone give an authoritative answer, please? > > > Kind regards, Felix > > -- > 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: App shutdown during package reinstall
On Aug 24, 12:34 pm, Hong wrote: > If you do: adb uninstall your.package.name.mainactivity, > do you ever get any crash/error etc? > > If not, the upgrade/installation process will uninstall your app cleanly. We do get crashes (that we're working on), but they don't matter since our data files are deleted on uninstall, which is what we want to ensure are not corrupted. > If onDestroy() is never called, try to do things in onStop(). > I would assume onDestroy() will be called during un-installation process. I'll give that a try, thanks. > Other than that, you can potentially have a separate service running and > check the state of your app, and also the activity of the installer/download > activities, and clean up things accordingly. Yeah, we've been trying that and getting wierd results. If that's really the only way we can pursue it more. Thanks, Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How do I show chinese type in english android system?
How do I show chinese type in english android system? 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: ADC 2 Submission Site -- Now live
I agree with Vetch, the deadline has been communicated a long time ago and one week should be sufficient to just upload the app (I presume the site works as expected ...). Any change to the deadline would just insult all developers that were working to this deadline as they were supposed to. Cheers Daniel On Aug 25, 11:18 am, vetch wrote: > On 25 Sie, 10:08, RS wrote: > > > Dan, a little larger window would be very useful. > > May be an extension by a week or two .. as the site opened on 24th > > late night only. > > You could decide to pass it over to market .. say after 15th sept. > > Oh, no my dear. They did that year ago. NOT AGAIN, Dan, you hear me ?. > > I wasted ALL my vacations for hard work 10-16 hours per day, and > making "larger window" will be just INSULT for me and many people, who > have working, when they should rest. > > We have the same amount of time, just 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 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: Screen color depth supported by Android 1.5/Galaxy
I just want to know how android rendering onto 32 bits.Anyone knows pls tell me. On Aug 18, 11:20 pm, Romain Guy wrote: > Android is perfectly capable of rendering onto 16 bits and 32 bits (or > 24 bits if you prefer) displays. However, I don't know of any display > in mobile phones that supports 24 bits. They're usually 16 or 18 bits. > > > > > > On Tue, Aug 18, 2009 at 1:35 AM, fexpop wrote: > > > Hi, > > > there's a discussion going on about thecolordepthon the Samsung > > Galaxy. > > > While it is advertised as having a 16 Millioncolordisplay (24bpp) it > > is only running at 16bpp: > > > $ cat /sys/devices/virtual/graphics/fb0/bits_per_pixel > > 16 > > > Some say that it is a restriction of Android 1.5 itself which was only > > capable of supporting up to 16bpp screens. Android would be down > > sampling to 16bpp whatever the screen supports. > > > I've searched the available documentation over and over and can't find > > anything like that. > > > As I see it Android 1.5 would indeed be capable of displaying 24bpp > > images properly given that the screen is capable of and configured to > > do so. > > > Can anyone give an authoritative answer, please? > > > Kind regards, Felix > > -- > 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: EMMA Code coverage and JUnit
Hi All, what changes you have been done to vold.conf? and i followed the steps of gobor.. but for me also, emulator is getting stucked.. can you plz help me.. On Aug 25, 2:23 am, Haritha wrote: > thanks everyone for posting info on emma coverage.I was also able to > generate coverage reports for custom tests with necessary changes to > vold.conf. > regards > Haritha > > On Aug 20, 6:08 am, Gabor wrote: > > > > > Hi All, > > > Finally, the emma code coverage measurement is working for me (for a > > custom project). So here are the steps what you need to make it work > > (I have tested it, with Java 1.5 on Ubuntu 8.04): > > > mkdir android-src > > cd android-src > > repo init -u git://android.git.kernel.org/platform/manifest.git -b > > cupcake > > repo sync > > > # Add emma.jar to the system/core/rootdir/init.rc > > sed 's/\/system\/framework\/core.jar:\/system\/framework\/ext.jar:/\/ > > system\/framework\/core.jar:\/system\/framework\/ext.jar:\/system\/ > > framework\/emma.jar:/' system/core/rootdir/init.rc > system/core/ > > rootdir/init.rc.tmp > > mv system/core/rootdir/init.rc.tmp system/core/rootdir/init.rc > > > # Rebuild the boot image > > make bootimage > > > # To build the full system image > > make -j4 > > > # Set the PATH: > > export PATH=${PATH}:/<_path_>/android-src/out/host/linux-x86/bin/ > > > # Build the emma jar itself > > make emma > > > # Setting the environment and additional bash commands. (like > > m,mm,mmm, choosecombo etc) Notice the space after the dot! > > . build/envsetup.sh > > > # Set EMMA_INSTRUMENTATION to true > > export EMMA_INSTRUMENT=true > > > # Copy your project to development/samples/<_projectname_> or > > somewhere..:) > > # Based on the ApiDemo create an Android.mk file for the project > > directory and the project test directory > > # The LOCAL_INSTRUMENTATION_FOR value in test dir Android.mk has to be > > equal with the LOCAL_PACKAGE_NAME defined in the Android.mk in the > > main project dir. > > # Compile the Application would like to instrument > > mmm development/samples/<_projectname_> > > > # Set the ANDROID_PRODUCT_OUT directory for the emulator to know the > > image location > > export ANDROID_PRODUCT_OUT=/<_path_>/android-src/out/target/product/ > > generic > > > # Start an emulator with a simulated sdcard: > > emulator -sdcard > > > # Remount the drive - it is needed to have a writable drive. without > > that sync wont work > > adb remount > > > # Synchronize the local content with the emulator > > adb sync > > > adb shell > > # create directory: mkdir /etc/coverageresult > > > # Executing tests > > adb shell am instrument -w -e coverage true -e coverageFile /etc/ > > coverageresult/coverage.ec hu.agsoftware.sample.tests/ > > android.test.InstrumentationTestRunner > > > # Dump a runtime coverage data file: > > adb pull /etc/coverageresult/coverage.ec coverage.ec > > > # Generate a coverage report > > java -cp external/emma/lib/emma.jar emma report -r html -in > > coverage.ec -sp development/samples/<_projectname_>/src -in out/target/ > > common/obj/APPS/<_projectname>_intermediates/coverage.em > > > I hope it helps. > > > Gabor- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to know which row in the table is updated most recently?
My application needs to respond to the change in the database, when a new contact is added and a new SMS is received or sent. The onChange() function is so stupid that it only notifies you the happening of the event without any other infomation. Does any one have better solutions to know the row in the table which is updated most recently? 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] Help.... trouble granting DEVICE_POWER permission
I'm trying to develop an application that need DEVICE_POWER permission, I put it in android.manifets file, but when launching the app crashes, the logcat reports "Not granting permission DEVICE_POWER..." due to Security constraints. Checking the docs it seems that the apk must be signed with a real certificate, anyone that knows more about 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 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] out of memory exception in gridview
hi i am new to android. i have an application in that i download 105 images. now i than i display those images in gridview thumbnail size . it images are display but it take some time to display images in gridview and even take long time to scrolldown to view below images. can any one helpm me on that issue i want to display images in faster time and also decrease the time to scroll down to view below images so plz can anyone tell me solution for that issue. i use bitmap for save the images --~--~-~--~~~---~--~~ 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] Priorization of applications/threads possible?
Hi all, the Android web site indicates that "all applications are created equal." What is the strategy to ensure that critical applications/ services have priority? Are there any facilities Android/Linux does provide to ensure certain applications and/or threads to receive a minimum of CPU bandwidth (and other apps/threads are prevented from consuming all the CPU bandwidth)? Matthias --~--~-~--~~~---~--~~ 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: Emulator quick start
I found it slow as well even with the emulator remaining open. I've only had a couple of hours messing around with it but I ran the Hello World application last night. With the emulator still open I tried changing the output text to see how long it takes to redeploy. When I click to run it again it typically takes maybe 30 seconds for the new app to load. I have 1.5GB of RAM on my computer so not sure what the problem is. On Aug 8, 2:01 pm, David Turner wrote: > What do you mean by "still very slow". > What are you trying to do, which steps are you using to get there, etc.. > > On Fri, Aug 7, 2009 at 9:51 PM, Jack Jia wrote: > > > Hi, > > I found out it is still very slow even I keep the emulator running. > > > Jack > > > On Thu, Jul 30, 2009 at 12:08 PM, rehab mohamed wrote: > > > do not close the emulator after run and you can run your application > > again > > > and the emulator will be updated with out closing it > > > this way is faster than close and run again > > > > > > > From: jack > > > To: Android Developers > > > Sent: Thursday, July 30, 2009 10:37:59 AM > > > Subject: [android-developers] Emulator quick start > > > > Hi, > > > > Is there a quick start mode for android emulator. It is a PIA to start > > > the emulator many times since it is very slow. It will be great value > > > to developer if there is a quick start mode which simply get the app > > > loaded without any other unnecessary loadings. > > > > Thanks, > > > Jack --~--~-~--~~~---~--~~ 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: Turn on light of trackball on HTC magic
Is there a way to get the trackball to flash when an SMS message arrives? On Aug 14, 6:08 pm, Dianne Hackborn wrote: > There is no direct API, the light is controlled indirectly by posting a > notification that requests the lights flash. > > > > > > On Fri, Aug 14, 2009 at 3:43 AM, Anton Pirker wrote: > > > Hey list! > > > I have a HTC Magic and just love the glowing trackball if you have > > missed a call. > > > So i wanted to use the trackball light in my own android apps, but i > > can not find anything on how to make it glow. > > Does anyone know how to turn the light of the trackball on and of? > > > Thanks in advance, > > Anton > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How do I change the timeout time for the lock screen?
How do I change the timeout time for the lock screen? Instead of the 10 second timeout, a 2 second timeout would save more battery life. --~--~-~--~~~---~--~~ 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] Drawing a transparent Color to a Canvas
I'm trying to set a circle of pixels to transparent in a Bitmap. Currently I am iterating through the pixels in a circle and drawing them with Bitmap.setPixel(x, y, Color.TRANSPARENT), and I would like to see if it is quicker to make a Canvas from the Bitmap and use Canvas.drawCircle(x, y, Color.TRANSPARENT);. However, when drawing to the Canvas with a transparent Paint, it doesn't replace the colour but draws on top of it, so I see no change in the Bitmap. Is there a way to make Canvas.drawXXX replace the colours below rather than paint on top of them? Cheers, Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Android IMS support
Hi, As per the following link, Android already developed IMS http://code.google.com/p/android-ims/ Does it support JSR 281 and IMS SIP stack. Do Android have any plan to release this within Android 2.0 DONUT sdk? Please help. Thanks & Regards, Aryaan --~--~-~--~~~---~--~~ 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] adc 2 deadline extention
Hi, Please i'm asking where can we ask google to extend adc 2 deadline ? thks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How come the accelrometers maximum sampling rate are so low?
Hi, I've tried to measure the accelerometer sampling rate on the G1 when the rate was set to "FASTEST" and the results were around 50Hz. Does this value seem to be wrong or is the maximum sampling rate really this low? And if it is, how come? Since the CPU clock is 528 MHz, shouldn't it be possible to aquire much higher sampling rate? Is it a hardware problem or a software setting, and if the later - is it possible to get it higher? --~--~-~--~~~---~--~~ 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 meaning of the $ (dollar sign) in the backtrace?
Hi all, I wanted to understand what the $ sign and the number after a $ sign meant in a backtrace. For example, consider the following backtrace: at android.app.ActivityThread.access$2500(ActivityThread.java:115) at android.app.ActivityThread$H.handleMessage(ActivityThread.java: 1745) In the first line, what does the number 2500 refer to? In addition, I couldn't find the function "access" in ActivityThread.java, and line 115 is just the beginning of the class. Can anyone help clarify this? 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] Connection refused
I am trying to let Android connect to my Google App. While I have tried many kinds way of connection, somehow I failed all. The error is java.net.Connection.Exception:localhost/127.0.0.1:8080 - Connection refused. Hope someone can help me fix this problem. My one method is as follows: -- private String getHttpResponse(String location) { String result = null; URL url = null; try { url = new URL(location); } catch (MalformedURLException e) { result = "\n1:" + e.toString(); } if (url != null) { try { HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); //使用HttpURLConnection打开连接 BufferedReader in = new BufferedReader(new InputStreamReader (urlConn.getInputStream()));//为输出创建BufferedReader String inputLine; int lineCount = 0; // limit the lines for the example while ((lineCount < 10) && ((inputLine = in.readLine()) != null)) { //读Response中的数据 lineCount++; result += "\n" + inputLine; } in.close(); urlConn.disconnect(); } catch (IOException e) { result = "\n2:" + e.toString(); } } else { result = " url NULL"; } return result; } --~--~-~--~~~---~--~~ 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] Do the applications keep/manage their own SQLite databases (files)?
Hi All, Android includes a database engine (SQLite). In general, do the applications keep/manage their own databases (files) or is there a unifying database manager? Thanks, Matthias --~--~-~--~~~---~--~~ 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] Time to first screen, boot-up time and app-start time?
Hi all, at the moment I am thinking about a new app and need some information to decide whether to develop on Android or an alternative OS. I am particularly interested in "time to first screen", "boot-up time", "time to first Audio" and "app-start" (can be any from the android market or even one of the pre-installed ones) time? Does anyone know a source or perhaps measured those numbers? Thanks very much for all your help! Matthias --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] how to avoid getting Menu command to my application after the screen have been locked
Hi, I am writing my first application in Android and when the screen is locked I pressing menu to unlocked and I am getting event to my view ( onKeyDown ) and it open the menu of the screen . how can I avoid getting this event to my application ? Thanks Singel ton . --~--~-~--~~~---~--~~ 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] Running Android in the virtualization layer (e.g. VMware) possible?
Hi, has anyone tried to run Android in the virtualization layer, e.g. on VMware? Thanks, Matthias --~--~-~--~~~---~--~~ 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] About android color depth 32bit/pixel
Does anyone knows how to make android with color depth 32bit/pixel? pls tell me,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] Playing/recording audio over/from the connected line
Hi, I want to play an audio message to caller and record the caller voice. Does android provide the following functionalities: 1. Playing an audio over the connected voice call. 2. Recording from the connnected voice call. Please help. Thanks & Regards, Aryaan --~--~-~--~~~---~--~~ 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] OpenGL ES confusion
Hi All, I am new to Android and OpenGL world. I've created a new ap using openGL ES. ( I am not able to find a option to send attachment of package to group, so that youi can see my code and sugest me wherei made a mistake). Android Simulator LCD size is 320 x 455 and i've set same size for OpenGL Viewport. But For creating visible rectangle i've to use vertices, which are of very high value. e.g. int vertices[] = { -2,-2,0, -2,2,0, 2,2,0, 2,-2,0 }; why is it so, when screen size id 320 x 455?? Please clarify my this doubt that may solve my many other problems. Regards, Harish Haswani --~--~-~--~~~---~--~~ 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] can I communicate with os on phone?
hi, I want to code a program that can install / unstall another software on the phone, just like what the built-in Market app do. so, if I can communicate with OS, then I can input some commands like install or unstall. and do anybody know the flow of downloading from Android Market? Does it download .apk first and then install it? I have search for it for a long time, but I just find there is no terminal in the phone.. many thanks, neoj --~--~-~--~~~---~--~~ 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] Access to other appications
Currently, I tried to create an event of the Calendar application which is included in Android 1.1 by my own application developed by Android SDK. Originally, the class and functions of the Calendar can not be found. After I found the library of Calendar and put it to the classpath, there is no error anymore. However, the access still failed in runtime. It seems that the Calendar applications are prohibited to be accessed, isn't it? I considered of accessing the DB of Calendar app directly, but it seems that there is no way to access the DB of another application. Is there any solution to access the Calendar app by my own app? --~--~-~--~~~---~--~~ 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: Do the applications keep/manage their own SQLite databases (files)?
> Android includes a database engine (SQLite). In general, do the > applications keep/manage their own databases (files) or is there a > unifying database manager? Applications keep/manage their own databases. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---