[android-developers] graphics speciall effects
When you turn on the phone, after the G1 screen, there's a black screen with the word Android in blue, and a glossy shine running across it. Can you tell me how imitate that effect? Maybe point me in the right direction, like what classes to look at? 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: a receiver for outgoing sms and email?
Interesting feature request. What is the use case for such a requirement? I am asking for my understanding. Why do you need to be notified when the sms or email is sent out? On Jun 12, 5:18 am, Seer wrote: > Guys there is a issue raised for this now. Please add your votes to > it so that hopefully it will be implemented. > > http://code.google.com/p/android/issues/detail?id=2261 > > Hopefully it will be implemented so we can capture outgoing sms in the > next release of android. > > Chris > > On Apr 21, 11:28 pm, Gulfam wrote: > > > > > Hi all, > > > Any updates about interception of out going SMS > > > Gulfam > > > On Apr 5, 4:53 am, Seer wrote: > > > > I have been trying to catch outgoing sms and i can tell you it is > > > currently impossible. No one on here or the platform knows a way to do > > > it and from the people i have spoken to most have did not seem to even > > > think people may want to do so. Hopefully it is a feature added in > > > the future. > > > > On Feb 5, 3:00 pm, Dietrich Ayala wrote: > > > > > i figured out how to listen foroutgoingcalls. however, i can't find > > > > any docs or code samples for making a Receiver that catchesoutgoing > > > > sms or email. > > > > > is that possible? > > > > > thanks! > > > > > -dietrich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: a receiver for outgoing sms and email?
Guys there is a issue raised for this now. Please add your votes to it so that hopefully it will be implemented. http://code.google.com/p/android/issues/detail?id=2261 Hopefully it will be implemented so we can capture outgoing sms in the next release of android. Chris On Apr 21, 11:28 pm, Gulfam wrote: > Hi all, > > Any updates about interception of out going SMS > > Gulfam > > On Apr 5, 4:53 am, Seer wrote: > > > I have been trying to catch outgoing sms and i can tell you it is > > currently impossible. No one on here or the platform knows a way to do > > it and from the people i have spoken to most have did not seem to even > > think people may want to do so. Hopefully it is a feature added in > > the future. > > > On Feb 5, 3:00 pm, Dietrich Ayala wrote: > > > > i figured out how to listen foroutgoingcalls. however, i can't find > > > any docs or code samples for making a Receiver that catchesoutgoing > > > sms or email. > > > > is that possible? > > > > thanks! > > > > -dietrich --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ClassNotFoundException
Have you included the activity in your AndroidManifest file? On 11-Jun-09, at 10:01 PM, Mike Lanin wrote: > > I have a problem and cant realize a reason. I have > ClassNotFoundException when starting > Intent i = new Intent(EventInfo.this, AndricoMap.class); > i.putExtra("address", address); > startActivity(i); > > There are log and class below > > 06-11 22:07:32.556: ERROR/AndroidRuntime(413): Uncaught handler: > thread main exiting due to uncaught exception > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): > java.lang.NoClassDefFoundError: org.andrico.andrico.AndricoMap > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > org.andrico.andrico.EventInfo$5.onClick(EventInfo.java:227) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.View.performClick(View.java:2109) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.View.onTouchEvent(View.java:3523) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.widget.TextView.onTouchEvent(TextView.java:4410) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.View.dispatchTouchEvent(View.java:3178) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:857) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > com.android.internal.policy.impl.PhoneWindow > $DecorView.superDispatchTouchEvent(PhoneWindow.java:1561) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent > (PhoneWindow.java:1085) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.app.Activity.dispatchTouchEvent(Activity.java:1873) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > com.android.internal.policy.impl.PhoneWindow > $DecorView.dispatchTouchEvent(PhoneWindow.java:1545) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.view.ViewRoot.handleMessage(ViewRoot.java:1140) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.os.Handler.dispatchMessage(Handler.java:88) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.os.Looper.loop(Looper.java:123) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > android.app.ActivityThread.main(ActivityThread.java:3742) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > java.lang.reflect.Method.invokeNative(Native Method) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > java.lang.reflect.Method.invoke(Method.java:515) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run > (ZygoteInit.java:739) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > dalvik.system.NativeStart.main(Native Method) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): Caused by: > java.lang.ClassNotFoundException: org.andrico.andrico.AndricoMap in > loader dalvik.system.pathclassloa...@433e7108 > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > dalvik.system.PathClassLoader.findClass(PathClassLoader.java:215) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > java.lang.ClassLoader.loadClass(ClassLoader.java:453) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): at > java.lang.ClassLoader.loadClass(ClassLoader.java:421) > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): ... 24 more > > > > > > > package org.andrico.andrico; > > import java.util.List; > > import android.app.Activity; > import android.app.AlertDialog; > import android.app.Dialog; > import android.content.Intent; > import android.location.Address; > import android.location.Geocoder; > import android.os.Bundle; > import android.util.Log; > > import com.google.android.maps.GeoPoint; > import com.google.android.maps.MapActivity; > import com.google.android.maps.MapController; > import com.google.android.maps.MapView; > > public class AndricoMap extends MapActivity > { > private MapView myMap; > private Geocoder gc; > private double lat; > private double lon; > private List foundAdresses; > String addressInput = ""; > > public void onCreate(Bundle savedInstanceState) > { > //super.onCreate(savedInstanceState); > setContentView(R.layout.map); > Intent i =
[android-developers] Re: 30 Days of Android Applications
Thanks, John. Fixed. On Jun 12, 3:30 am, "Maps.Huge.Info (Maps API Guru)" wrote: > It appears as if your "03day" app source is missing... > > -John Coryat > > http://maps.huge.info > > http://www.usnaviguide.com > > http://www.zipmap.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Download manager
Hello, has anyone tried this? I got exactly the same error as davidyu. My application has permission android.permission.ACCESS_DOWNLOAD_MANAGER but download manager does not allow it to read downloads with the message that android.permission.ACCESS_DOWNLOAD_MANAGER is required. Ondra On May 4, 1:51 pm, davidyu wrote: > I want to access Download manager in my application, and set > android:name="android.permission.ACCESS_DOWNLOAD_MANAGER"/> > android:name="android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED"/> > android:name="android.permission.ACCESS_CACHE_FILESYSTEM"/> > android:name="android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS"/> > > in manifest.xml > > However, I still get /AndroidRuntime(14300): Caused by: > java.lang.SecurityException: Permission Denial: reading > com.android.providers.downloads.DownloadProvider uri > content://downloads/download from pid=14300, uid=10057 requires > android.permission.ACCESS_DOWNLOAD_MANAGER > E/AndroidRuntime(14300): at android.os.Parcel.readException > (Parcel.java:1234) > E/AndroidRuntime(14300): at > android.database.DatabaseUtils.readExceptionFromParcel > (DatabaseUtils.java:145) > E/AndroidRuntime(14300): at > android.database.DatabaseUtils.readExceptionFromParcel > (DatabaseUtils.java:111) > E/AndroidRuntime(14300): at > android.content.ContentProviderProxy.bulkQuery > (ContentProviderNative.java:279) > E/AndroidRuntime(14300): at > android.content.ContentProviderProxy.query(ContentProviderNative.java: > 298) > E/AndroidRuntime(14300): at > android.content.ContentResolver.query(ContentResolver.java:149) > E/AndroidRuntime(14300): at > android.app.Activity.managedQuery(Activity.java:1499) > > is there anything else I should do to access Download Manager? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Has the android.app package been removed from 1.5_r2
oops.. nevermind On Jun 11, 9:29 pm, Daniel wrote: > I get this error when compiling. Can anyone else replicate it? It > happens when importing android.app.ProgressDialog on 1.5-r2 > > [javac] /home/doubleagent/Programming/ANDROID/KYMesonetSiteMap/src/org/ > kymesonet/kymesonetsitemap/KYMesonetSiteMap.java:16: package > andriod.app does not exist > [javac] import andriod.app.ProgressDialog; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: npapi plugin failed to load in android webview
can anybody sugest me a way test npapi pluguns in android browser. On Jun 11, 4:09 pm, MIND GAME wrote: > thanks for ur tracking > can u help me out to solve this problem > > On Jun 11, 9:33 am, Marco Nelissen wrote: > > > > > This is the 4th or 5th time today that you've asked about this... > > > On Wed, Jun 10, 2009 at 9:30 PM, MIND GAME wrote: > > > > i am trying to load a npapi plugin using android api - webview. > > > code is > > > webview.getSettings().setJavaScriptEnabled(true); > > > webview .getSettings().setPluginsEnabled(true); > > > webview.getSettings().setPluginsPath("/android_asset/web/"); > > > System.out.println("Default plugin path > > > is :"+webview .getSettings().getPluginsPath()); > > > webview.loadUrl("file:///android_asset/web/test.html"); > > > > i m using simple example npapi plugin. > > > > code for plugin is given below and i place this plugin inside my > > > application's asset folder. and set pulgin path like this -- > > > webview.getSettings().setPluginsPath > > > ("/android_asset/web/"); > > > > but plugin is failing to load... > > > > #include > > > #include > > > #if defined(OS_Darwin) > > > #include > > > #include > > > #include > > > #define OSCALL > > > #endif > > > #if XULRUNNER_SDK > > > #include > > > #include > > > #include > > > #elif _WINDOWS /* WebKit SDK on Windows */ > > > #ifndef PLATFORM > > > #define PLATFORM(x) defined(x) > > > #endif > > > #include > > > #ifndef OSCALL > > > #define OSCALL WINAPI > > > #endif > > > #endif > > > char** charArray = NULL; > > > static NPObject *so = NULL; > > > static NPNetscapeFuncs *npnfuncs = NULL; > > > /* NPN */ > > > static void logmsg(const char *msg) { > > > #ifndef _WINDOWS > > > fputs(msg, stderr); > > > #else > > > static FILE *out = fopen("\\npsimple.log", "a"); > > > fputs(msg, out); > > > fclose(out); > > > #endif > > > } > > > > static bool > > > hasMethod(NPObject* obj, NPIdentifier methodName) { > > > logmsg("npsimple: hasMethod\n"); > > > return true; > > > } > > > > static bool > > > invokeDefault(NPObject *obj, const NPVariant *args, uint32_t > > > argCount, > > > NPVariant *result) { > > > logmsg("npsimple: invokeDefault\n"); > > > result->type = NPVariantType_Int32; > > > result->value.intValue = 42; > > > return true; > > > } > > > > static bool > > > invoke(NPObject* obj, NPIdentifier methodName, const NPVariant *args, > > > uint32_t argCount, NPVariant *result) { > > > logmsg("npsimple: invoke\n"); > > > invokeDefault(obj,args,argCount,result); > > > return true; > > > } > > > > static bool > > > hasProperty(NPObject *obj, NPIdentifier propertyName) { > > > logmsg("npsimple: hasProperty\n"); > > > return false; > > > } > > > > static bool > > > getProperty(NPObject *obj, NPIdentifier propertyName, NPVariant > > > *result) { > > > logmsg("npsimple: getProperty\n"); > > > return false; > > > } > > > > static bool enumerate(NPObject *npobj, NPIdentifier **value, > > > uint32_t *count){ > > > } > > > > static NPObject* allocate(NPP npp,NPClass* theClass){ > > > logmsg("IN ALLOCATE\n"); > > > NPObject* npObj = (NPObject*)malloc(sizeof(NPObject)); > > > return npObj; > > > } > > > > static void deallocate(NPObject* obj){ > > > logmsg("IN DEALLOCATE\n"); > > > free(obj); > > > } > > > > static NPClass npcRefObject = { > > > NP_CLASS_STRUCT_VERSION, > > > allocate, > > > deallocate, > > > NULL, > > > hasMethod, > > > invoke, > > > invokeDefault, > > > hasProperty, > > > getProperty, > > > NULL, > > > NULL,enumerate, > > > }; > > > > /* NPP */ > > > static NPError > > > nevv(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, > > > char *argn[], char *argv[], NPSavedData *saved) { > > > logmsg("npsimple: new\n"); > > > return NPERR_NO_ERROR; > > > } > > > > static NPError > > > destroy(NPP instance, NPSavedData **save) { > > > if(so) > > > npnfuncs->releaseobject(so); > > > so = NULL; > > > logmsg("npsimple: destroy\n"); > > > return NPERR_NO_ERROR; > > > } > > > > static NPError > > > getValue(NPP instance, NPPVariable variable, void *value) { > > > switch(variable) { > > > default: > > > logmsg("npsimple: getvalue - default\n"); > > > return NPERR_GENERIC_ERROR; > > > case NPPVpluginNameString: > > > logmsg("npsimple: getvalue - name string\n"); > > > *((char **)value) = "AplixFooPlugin"; > > > break; > > > case NPPVpluginDescriptionString: > > > logmsg("npsimple: getvalue - description string\n"); > > > *((char **)value) = " > >www.aplix.co.jp/ > > > \">AplixFooPlugin plugin."; > > > break; > >
[android-developers] Re: LooperThread
Send a message to it and have it call Looper.quit() in response. On Thu, Jun 11, 2009 at 6:02 PM, Brad Gies wrote: > > > Can anyone tell me the proper way to terminate a LooperThread? > > Below is the code from the Developer site, but it seems all the methods for > stopping it have been deprecated. > > > > class LooperThread extends Thread { > public Handler mHandler; > > public void run() { > Looper.prepare(); > > mHandler = new Handler() { > public void handleMessage(Message msg) { > // process incoming messages here > } > }; > > Looper.loop(); > } > } > > > I'm using this in a Service, which creates a main Thread, and the main > thread checks to see if I need to update my server with GPS coordinates. If > I do need to send the GPS info, I create a looper thread using the base > code > above, and join to it for a maximum of 60 seconds. > > I am able to register to receive the GPS information, and set a > LocationListener inside the Looper Thread, and receive the GPS information. > When I get the onStatusChanged event with a status of 2 (Available), I want > to stop/terminate the looperThread, so that I can continue on with the main > thread, but I don't see any methods left that allow me to terminate it > properly. The join times out, and the main thread continues, but the > LooperThread never disappears. > > Should I be using another method with SDK 1.5.r2 ? > > > > > > Sincerely, > > Brad Gies > > > - > Brad Gies > 27415 Greenfield Rd, # 2, > Southfield, MI, USA > 48076 > www.bgies.com www.truckerphone.com > www.EDI-Easy.com www.EDI-Simple.com > - > > Moderation in everything, including abstinence > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SpareParts -> Battery History -> Sensor Usage
I want to make sure this is correct, would it not be something like this. lm.removeUpdates(locationListener); Chris. On Jun 11, 3:13 pm, MrChaz wrote: > Maybe it's not turning off the listeners when it's paused or maybe > it's using a more frequent listener > > On Jun 11, 7:59 pm, chrispix wrote: > > > > > Can someone tell me why one app would have much higher sensor usage > > than another. and or what it considers a sensor? I mean, there is a > > separate option for GPS. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Developer devices available in other regions?
On Jun 10, 12:26 pm, Colin Charles wrote: > It would be a lot better if Google did this officially. Limiting the device > to certain countries, seems, short-sighted at best. take it easy dude, I can't even register google check out using my credit card. I'm in China. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Has the android.app package been removed from 1.5_r2
I get this error when compiling. Can anyone else replicate it? It happens when importing android.app.ProgressDialog on 1.5-r2 [javac] /home/doubleagent/Programming/ANDROID/KYMesonetSiteMap/src/org/ kymesonet/kymesonetsitemap/KYMesonetSiteMap.java:16: package andriod.app does not exist [javac] import andriod.app.ProgressDialog; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: weird rotation in CameraPreview
No. I tried to set the preview size smaller than the surface size but it still follow the surface size. I watch Logcat and it says tring to set the required size but then forward back to the surface size. And still fill all of the surface. On Fri, Jun 12, 2009 at 11:26 AM, Brian Smith wrote: > > No problem :-) Out of curiosity, how was the preview image oriented > on the preview surface? Was it centered, or anchored to the left or > right side? > > On Jun 11, 9:12 pm, jia liu wrote: > > I see, you are definitely right Brian. Now it works fine with right > ratio. > > Thank you so much! :) > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: weird rotation in CameraPreview
No problem :-) Out of curiosity, how was the preview image oriented on the preview surface? Was it centered, or anchored to the left or right side? On Jun 11, 9:12 pm, jia liu wrote: > I see, you are definitely right Brian. Now it works fine with right ratio. > Thank you so much! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: weird rotation in CameraPreview
I see, you are definitely right Brian. Now it works fine with right ratio. Thank you so much! :) On Fri, Jun 12, 2009 at 10:10 AM, Brian Smith wrote: > > You can get the final picture size and set the preview size using the > Camera.Parameters object (getParameters/setParameters on the Camera > object). If you implement the SurfaceHolder.Callback interface, as > done in the API demo code, then you have the size of the preview > surface as well. I don't know what will happen with the preview image > if it's smaller than the preview surface (centered, left justified, > etc.), but it is possible to make the preview image have the same > aspect ratio as the final image (read: not stretched) with just a > little bit of math. > > On Jun 11, 7:29 pm, jia liu wrote: > > Thanks for all your hints. :) It is very helpful! I already tried to use > > android:screenOrientation="landscape" in the activity tab and the > rotation > > problem solved but still stretched. Now I am looking for a way to make it > > not stretched. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] LooperThread
Can anyone tell me the proper way to terminate a LooperThread? Below is the code from the Developer site, but it seems all the methods for stopping it have been deprecated. class LooperThread extends Thread { public Handler mHandler; public void run() { Looper.prepare(); mHandler = new Handler() { public void handleMessage(Message msg) { // process incoming messages here } }; Looper.loop(); } } I'm using this in a Service, which creates a main Thread, and the main thread checks to see if I need to update my server with GPS coordinates. If I do need to send the GPS info, I create a looper thread using the base code above, and join to it for a maximum of 60 seconds. I am able to register to receive the GPS information, and set a LocationListener inside the Looper Thread, and receive the GPS information. When I get the onStatusChanged event with a status of 2 (Available), I want to stop/terminate the looperThread, so that I can continue on with the main thread, but I don't see any methods left that allow me to terminate it properly. The join times out, and the main thread continues, but the LooperThread never disappears. Should I be using another method with SDK 1.5.r2 ? Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.EDI-Simple.com - Moderation in everything, including abstinence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Image Capture
I am not sure that will help. I think when you implement mCamera.takePicture did you try to give it a ShutterCallback like: Camera.ShutterCallback mShutterCallback = new Camera.ShutterCallback() { public void onShutter() { // implement your onshutter actions or leave it blank } }; then: if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(mShutterCallback,null,mPictureCallback); return true; } Not sure it is right but it might be helpful. :) On Fri, Jun 12, 2009 at 7:29 AM, Sundog wrote: > > Hi, if you're using Eclipse, do you know about the LogCat window on > the Debug page? It will tell you what exception is being thrown, which > is really essential to know to solve your problem. > > On Jun 11, 3:12 pm, Sharmila Chakraborty wrote: > > It starts previewing,but as soon as I press the space key it says,"Sorry > > application is forced closed.Try again!" > > > > > > > > On Thu, Jun 11, 2009 at 4:44 PM, Sundog wrote: > > > > > On Jun 11, 2:37 pm, Max Salley wrote: > > > > What exception does it throw? > > > > > Details, details! lol...- 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]
I am not sure that will help. I think when you implement mCamera.takePicture did you try to give it a ShutterCallback like: Camera.ShutterCallback mShutterCallback = new Camera.ShutterCallback() { public void onShutter() { // implement your onshutter actions or leave it blank } }; then: if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(mShutterCallback,null,mPictureCallback); return true; } Not sure it is right but it might be helpful. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: weird rotation in CameraPreview
You can get the final picture size and set the preview size using the Camera.Parameters object (getParameters/setParameters on the Camera object). If you implement the SurfaceHolder.Callback interface, as done in the API demo code, then you have the size of the preview surface as well. I don't know what will happen with the preview image if it's smaller than the preview surface (centered, left justified, etc.), but it is possible to make the preview image have the same aspect ratio as the final image (read: not stretched) with just a little bit of math. On Jun 11, 7:29 pm, jia liu wrote: > Thanks for all your hints. :) It is very helpful! I already tried to use > android:screenOrientation="landscape" in the activity tab and the rotation > problem solved but still stretched. Now I am looking for a way to make it > not stretched. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there some native-implemented API for DES encrypt/decrypt?
Hi All, I'm trying to encrypt/decrypt a bunch of data using DESede (triple DES). I'm using the javax.crypto APIs, which seem to be implemented by the pure-java code found in the package org.bouncycastle.crypto.engines. Is there an SDK API for DESede which is implemented internally by native code? The openssl libs are part of Android, it would be nice to be able take advantage of their native speed. Is there any way? Here's a rough outline of my current approach: import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; class Decrypter { private Cipher _cipher; public Decrypter() { try { _cipher = Cipher.getInstance("DESede"); } catch(Exception exception) { throw new RuntimeException(exception); } } // // decrypt gets called many times -- needs to be faster // public byte[] decrypt(byte[] keyBytes, byte[] encryptedBytes) throws Exception { Key key = new SecretKeySpec(keyBytes, "DESede"); _cipher.init(Cipher.DECRYPT_MODE, key); return _cipher.doFinal(encryptedBytes); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] call forwarding
Hi Guys, I want to do a call forwarding to a particular number using the following code The issue is I get a ring from a number but it dosen't get forwarded automatically to the desired number (). After the call ends the dialer gets popped with the desired number which had to be automatically called (which is the intended call forwarding number) number **21*++**2# What am I missing. Thanks a Ton public class dialing extends Activity { ListenToPhoneState listener; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); call(); } private void call() { TelephonyManager tManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); listener = new ListenToPhoneState(); tManager.listen(listener, PhoneStateListener.LISTEN_CALL_STATE); } private class ListenToPhoneState extends PhoneStateListener { public void onCallStateChanged(int state, String incomingNumber) { Log.i("telephony-example", "State changed: " + stateName (state)); } String stateName(int state) { switch (state) { case TelephonyManager.CALL_STATE_IDLE: return "Idle"; case TelephonyManager.CALL_STATE_OFFHOOK: return "Off hook"; case TelephonyManager.CALL_STATE_RINGING: String encodedHash = Uri.encode("#"); Log.e("telephony-example", "before call forward"); startActivity(new Intent ("android.intent.action.DIAL", Uri.parse("tel:**21*++**2" + encodedHash))); return "Ringing"; } return Integer.toString(state); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 custom homescreen / launcher
great! thanks a lot for the reply On Jun 11, 4:25 pm, Romain Guy wrote: > Hi, > > The home application is the launcher and the other way around. We use > both names to designate the same application. > > > Further, It there some Intent I could declare in my app that would > > instruct android to load my launcher / homescreen app instead of the > > native one, or would this require me to reimplement from source and > > build a custom platform? thanks for the help. > > There's a demo in the SDK showing you how to do it. > > -- > 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: weird rotation in CameraPreview
Thanks for all your hints. :) It is very helpful! I already tried to use android:screenOrientation="landscape" in the activity tab and the rotation problem solved but still stretched. Now I am looking for a way to make it not stretched. I am not sure G1 camera preview can only work in 'landscape' mode because the system camera preview did very well. I am also looking for the solution from other forums but there is not proper solution. So please share our idea and if we can solve that it would be great! :) Thx On Fri, Jun 12, 2009 at 8:53 AM, Brian Smith wrote: > > That's what I'm seeing as well. There's an easy workaround, though... > do the same thing that the Android Camera app does, and force the > activity which contains the preview surface to landscape orientation. > Hint: In the manifest file, the element supports the > attribute android:screenOrientation. > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 custom homescreen / launcher
Hi, The home application is the launcher and the other way around. We use both names to designate the same application. > Further, It there some Intent I could declare in my app that would > instruct android to load my launcher / homescreen app instead of the > native one, or would this require me to reimplement from source and > build a custom platform? thanks for the help. There's a demo in the SDK showing you how to do it. -- 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] writing a custom homescreen / launcher
Hi everyone I'm interesting in writing a custom homescreen and launcher. By launcher, i mean the list of apps that appear when you push the menu button from the homescreen. Are these two different native applications (homescreen and launcher)? Or is the menu that pops up part of the homescreen application. Further, It there some Intent I could declare in my app that would instruct android to load my launcher / homescreen app instead of the native one, or would this require me to reimplement from source and build a custom platform? thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Built in sms client
hey Chris Funny, I just finished a very similar project. One thing to note, you cant compile the built in sms client sourcecode with the SDK, as it uses classes that are not in the SDK. That said, the classes used to work with SMS are very starightforward. Also, the content URI doesn't seem to be publically posted yet, but there is a post on google groups where someone has figured out the table headings that would be useful. On Jun 11, 3:35 pm, Seer wrote: > Is there anyone out there that could send me the source for the built > in SMS client? Since we can not intercept outgoing SMS i need to > write my own copy of the SMS client to do be able to capture SMS > replies. The problem is i am having a lot of trouble trying to find a > way to access the SMS client source on windows. > > If anyone can send me or give me a link to a file containing the > source I would be very greatful. > > Regards > > Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: (application) cannot be installed on this phone
After spending quite a bit of time trying different things, I found that if I sign with the debug.keystore that I think was automatically generated or installed by the 1.1 SDK, then my application installs without the problem. The issue though is that the key expires in October. So for now, I will sign with the old key from the 1.1 SDK. On Jun 10, 9:53 pm, Manicotti wrote: > I have the same exact problem. My application runs fine on the > emulator under both 1.1 and 1.5. But when trying to install on the > phone, I get a message with the title "Application not installed" and > the message "(application) could not be installed on this phone.". > > I couple of weeks ago, I updated my SDK to 1.5r2. Today I just > updated my phone to cupcake 1.5. My AndroidManifest.xml has > minSdkVersion set to 2. > > I have a .apk I built with the 1.1 SDK a couple of days prior to > installing the 1.5r2 SDK and it installs fine, so I suspect that the > problem has to do with how the 1.5r2 SDK builds the .apk compared with > how the 1.1 SDK did it. > > So I'm stumped as well. > > On Jun 10, 5:53 am, Mark Hansen wrote: > > > > > Has anyone had an error along the lines of "(application) cannot be > > installed on this phone.", where the application name is in place of > > (application). > > > This is on cupcake, I have my version minSdkVersion set to 3, and I've > > had no problems prior to this new version. > > > Runs fine in the emulator, so I'm stumped?- 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] Email and IM application for android emulator
Hi, Can you please tell me how can I find Email and IM application for android emulator? There are Email and IM on G1, but I don't see that on the emulator. I appreciate if anyone can help. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: weird rotation in CameraPreview
That's what I'm seeing as well. There's an easy workaround, though... do the same thing that the Android Camera app does, and force the activity which contains the preview surface to landscape orientation. Hint: In the manifest file, the element supports the attribute android:screenOrientation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Market Automatic Updates
although individual developers care mostly about their apps, it will good for users if they could update ALL applications from market for which the updates are available .. hint : appstore -Dan On Thu, Jun 11, 2009 at 2:24 PM, Streets Of Boston wrote: > > Yes, they will be notified automatically by the Market application. > > On Jun 11, 5:06 pm, TjerkW wrote: > > When i update my application in the android market.. > > Will users be automatically notified to download a new version? > > > > I just implemented veecheck for my game.. (http://www.tomgibara.com/ > > android/veecheck/) > > but that was all wasted time if it is already implemented. > > > > Can somebody confirm this? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Why bother?
This isn't a practical question. It's a summary of how you feel you can beat the system and waste away with devices no one in the real world has heard of or care about. There is such a thing as the Emulator. It emulates the device behavior so you have somewhat of a decent chance to actually know what your app can or cannot do. Is it full proof? No, of course not. You're cutting your own throat wasting time weighing the pro's and con's on an exciting new platform when you should be reading up on the API's. Quit your stalling and get to work. On Jun 11, 2:42 pm, Sundog wrote: > On Jun 10, 10:10 pm, A wrote: > > > Hi all, > > > I have a practical question. > > > I might be interested in coding for Android. I have some J2ME programs > > that I could port that are very useful. > > > But I am wondering, why bother? Consider: > > > 1. > > Looking at the documentation for Android it seems to me that the > > learning curve for working with Android is large. > > If you've been doing J2ME it shouldn't be THAT hard. I learned the > whole platform and had my first app online in about a week. > > > > > 2. > > Looking at the available phones they are all about $500 without a > > contract. We're in a Recession and $500 is a lot of money. Compare > > that to my 3-inch touch screen Sciphone i68 which was $100 and has > > MIDP support. > > You have to spend at least a little money to make money. TANSTAAFL. > > > 3. > > I don't do contracts. I have heard that Android phones are hobbled by > > the requirement that I'd have to have a contract. I use prepaid > > exclusively to keep my phone bills down. > > Seems to me that one or the other of these pretty much cuts you out of > the smartphone market entirely, not just Android. > > > > > 4. > > No contract means no data plan. > > By all means, tell us about the data plan included with your prepaid > phone. Sounds interesting. > > > 5. > > I can get a Windows Mobile phone for $260, called the CECT M88+. It > > will run native apps and J2ME. That's half the cost of an Android > > phone. > > Go for it, I say. > > > 6. > > Regular consumers know we're in a recession. They are going to avoid > > expensive phones and long contracts more now than ever. Will $500 > > luxury Android phones take hold? I'm skeptical. > > Please don't take this the wrong way, but you don't sound very > knowledgable about the state of the cell phone market, or its pricing > structure. What fool paid $500 for an Android phone (except the dev > phone)? > > > 7. > > I am not someone who is easily impressed by Google. There is no "wow" > > factor for me in using Android. > > Non-sequitur. Any "wow" factor impressing anyone is because of Android > itself, not Google. > > Summing up, I'd say you've answered your own questions. Android is not > for you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Built in sms client
Is there anyone out there that could send me the source for the built in SMS client? Since we can not intercept outgoing SMS i need to write my own copy of the SMS client to do be able to capture SMS replies. The problem is i am having a lot of trouble trying to find a way to access the SMS client source on windows. If anyone can send me or give me a link to a file containing the source I would be very greatful. Regards Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: 30 Days of Android Applications
It appears as if your "03day" app source is missing... -John Coryat http://maps.huge.info http://www.usnaviguide.com http://www.zipmap.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: TextView Ellipsize: Questions
For the time being, I decided to roll my own ellipsize function, which I will call on my own and then feed into my TextView. It is highly customized for my own purposes, so would likely not fit well within the realm of the core framework, but now that I have a better idea of what is going on, I just may try to patch the core. Note, I was able to get the standard ellipsize function to use my own custom ellipsize character(s) but it was not the "right" way of doing it... while I am at it, I might try to figure out some other text formatting things I wanted, namely indents (hanging indent, first line indent, etc...) I will clean up my code and post here in the near future, for reference purposes. On Jun 10, 3:56 pm, "nEx.Software" wrote: > Further experimentation results in the following... I was not crazy, I > had seen three lines in an ellipsized TextView before. And I have now > figured out how it is working (or, rather, not working)... It is > ellipsizing each paragraph separately (and limiting each paragraph to > two lines) as opposed to taking the entire string and ellipsizing > that. This means two things... I will be filing a bug report, and I > will be looking to see if I can patch it in the meantime. > > For my own project, I'll have to either not ellipsize, hack an > ellipsizer on my own (ugh), or faking it by layering another textview > over top, so as to obscure the text I am "ellipsizing". I am aware > this is not a good solution and I cringe at even saying it, but in a > pinch it just may have to do... Sorry for triple posting here, but I > figured others might be interested. > > On Jun 10, 2:26 pm, "nEx.Software" wrote: > > > So, I am experimenting further, and am finding that no matter what I > > do, I am only getting 2 lines while using the ellipsize attribute on > > my TextView. So, either I am doing something terribly wrong or > > something has gone awry. Maybe I never have actually seen it go more > > than 2 lines and I am actually just dreaming? Now, I suppose I'll dive > > into the source of the ellipsize function (in android.text.TextUtils) > > and see what's going on in there. > > > On Jun 10, 1:10 pm, "nEx.Software" wrote: > > > > Thanks for the quick reply Romain. Unfortunately, I'm seeing a > > > different result in my app. When I use ellipsize on a multiline > > > TextView, I get inconsistent results. For example, sometimes a piece > > > of text that could easily fill the 4 lines that I have set as max, > > > gets stopped and ellipsized on the second line, or the third line. > > > Other times, these go the full four lines. I guess I assumed that it > > > was deciding that a word on the second or third line needed to be > > > ellipsized and then just stopped rather than wrapping and continuing > > > on. Maybe it was my own mis-evaluation of my problem? > > > > If see if I can get the custom ellipsize characters working, and (if I > > > do) figure out how to submit a patch... Unfortunately, one place where > > > I wanted to use this was a Widget, so I'll still need to figure > > > something else out for that, since I can't use a subclassed TextView. > > > Again, I appreciate the quick response. > > > > On Jun 10, 10:03 am, Romain Guy wrote: > > > > > > 1) Is there anyway to get ellipsize to work on a multiline TextView? > > > > > So that the ellipses are shown at the end of the text, rather than at > > > > > the end of the line? If not what is the best way to handle this on my > > > > > own?]] > > > > > That's already what it does, see the Home screen's list of apps for > > > > instance. > > > > > > 2) Is there any way to change the character used for eellipsize? For > > > > > example, use "... [Read More]", this obviously coincides with question > > > > > 1 above since one wouldn't want to take half of the single line to say > > > > > read more, but on a multiline, it would be nice to be able to have > > > > > like 3 or 4 lines and then a read more? Maybe there is a better way to > > > > > do this that I haven't figured out yet? > > > > > Not at the moment. Patches are most welcome though :) > > > > > -- > > > > 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: 30 Days of Android Applications
Day 09: Currency Converter http://bakhtiyor.com/2009/06/currency-converter/ Day 10: Chemical Calculator http://bakhtiyor.com/2009/06/chemical-calculator/ Day 11: Password Generator http://bakhtiyor.com/2009/06/password-generator/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AudioTrack.write() returns 0 sometimes
I can play audio with good success most of the time...but sometimes, out of the blue, AudioTrack.write() returns 0, indicating it wrote no shorts to the audio device. Sure enough, I hear nothing. It doesn't return a negative value, namely either of the two error codes that the docs say it might return. It just returns 0. It does this continuoulsy as I feed new data to it. But other times it works! Any thoughts? 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: 2D Double Buffering in Android 1.5 (with Canvas?)
Hi, thanks everyone for your input ... I'll try up the suggestions. Cheers, Avatar Ng On Jun 12, 2:35 am, Robert Green wrote: > I'm seeing 9fps on your app. That's way too slow. I have 2 full > screen layers, many sprites, full sound and 2 A* algorithms running at > 45 FPS. There are many things you must know to do efficiently. I'm > not going to list everything I've done here because it would fill up > pages but if you take a look at my blog I wrote about lots of > it.http://www.rbgrn.net/content/290-light-racer-20-days-32-33-getting-gr... > talks about some of that. > > I'm not using OpenGL ES, just a plain old Canvas. Z buffering > probably would have been much easier with a 3D library, so if it's > just as fast, I'd recommend doing that. Either way though, you need > to be performance-conscious or you'll have a sluggish game. > > On Jun 11, 10:26 am, Avatar Ng wrote: > > > By the way ... here's my working project (yes not tune yet, very slow > > even my demo). > > Any criticism or ideas were welcome ... > > >http://hexagonm.blogspot.com/ > > > Will try to post some of my game story and idea until I have the > > time ... > > I had these whole thing sketch down long before Android arrived ... > > It's time to bring it live now XD > > > Regards, > > Avatar Ng --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Image Capture
Hi, if you're using Eclipse, do you know about the LogCat window on the Debug page? It will tell you what exception is being thrown, which is really essential to know to solve your problem. On Jun 11, 3:12 pm, Sharmila Chakraborty wrote: > It starts previewing,but as soon as I press the space key it says,"Sorry > application is forced closed.Try again!" > > > > On Thu, Jun 11, 2009 at 4:44 PM, Sundog wrote: > > > On Jun 11, 2:37 pm, Max Salley wrote: > > > What exception does it throw? > > > Details, details! lol...- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Market Automatic Updates
Yes, they will be notified automatically by the Market application. On Jun 11, 5:06 pm, TjerkW wrote: > When i update my application in the android market.. > Will users be automatically notified to download a new version? > > I just implemented veecheck for my game.. (http://www.tomgibara.com/ > android/veecheck/) > but that was all wasted time if it is already implemented. > > Can somebody confirm this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image Capture
It starts previewing,but as soon as I press the space key it says,"Sorry application is forced closed.Try again!" On Thu, Jun 11, 2009 at 4:44 PM, Sundog wrote: > > On Jun 11, 2:37 pm, Max Salley wrote: > > What exception does it throw? > > > > > Details, details! lol... > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Web Development on the Android Browser
I'm replying to my own post since there's been no reply. Clearly this is something that people are curious about: http://groups.google.com/group/android-developers/browse_thread/thread/bb5b568d1b619ab5/cd5d7592e3b2987d?lnk=gst&q=web+development#cd5d7592e3b2987d Clearly google has some pretty good information about the capabilities of the Android browser: http://googlemobile.blogspot.com/2009/06/iterative-web-app-faster-address-auto.html If there's anyone from the Android team reading this, how about some info? On May 19, 8:36 pm, Sasha Sklar wrote: > Has anyone come across documentation on the specific capabilities of > the Android Browser? I'm currently developing websites targeted to > next generation devices and I haven't come across a lot besides PPK's > work here: > > http://www.quirksmode.org/m/table.html > > I'm looking for the equivalent of this document on creatingweb > content for the iPhone: > > http://developer.apple.com/safari/library/documentation/AppleApplicat... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Market Automatic Updates
When i update my application in the android market.. Will users be automatically notified to download a new version? I just implemented veecheck for my game.. (http://www.tomgibara.com/ android/veecheck/) but that was all wasted time if it is already implemented. Can somebody confirm this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Could not find class 'org.apache.commons.httpclient.SimpleHttpConnectionManager', referenced from method org.ksoap2.transport.AndroidServiceConnection
Hi Everyone, I'm getting this error when trying to use the Android version of kSOAP2 Could not find class 'org.apache.commons.httpclient.SimpleHttpConnectionManager', referenced from method org.ksoap2.transport.AndroidServiceConnection Can anyone help? Thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AutoCompleteTextView in Eclipse layout editor?
It looks like a defect... http://code.google.com/p/android/issues/detail?id=2903 On 28 Mag, 21:17, Chris McCurdy wrote: > I'm porting an app of mine to work better with API 1.5, and I'm having > problems with the layout files where I'm using an AutoCompleteTextView > (and, naturally, MultiAutoCompleteTextView). Whenever I have them > present in a layout, the graphical representation of the layout > disappears, and "NullPointerException: null" replaces it. > > Is there any way I can view a widget such as this in the Eclipse > editor? It definitely worked in the 1.1 SDK, otherwise I wouldn't have > used 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: ClassNotFoundException
On Jun 11, 9:31 am, Mike Lanin wrote: > I have a problem and cant realize a reason. I have > ClassNotFoundException when starting > Intent i = new Intent(EventInfo.this, AndricoMap.class); > i.putExtra("address", address); > startActivity(i); > > There are log and class below > > 06-11 22:07:32.556: ERROR/AndroidRuntime(413): Uncaught handler: > thread main exiting due to uncaught exception > 06-11 22:07:32.596: ERROR/AndroidRuntime(413): > java.lang.NoClassDefFoundError: org.andrico.andrico.AndricoMap Are there any other failures in this process earlier in the log? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Image Capture
On Jun 11, 2:37 pm, Max Salley wrote: > What exception does it throw? > Details, details! lol... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Accelerometer/Orientation sensor problem
Thanks much! Actually for my purposes ignoring the sensor for a second will work just fine, but I will check out your info for the next time around. I'm kinda designing my new game BASED on the limitations of the phone... i.e. choosing the complexity of the views based on how much the poor innumerate G1 can handle before bogging down, that sort of thing. So this is just more of the same, sigh. On Jun 11, 2:34 pm, TjerkW wrote: > Nope this problem is is also on the htc magic .. check my post for a > solution using a damper. Somewhere else in this group ... > > On 11 jun, 22:28, Sundog wrote: > > > > > I'd be very interested to know if anyone besides G1 owners has seen > > this? My best guess is that it's a design flaw specific to this > > phone... and if so, no fix will be forthcoming. > > > On Jun 11, 2:20 pm, Sundog wrote: > > > > Just a "me too" to report that this problem is real and is still here > > > under Cupcake. Play a sound and the accelerometer goes haywire for a > > > second. Only fix I can see is ignoring the accelerometer while SFX are > > > playing... kinda not really a good workaround for a game. > > > > On Jun 8, 8:25 am, TjerkW wrote: > > > > > Sameproblemhere, > > > > > when playing sounds during my game (in which you control the gameplay > > > > withaccelerometer) > > > > theaccelerometergives strange values. > > > > > On 24 mei, 13:29, Bonifaz wrote: > > > > > > I have the sameproblemof wiredaccelerometerdata while music is > > > > > playing. > > > > > > Does anyone have a workaround for this. Some kind of filter mechanism > > > > > perhaps. > > > > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection. > > > > > But even with that formular, playing music always detects shake, > > > > > just raising the threshold won't work, since shake would not be > > > > > detected with to high threshold.- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Changing the application icon at runtime?
Sorry for spreading misinformation :) But at least I know now; I must have made a mistake in my small test widget. Tom. 2009/6/11 Jeff Sharkey > > Actually, it totally can take focus. :) The forecast widget I wrote > can be selected and "clicked" using the trackball: > > > http://code.google.com/p/android-sky/source/browse/trunk/Sky/res/layout/widget_med.xml > > You may need to use tricks like "android:duplicateParentState" to > correctly show drawable states in children views. > > j > > > On Thu, Jun 11, 2009 at 4:24 AM, Tom Gibara wrote: > > I just want to add that one thing about this: a widget can't take focus > or > > otherwise be operated via the trackball, that might prove an > irritation for > > some users. > > Tom. > > 2009/6/11 Jeff Sharkey > >> > >> Changing icons dynamically still isn't possible. However, you can now > >> write an AppWidget the size and shape of an icon that dynamically > >> changes. > >> > >> j > >> > >> On Wed, Jun 10, 2009 at 12:24 AM, toff...@gmail.com > >> wrote: > >> > > >> > Hi, > >> > > >> > I'm also trying to find out if this is possible to do. Anyone who > >> > knows? > >> > > >> > > >> > / Toffer > >> > > >> > On 9 Juni, 14:58, pehrlo wrote: > >> >> Does somebody know if this is possibly in 1.5? > >> >> > >> >> From: hackbod > >> >> Date: 19 Okt 2008, 20:06 > >> >> Subject: How can the app icon be changed at runtime > >> >> To: Android Developers > >> >> > >> >> Sorry, application icons can't be changed dynamically in 1.0. > >> >> > >> >> On Oct 18, 8:10 am, omni wrote: > >> >> > >> >> > >> >> > >> >> > I'd like to be able to change the applicationiconatruntime; either > >> >> > by providing a completely new image, or by applying badgest to the > >> >> > existingicon. > >> >> > Can't seem to find a way to do it that actually works, and group > >> >> > search only reveals posts about changing views in an activity.- > Dölj > >> >> > citerad text - > >> >> > >> >> - Visa citerad text - > >> > > >> > > > >> > > >> > >> > >> > >> -- > >> Jeff Sharkey > >> jshar...@android.com > >> > >> > > > > > > > > > > > > > -- > Jeff Sharkey > jshar...@android.com > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Image Capture
What exception does it throw? On Jun 11, 1:29 pm, Sharmila wrote: > Hi everyone, > this is the code that I have for camera preview and image capture.I am > trying to do camera preview and as I press the space button I am > trying to take picture and save it in the picture gallery of the > Android development phone. > The code compiles fine,but as I press the space button,it captures the > image and throws an exception and closes the application... > I have no idea how to fix this.I have looked in a lot of places but > haven't found a way to solve my problem. > I desperately need help... > Thanks! > Sharmila. > > /** > * Copyright (c) 2007, Google Inc. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > software > * distributed under the License is distributed on an "AS IS" BASIS, > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > * See the License for the specific language governing permissions > and > * limitations under the License. > */ > > package com.android.cameraapitest; > > import java.io.FileNotFoundException; > import java.io.OutputStream; > > import android.app.Activity; > import android.content.Intent; > import android.graphics.Bitmap; > import android.graphics.Canvas; > import android.graphics.Paint; > import android.graphics.PixelFormat; > import android.graphics.Rect; > import android.net.Uri; > import android.os.Handler; > import android.os.Message; > import android.os.Bundle; > import android.provider.MediaStore.Images; > import android.provider.MediaStore.Video; > import android.view.Menu; > import android.view.MenuItem; > import android.view.SurfaceHolder; > import android.view.SurfaceView; > import android.view.KeyEvent; > import android.hardware.Camera; > > import android.text.Layout; > import android.util.Log; > > public class CameraApiTest extends Activity implements > SurfaceHolder.Callback > { > private static final String TAG = "CameraApiTest"; > Camera mCamera; > boolean mPreviewRunning = false; > > public void onCreate(Bundle icicle) > { > super.onCreate(icicle); > > Log.e(TAG, "onCreate"); > > getWindow().setFormat(PixelFormat.TRANSLUCENT); > > setContentView(R.layout.camera_api_test); > mSurfaceView = (SurfaceView)findViewById(R.id.surface); > > mSurfaceHolder = mSurfaceView.getHolder(); > mSurfaceHolder.addCallback(this); > mSurfaceHolder.setType > (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); > } > > public boolean onCreateOptionsMenu(android.view.Menu menu) { > MenuItem item = menu.add(0, 0, 0, "goto gallery"); > item.setOnMenuItemClickListener(new > MenuItem.OnMenuItemClickListener() { > public boolean onMenuItemClick(MenuItem item) { > Uri target = Uri.parse("content://media/external/ > images/media"); > Intent intent = new Intent(Intent.ACTION_VIEW, > target); > startActivity(intent); > return true; > } > }); > return true; > } > > @Override > protected void onRestoreInstanceState(Bundle savedInstanceState) > { > super.onRestoreInstanceState(savedInstanceState); > } > > Camera.PictureCallback mPictureCallback = new > Camera.PictureCallback() { > public void onPictureTaken(byte[] data, Camera c) { > Log.e(TAG, "PICTURE CALLBACK: data.length = " + > data.length); > > try { > Bitmap bm = Bitmap.createBitmap > (mSurfaceHolder.getSurfaceFrame().width(), > mSurfaceHolder.getSurfaceFrame().height > (),Bitmap.Config.RGB_565); > OutputStream f=openFileOutput > ("image.jpg",MODE_WORLD_READABLE); > Canvas cnv=mSurfaceHolder.lockCanvas(); > cnv.setBitmap(bm); > bm.compress(Bitmap.CompressFormat.JPEG,100,f); > mSurfaceHolder.unlockCanvasAndPost(cnv); > } catch (FileNotFoundException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > mCamera.startPreview(); > } > }; > > public boolean onKeyDown(int keyCode, KeyEvent event) > { > if (keyCode == KeyEvent.KEYCODE_BACK) { > return super.onKeyDown(keyCode, event); > } > > if (keyCode == KeyEvent.KEYCODE_SPACE) { > mCamera.takePicture(null,null,mPictureCallback); > return true; > } > > return false; > } > > protected void onResume() > { > Log.e(TAG, "onResume"); > super.onResume(); >
[android-developers] Re: Accelerometer/Orientation sensor problem
Nope this problem is is also on the htc magic .. check my post for a solution using a damper. Somewhere else in this group ... On 11 jun, 22:28, Sundog wrote: > I'd be very interested to know if anyone besides G1 owners has seen > this? My best guess is that it's a design flaw specific to this > phone... and if so, no fix will be forthcoming. > > On Jun 11, 2:20 pm, Sundog wrote: > > > > > Just a "me too" to report that this problem is real and is still here > > under Cupcake. Play a sound and the accelerometer goes haywire for a > > second. Only fix I can see is ignoring the accelerometer while SFX are > > playing... kinda not really a good workaround for a game. > > > On Jun 8, 8:25 am, TjerkW wrote: > > > > Sameproblemhere, > > > > when playing sounds during my game (in which you control the gameplay > > > withaccelerometer) > > > theaccelerometergives strange values. > > > > On 24 mei, 13:29, Bonifaz wrote: > > > > > I have the sameproblemof wiredaccelerometerdata while music is > > > > playing. > > > > > Does anyone have a workaround for this. Some kind of filter mechanism > > > > perhaps. > > > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection. > > > > But even with that formular, playing music always detects shake, > > > > just raising the threshold won't work, since shake would not be > > > > detected with to high threshold.- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Changing the application icon at runtime?
Actually, it totally can take focus. :) The forecast widget I wrote can be selected and "clicked" using the trackball: http://code.google.com/p/android-sky/source/browse/trunk/Sky/res/layout/widget_med.xml You may need to use tricks like "android:duplicateParentState" to correctly show drawable states in children views. j On Thu, Jun 11, 2009 at 4:24 AM, Tom Gibara wrote: > I just want to add that one thing about this: a widget can't take focus or > otherwise be operated via the trackball, that might prove an irritation for > some users. > Tom. > 2009/6/11 Jeff Sharkey >> >> Changing icons dynamically still isn't possible. However, you can now >> write an AppWidget the size and shape of an icon that dynamically >> changes. >> >> j >> >> On Wed, Jun 10, 2009 at 12:24 AM, toff...@gmail.com >> wrote: >> > >> > Hi, >> > >> > I'm also trying to find out if this is possible to do. Anyone who >> > knows? >> > >> > >> > / Toffer >> > >> > On 9 Juni, 14:58, pehrlo wrote: >> >> Does somebody know if this is possibly in 1.5? >> >> >> >> From: hackbod >> >> Date: 19 Okt 2008, 20:06 >> >> Subject: How can the app icon be changed at runtime >> >> To: Android Developers >> >> >> >> Sorry, application icons can't be changed dynamically in 1.0. >> >> >> >> On Oct 18, 8:10 am, omni wrote: >> >> >> >> >> >> >> >> > I'd like to be able to change the applicationiconatruntime; either >> >> > by providing a completely new image, or by applying badgest to the >> >> > existingicon. >> >> > Can't seem to find a way to do it that actually works, and group >> >> > search only reveals posts about changing views in an activity.- Dölj >> >> > citerad text - >> >> >> >> - Visa citerad text - >> > >> > > >> > >> >> >> >> -- >> Jeff Sharkey >> jshar...@android.com >> >> > > > > > -- Jeff Sharkey jshar...@android.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Accelerometer/Orientation sensor problem
I'd be very interested to know if anyone besides G1 owners has seen this? My best guess is that it's a design flaw specific to this phone... and if so, no fix will be forthcoming. On Jun 11, 2:20 pm, Sundog wrote: > Just a "me too" to report that this problem is real and is still here > under Cupcake. Play a sound and the accelerometer goes haywire for a > second. Only fix I can see is ignoring the accelerometer while SFX are > playing... kinda not really a good workaround for a game. > > On Jun 8, 8:25 am, TjerkW wrote: > > > > > Sameproblemhere, > > > when playing sounds during my game (in which you control the gameplay > > withaccelerometer) > > theaccelerometergives strange values. > > > On 24 mei, 13:29, Bonifaz wrote: > > > > I have the sameproblemof wiredaccelerometerdata while music is > > > playing. > > > > Does anyone have a workaround for this. Some kind of filter mechanism > > > perhaps. > > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection. > > > But even with that formular, playing music always detects shake, > > > just raising the threshold won't work, since shake would not be > > > detected with to high threshold.- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: AVD Camera
The camera preview code was written to mimic the operation of the camera hardware in pre-1.0 versions of Android. It largely became obsolete with the release of 1.0 and the availability of real phones that one can use for running one's applications. I chose not to emulate the newer Camera functionality because there was no workable approach at that time. Now that I'm able to develop native libraries it might be possible, but hardware is now so widely available that it doesn't seem worthwhile. Assuming that your application doesn't deviate from the 'norms' of barcode detection, the zxing library provides an excellent template. For what it's worth, my experience is that you really have to test any application that uses the camera preview functionality directly on the hardware. The operation of the camera is reliable, but under a narrow (and it seems largely unspecified) range of parameters. I'm sorry to say that it's my personal judgement that the hardware Camera API is the poorest quality API in the entire framework (and I've used them all with the exception of the latest audio related functionality). There are lots of reasons that poor APIs can arise that are no fault of the implementers. so I'm not trying to complain or point fingers, but you should be prepared for quite a lot of frustration. Perhaps others have a different take. Tom. 2009/6/11 jgautier > > HI All, > > I am new to Android development and I am working on an app that will > use the camera to scan barcodes similar to many other apps out there. > Based on what I have read here: > http://developer.android.com/guide/developing/tools/emulator.html > the AVD does not support any camera input. So what I did was I used > some of the classes on this page: > http://www.tomgibara.com/android/camera-source. > I am streaming my local webcam over http and capturing the frames in > the AVD and displaying them. This is working fine. Now that I have > this working I wanted to look into how the http://code.google.com/p/zxing/ > could be implemented. However I think these two implemenations don't > work well together. zxing uses events such as Camera.PreviewCallback > which I dont have access to using my camera capturing. Also the > scanning is using the byte[] data passed into the event handler, and > with my implementation I only have access to a bitmap. > > How have you guys worked around this limiation? > > Thanks, > jgautier > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Accelerometer/Orientation sensor problem
Just a "me too" to report that this problem is real and is still here under Cupcake. Play a sound and the accelerometer goes haywire for a second. Only fix I can see is ignoring the accelerometer while SFX are playing... kinda not really a good workaround for a game. On Jun 8, 8:25 am, TjerkW wrote: > Sameproblemhere, > > when playing sounds during my game (in which you control the gameplay > withaccelerometer) > theaccelerometergives strange values. > > On 24 mei, 13:29, Bonifaz wrote: > > > > > I have the sameproblemof wiredaccelerometerdata while music is > > playing. > > > Does anyone have a workaround for this. Some kind of filter mechanism > > perhaps. > > > I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection. > > But even with that formular, playing music always detects shake, > > just raising the threshold won't work, since shake would not be > > detected with to high threshold.- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.5 Spare parts Battery History does not display any data
How did you get it on a real device? I'd like to be able to take a peak at my usage On May 21, 8:48 pm, Mike Hearn wrote: > For what it's worth, it works on a real device. I agree it's pretty > nice, although honestly, so far I've yet to encounter abattery > draining app so didn't use it "for real". > > At least for 1.5, it'll be a useful tool for developers to understand > their own app usage and help police each other but as Diane says not > something that's useful for most end users yet (unless you want to > explain what a wakelock is??) > > On May 21, 4:12 am, clemsongrad wrote: > > > > > Got it Dianne. But the tool has lot of good information that can help > > the subscriber in terms of showing him various application usage and > > perhaps the impact onbattery. Pretty powerful if we can get it to > > all work :). > > > On May 20, 4:51 pm, Dianne Hackborn wrote: > > > > SpareParts is, by its nature, things that are incomplete and not ready for > > > use, so they may or may not work at various times depending on the phase > > > of > > > the moon and other factors that nobody really understands. ;) > > > > On Wed, May 20, 2009 at 2:42 PM, clemsongrad wrote: > > > > > Jeff, > > > > > That helps, I have mistakenly thought because some of the other > > > >batterystats are available in the emulator this is supported as well. > > > > > Thanks for the clarification. > > > > > Thx! > > > > > On May 20, 4:22 pm, Jeff Sharkey wrote: > > > > > Because the emulator doesn't have abattery? > > > > > > j > > > > > > On Wed, May 20, 2009 at 12:30 PM, clemsongrad > > > > wrote: > > > > > > > Folks, > > > > > > > I do not have G1 Dev phone yet, and i am using the emulator for now. > > > > > > When you go to Spare Parts ->BatteryHistory, there is nothing that > > > > > > is displayed. > > > > > > > Question: > > > > > > 1. Why is the data notBatteryhistorydata not available? > > > > > > > Thanks in advance. > > > > > > -- > > > > > Jeff Sharkey > > > > > jshar...@android.com > > > > -- > > > 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] Android Maps API & KMZ files
I would like to add a kmz file (radar from this site, for instance - http://www.srh.noaa.gov/ridge/kmzgenerator.php) to my MapView. I can't find much, if any information about this. It sounds from various websites as if it's possible, but as of yet, no information on whether I can do it with the android api. Would I have to roll my own? Is the functionality in development? Have I completely overlooked the way to do it? Any help would be appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: SpareParts -> Battery History -> Sensor Usage
Maybe it's not turning off the listeners when it's paused or maybe it's using a more frequent listener On Jun 11, 7:59 pm, chrispix wrote: > Can someone tell me why one app would have much higher sensor usage > than another. and or what it considers a sensor? I mean, there is a > separate option for GPS. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Add Contact not working
I followed the documentation to start the Show or Create Contact activity. Since my app asks the user if they want to add a contact, I don't want the activity asking this as well. Thus I used the EXTRA_FORCE_CREATE flag. If I do not use this flag, the code below works fine. It asks the user if they want to add the contact, brings up a selection list where they can choose an existing contact or create a new one, and then shows the add contacts UI. Intent intent = new Intent(); intent.setAction(Contacts.Intents.SHOW_OR_CREATE_CONTACT); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setData(Uri.fromParts("tel", "2065551234", null)); intent.putExtra(Contacts.Intents.EXTRA_FORCE_CREATE, true); // << this is the problem line intent.putExtra(Contacts.Intents.Insert.NAME, "Cequint"); intent.putExtra(Contacts.Intents.Insert.NOTES, "test"); intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE, Contacts.PhonesColumns.TYPE_WORK); startActivity(intent); Using the EXTRA_FORCE_CREATE flag, the activity does not start and the logcat output shows that the intent forwarded by the ShowOrCreateActivity fails: 06-11 19:00:33.198: INFO/ActivityManager(583): Starting activity: Intent { action=com.android.contacts.action.SHOW_OR_CREATE_CONTACT categories={android.intent.category.DEFAULT} data=tel:2065551234 comp= {com.android.contacts/com.android.contacts.ShowOrCreateActivity} (has extras) } 06-11 19:00:33.369: INFO/ActivityManager(583): Starting activity: Intent { action=android.intent.action.INSERT type=vnd.android.cursor.dir/person comp={com.android.contacts/ com.android.contacts.EditContactActivity} (has extras) } 06-11 19:00:33.459: DEBUG/UserLaunch:(992): onRestart() 06-11 19:00:33.479: DEBUG/UserLaunch:(992): onStart() 06-11 19:00:33.709: ERROR/EditContactActivity(862): Cannot resolve intent: Intent { action=android.intent.action.INSERT type=vnd.android.cursor.dir/person comp={com.android.contacts/ com.android.contacts.EditContactActivity} (has extras) } Looking at the Contacts Manifest, I found that sending this Intent would take me directly to the add contacts UI, but will always create a new contact even if there is already one for that number: Intent intent = new Intent(Intent.ACTION_INSERT, People.CONTENT_URI); intent.putExtra(Contacts.Intents.Insert.PHONE, "2065551234"); intent.putExtra(Contacts.Intents.Insert.NAME, "Cequint"); intent.putExtra(Contacts.Intents.Insert.NOTES, "test"); intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE, Contacts.PhonesColumns.TYPE_WORK); startActivity(intent); Am I doing something wrong with the first example? Or is there a bug in the Contacts app? This is with SDK 1.5 r2. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 bother?
On Jun 10, 10:10 pm, A wrote: > Hi all, > > I have a practical question. > > I might be interested in coding for Android. I have some J2ME programs > that I could port that are very useful. > > But I am wondering, why bother? Consider: > > 1. > Looking at the documentation for Android it seems to me that the > learning curve for working with Android is large. If you've been doing J2ME it shouldn't be THAT hard. I learned the whole platform and had my first app online in about a week. > > 2. > Looking at the available phones they are all about $500 without a > contract. We're in a Recession and $500 is a lot of money. Compare > that to my 3-inch touch screen Sciphone i68 which was $100 and has > MIDP support. > You have to spend at least a little money to make money. TANSTAAFL. > 3. > I don't do contracts. I have heard that Android phones are hobbled by > the requirement that I'd have to have a contract. I use prepaid > exclusively to keep my phone bills down. Seems to me that one or the other of these pretty much cuts you out of the smartphone market entirely, not just Android. > > 4. > No contract means no data plan. > By all means, tell us about the data plan included with your prepaid phone. Sounds interesting. > 5. > I can get a Windows Mobile phone for $260, called the CECT M88+. It > will run native apps and J2ME. That's half the cost of an Android > phone. > Go for it, I say. > 6. > Regular consumers know we're in a recession. They are going to avoid > expensive phones and long contracts more now than ever. Will $500 > luxury Android phones take hold? I'm skeptical. > Please don't take this the wrong way, but you don't sound very knowledgable about the state of the cell phone market, or its pricing structure. What fool paid $500 for an Android phone (except the dev phone)? > 7. > I am not someone who is easily impressed by Google. There is no "wow" > factor for me in using Android. Non-sequitur. Any "wow" factor impressing anyone is because of Android itself, not Google. Summing up, I'd say you've answered your own questions. Android is not for you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get the root view of current Activity?
View.getRootView(). On Thu, Jun 11, 2009 at 12:22 PM, Agus wrote: > Dear all, > > Is there a function that allows me to get the top most view (the root)? > > Thanks, > Agus. > > > > -- 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] Miami Area Users Group
This post is for any developers in the Miami area that are looking for an Android users group to work with. I would like to form a group that can be used to help each other with application ideas, mentoring and android tutorials on a local level. Send me a reply if you are interested and we can go from there. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 root view of current Activity?
Dear all, Is there a function that allows me to get the top most view (the root)? Thanks, Agus. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SpareParts -> Battery History -> Sensor Usage
Can someone tell me why one app would have much higher sensor usage than another. and or what it considers a sensor? I mean, there is a separate option for GPS. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 reference native android drawable in the layout XML ?
Dear all android developers, How to reference native android drawable in the layout XML ? Regards, Agus. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: 2D Double Buffering in Android 1.5 (with Canvas?)
I'm seeing 9fps on your app. That's way too slow. I have 2 full screen layers, many sprites, full sound and 2 A* algorithms running at 45 FPS. There are many things you must know to do efficiently. I'm not going to list everything I've done here because it would fill up pages but if you take a look at my blog I wrote about lots of it. http://www.rbgrn.net/content/290-light-racer-20-days-32-33-getting-great-game-performance talks about some of that. I'm not using OpenGL ES, just a plain old Canvas. Z buffering probably would have been much easier with a 3D library, so if it's just as fast, I'd recommend doing that. Either way though, you need to be performance-conscious or you'll have a sluggish game. On Jun 11, 10:26 am, Avatar Ng wrote: > By the way ... here's my working project (yes not tune yet, very slow > even my demo). > Any criticism or ideas were welcome ... > > http://hexagonm.blogspot.com/ > > Will try to post some of my game story and idea until I have the > time ... > I had these whole thing sketch down long before Android arrived ... > It's time to bring it live now XD > > Regards, > Avatar Ng --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] setContentURI VideoView
I am working on a media player that uses streaming video for content. I have noticed a couple of things. Once I call setContentURI, the app seems to block until the content is completely buffered and playback can begin. If for some reason the connection to the server gets hung it locks up the entire app. Selecting the back button does nothing. So from that I have a couple of questions. How can I specify a timeout on the VideoView for when it tries to retrieve the content, or how can I code it to make the back button work so the user can at least cancel the operation. I tried placing setContentURI call in a thread and get an exception stating I am trying to call it from the wrong thread. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Can you make SlidingDrawer slide from top of screen without custom code?
SlidingDrawer does not support that and probably won't. On Wed, Jun 10, 2009 at 10:38 PM, Mooretis wrote: > > I love the SlidingDrawer widget, but would love to be able to have it > slide down from the top of the screen (like the notification bar) vs. > just the bottom. Is this possible, or am I looking at copying the > code to create a custom implementation > > > > -- 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: 2D Double Buffering in Android 1.5 (with Canvas?)
It's possible that the flickering you see is caused by slow lcd display. For example patterns from API demos looks really ugly in motion because of that. On Jun 11, 7:26 pm, Avatar Ng wrote: > By the way ... here's my working project (yes not tune yet, very slow > even my demo). > Any criticism or ideas were welcome ... > > http://hexagonm.blogspot.com/ > > Will try to post some of my game story and idea until I have the > time ... > I had these whole thing sketch down long before Android arrived ... > It's time to bring it live now XD > > Regards, > Avatar Ng --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Using the touchscreen and trackball with the GLSurfaceView
I can't for the life of me get it to work, anyone more suggestions? On Jun 10, 6:20 pm, Streets Of Boston wrote: > I actually do use the Thread.sleep as a hack (i don't like it, but it > works...) > It just sleeps for just 20 milli seconds, though. It's enough for a > notable improvement in the frame-rate of the other thread (game- > thread) and not too big to miss input events. > I only do it on the ACTION_MOVE. > > On Jun 10, 1:12 pm, MrChaz wrote: > > > > > I've run into an issue where performing a lot of touch events seem to > > block the move events from the trackball. > > Anyone else run into this issues? > > I can't use the Thread.sleep() fix because that will obviously stop > > all input, so I'm hoping someone has been able to throttle the touch > > command without effecting the move ones. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ExpandableListView not expanding/collapsing when using a group View with a checkbox
I've been debugging this for hours, and of course I find the solution 3 minutes after I post to the list. The CheckBox should android:focusable="false" as well... Regards, Sebastiaan sebster wrote: > Hi, > > I'm trying to implement an expandable list view where the group view > contains a label and a checkbox, visually represented below (the v and > >> are the expand/collapse icons, the [x]/[ ] a checked/unchecked >> > checkbox): > > v group 1 [x] > child 1 > child 2 > >> group 2 [ ] >> group 3 [x] >> > > I extended BaseExpandableListAdapter to inflate and return a group > view: > > public View getGroupView(int groupPosition, boolean isExpanded, View > convertView, ViewGroup parent) { > View groupView = convertView; > if (groupView == null) { > groupView = > LayoutInflater.from(context).inflate(R.layout.group, > null); > } > return groupView; > } > > with the following layout: > > > >android:layout_width="fill_parent" android:layout_height="? > android:attr/listPreferredItemHeight" > android:orientation="horizontal" android:gravity="center_vertical" > xmlns:android="http://schemas.android.com/apk/res/android";> > > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:textAppearance="?android:attr/textAppearanceLarge" > android:layout_weight="1" > android:paddingLeft="?android:attr/ > expandableListPreferredItemPaddingLeft"> > >android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:focusableInTouchMode="false"> > > > > Now the strange thing is, when I touch the group it no longer expands > or collapses. As soon as I uncomment the checkbox above, it does > expand/collapse when I touch the group. > > Does anybody know what's going on, and how to get it to expand/ > collapse even though the checkbox is in there? > > Regards, > Sebastiaan > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: weird rotation in CameraPreview
G1 camera preview only works properly if you run your app in landscape mode. Regards On Jun 11, 9:22 am, jpoke wrote: > Hi, all > > I got a silly question. I am using the code from ApiDemo CameraPreview > and it runs fine on my Gphone but the preview is rotated and > stretched. Could someone supply some hint please? > > 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] Traceview OutOfMemory error
Hello. I have been trying to use traceview for profiling my Android app. So far I have gotten it to work on very small parts of the program. If I use it for bigger chunks it creates too much information (.trace file is too large) and I get an OutOfMemory (heap memory) error from the java compiler. I tried some tricks with setting higher min and max heap memory values but no luck. If anyone has used traceview with similar effects before I would highly appreciate any tips you may have. Here are the details. First I am reproducing the error message: $ traceview.bat tmp.trace Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at com.android.traceview.TimeLineView.setData (TimeLineView.java:433) at com.android.traceview.TimeLineView.(TimeLineView.java: 316) at com.android.traceview.MainWindow.createContents (MainWindow.java:93) at org.eclipse.jface.window.Window.create(Window.java:426) at org.eclipse.jface.window.Window.open(Window.java:785) at com.android.traceview.MainWindow.run(MainWindow.java:58) at com.android.traceview.MainWindow.main(MainWindow.java:190) On windows traceview works from a batch file that is reproduced below. The last line is where I am mucking with the memory settings. That does not seem to affect the behavior though. The parameters-- -XX: +HeapDumpOnOutOfMemoryError -Xms2g -Xmx2g-- have been added by me ... again they have no effect. Maybe because they should be used when generating the .jar file itself? traceview.bat / rem don't modify the caller's environment setlocal rem Set up prog to be the path of this script, including following symlinks, rem and set up progdir to be the fully-qualified pathname of its directory. set prog=%~f0 rem Change current directory to where traceview is, to avoid issues with directories rem containing whitespaces. cd %~dp0 set jarfile=traceview.jar set frameworkdir= set libdir= if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=lib\ set libdir=lib\ if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=..\framework\ set libdir=..\lib\ :JarFileOk set jarpath=%frameworkdir%%jarfile% C:\Program Files\Java\jdk1.6.0_12\bin\java -XX: +HeapDumpOnOutOfMemoryError -Xms2g -Xmx2g -Djava.ext.dirs=%frameworkdir % -Djava.library.path=%libdir% -jar %jarpath% %* // Cheers, Boris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is possible get notified when the user send an SMS or make a call
Using the PhoneStateListener is the way to most easily listen for SMS and phone calls. Besides the Android documentation, this was a helpful tutorial: http://www.anddev.org/viewtopic.php?p=10527 On Jun 10, 6:11 am, Mika wrote: > Hi, > > You can do this by using content providers. You can listen to changes > in content://sms uri and for sent messages you go through content://sms/sent > and find the new sent messages. You can do similar thing with call log > or use PhoneStateListener and listen when the call is on hook, off > hook and idle. > > -Mika > > On Jun 10, 1:42 pm, Monkiki wrote: > > > > > I've been searching the application permissions and I see no way to > > make an app to enable getting notified when the user send an SMS or > > make a phone call. How can I accomplish this task? > > > 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] AVD Camera
HI All, I am new to Android development and I am working on an app that will use the camera to scan barcodes similar to many other apps out there. Based on what I have read here: http://developer.android.com/guide/developing/tools/emulator.html the AVD does not support any camera input. So what I did was I used some of the classes on this page: http://www.tomgibara.com/android/camera-source. I am streaming my local webcam over http and capturing the frames in the AVD and displaying them. This is working fine. Now that I have this working I wanted to look into how the http://code.google.com/p/zxing/ could be implemented. However I think these two implemenations don't work well together. zxing uses events such as Camera.PreviewCallback which I dont have access to using my camera capturing. Also the scanning is using the byte[] data passed into the event handler, and with my implementation I only have access to a bitmap. How have you guys worked around this limiation? Thanks, jgautier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ListView Query
Check out this forum post for ideas: http://www.anddev.org/creating_a_contextmenu_on_a_listview-t2438.html On Jun 11, 7:05 am, Mark Murphy wrote: > Dexter's Brain wrote: > > I have a ListView whose layout contains several TextViews. When an > > item is clicked on the ListView, is it possible to capture on which > > TextView he has clicked? > > You will want to call setOnItemClickListener() and/or > setOnItemSelectedListener() on the ListView. The former is for > screen-taps on list items; the latter is when the user scrolls to the > item via the trackball/d-pad and then clicks on it (again, with the > trackball/d-pad). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Looking for Android opportunties?http://wiki.andmob.org/hado --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Image Capture
Hi everyone, this is the code that I have for camera preview and image capture.I am trying to do camera preview and as I press the space button I am trying to take picture and save it in the picture gallery of the Android development phone. The code compiles fine,but as I press the space button,it captures the image and throws an exception and closes the application... I have no idea how to fix this.I have looked in a lot of places but haven't found a way to solve my problem. I desperately need help... Thanks! Sharmila. /** * Copyright (c) 2007, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.cameraapitest; import java.io.FileNotFoundException; import java.io.OutputStream; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.net.Uri; import android.os.Handler; import android.os.Message; import android.os.Bundle; import android.provider.MediaStore.Images; import android.provider.MediaStore.Video; import android.view.Menu; import android.view.MenuItem; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.KeyEvent; import android.hardware.Camera; import android.text.Layout; import android.util.Log; public class CameraApiTest extends Activity implements SurfaceHolder.Callback { private static final String TAG = "CameraApiTest"; Camera mCamera; boolean mPreviewRunning = false; public void onCreate(Bundle icicle) { super.onCreate(icicle); Log.e(TAG, "onCreate"); getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.camera_api_test); mSurfaceView = (SurfaceView)findViewById(R.id.surface); mSurfaceHolder = mSurfaceView.getHolder(); mSurfaceHolder.addCallback(this); mSurfaceHolder.setType (SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); } public boolean onCreateOptionsMenu(android.view.Menu menu) { MenuItem item = menu.add(0, 0, 0, "goto gallery"); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { Uri target = Uri.parse("content://media/external/ images/media"); Intent intent = new Intent(Intent.ACTION_VIEW, target); startActivity(intent); return true; } }); return true; } @Override protected void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); } Camera.PictureCallback mPictureCallback = new Camera.PictureCallback() { public void onPictureTaken(byte[] data, Camera c) { Log.e(TAG, "PICTURE CALLBACK: data.length = " + data.length); try { Bitmap bm = Bitmap.createBitmap (mSurfaceHolder.getSurfaceFrame().width(), mSurfaceHolder.getSurfaceFrame().height (),Bitmap.Config.RGB_565); OutputStream f=openFileOutput ("image.jpg",MODE_WORLD_READABLE); Canvas cnv=mSurfaceHolder.lockCanvas(); cnv.setBitmap(bm); bm.compress(Bitmap.CompressFormat.JPEG,100,f); mSurfaceHolder.unlockCanvasAndPost(cnv); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } mCamera.startPreview(); } }; public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { return super.onKeyDown(keyCode, event); } if (keyCode == KeyEvent.KEYCODE_SPACE) { mCamera.takePicture(null,null,mPictureCallback); return true; } return false; } protected void onResume() { Log.e(TAG, "onResume"); super.onResume(); } protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); } protected void onStop() { Log.e(TAG, "onStop"); super.onStop(); } public void surfaceCreated(SurfaceHolder holder) { Log.e(TAG, "surfaceCreated"); mCamera = Camera.open();
[android-developers] weird rotation in CameraPreview
Hi, all I got a silly question. I am using the code from ApiDemo CameraPreview and it runs fine on my Gphone but the preview is rotated and stretched. Could someone supply some hint please? 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] get accelerometer data at given freequencies
Hi! I'd like to know if there's the possibility to set up a chosen frequency to get sensor data to have for example 15 readings per second? The only way to get for accelerometer data is via an SensorListener? Or can I access directly to data via a function (if so it will be easy to achieve my needs using a for statement with a Sleep period)... thanks, Francesco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Why bother?
Hi all, I have a practical question. I might be interested in coding for Android. I have some J2ME programs that I could port that are very useful. But I am wondering, why bother? Consider: 1. Looking at the documentation for Android it seems to me that the learning curve for working with Android is large. 2. Looking at the available phones they are all about $500 without a contract. We're in a Recession and $500 is a lot of money. Compare that to my 3-inch touch screen Sciphone i68 which was $100 and has MIDP support. 3. I don't do contracts. I have heard that Android phones are hobbled by the requirement that I'd have to have a contract. I use prepaid exclusively to keep my phone bills down. 4. No contract means no data plan. 5. I can get a Windows Mobile phone for $260, called the CECT M88+. It will run native apps and J2ME. That's half the cost of an Android phone. 6. Regular consumers know we're in a recession. They are going to avoid expensive phones and long contracts more now than ever. Will $500 luxury Android phones take hold? I'm skeptical. 7. I am not someone who is easily impressed by Google. There is no "wow" factor for me in using Android. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 read rtsp streaming
hi, We have successfully played rtsp://ip:port/3gp file or rtsp://ip:port/mp4file rtsp://ip:port/sdp file link... no problem at all... There is bug in u r code: wrong code: mp.prepare(); mp.start(); CORRECT CODE: call mp.start() , OnPrepareComplted() { mp.start()} thx aor.leadapps On Thu, Jun 11, 2009 at 12:13 PM, yancaida...@gmail.com < yancaida...@gmail.com> wrote: > > To read rtsp streaming has been discussed a lot,but still not > solved .Now android 1.5 realised,can rtsp streaming be played in > android? > the method setDateSource seems provide a way to receive rtsp > streaming. > > public void setDataSource (String path) > > Sets the data source (file-path or http/rtsp URL) to use. > Parameters > paththe path of the file, or the http/rtsp URL of the stream you want > to play > Throws > IllegalStateException if it is called in an invalid state > IOException > IllegalArgumentException > > who knows how to use it?i wrote > > MediaPlayer mp =new MediaPlayer(); >try { >mp.setDataSource("rtsp://live.cri.cn/pop"); >mp.setAudioStreamType(AudioManager.STREAM_MUSIC); >mp.prepare(); >mp.start(); >} catch (IllegalArgumentException e) { >// TODO Auto-generated catch block >e.printStackTrace(); >} catch (IllegalStateException e) { >// TODO Auto-generated catch block >e.printStackTrace(); >} catch (IOException e) { >// TODO Auto-generated catch block >e.printStackTrace(); >} > > but didn't work.May be the parameter in setAudioStreamType is > wrongWho knows??please help me .Thank you.~~ > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to disable automatic redirect handling by HttpClient in Android 1.5?
Hello! As I understand by default HttpClient automatically handles Redirect replies from server (follows the redirect link included in the answer from a server). I wonder if and how is it possible to disable this behaviour and handle redirects manually, meaning that I can get redirect link from the reply, modify it and issue a new http request. In a "desktop" version of HttpClient/HttpMethod one can do it as follows: HttpMethod method = new GetMethod(requestUrl); method.setFollowRedirects(false); How can I do the same under Android? Thank you in advance for replies! Best regards, Eligijus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Practical question
Hi all, I have a practical question. I might be interested in coding for Android. I have some J2ME programs that I could port that are very useful. But I am wondering, why bother? Consider: 1. Looking at the documentation for Android it seems to me that the learning curve for working with Android is large. 2. Looking at the available phones they are all about $500 without a contract. We're in a Recession and $500 is a lot of money. Compare that to my 3-inch touch screen Sciphone i68 which was $100 and has MIDP support. 3. I don't do contracts. I have heard that Android phones are hobbled by the requirement that I'd have to have a contract. I use prepaid exclusively to keep my phone bills down. 4. No contract means no data plan. 5. I can get a Windows Mobile phone for $260, called the CECT M88+. It will run native apps and J2ME. This phone is half the cost of any Android phone. 6. Regular consumers know we're in a recession. They are going to avoid expensive phones and long contracts more now than ever. Will $500 luxury Android phones take hold? I'm skeptical. 7. I am not someone who is easily impressed by Google. There is no "wow" factor for me in using Android. 8. I'm aware that there will soon be a $300 Android i.e. the Sciphone N12, but it remains to be seen whether it will be the real thing or just another lookalike. Anyway that's still a lot of money. Opinions? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Playing iopd videos
YES. It plays. To play locally from sdcard: rename it to mp4. player api will play. >From Web: if its progressive m4v, it works. player.setds("http link of m4v"); if its non-progressive, u need to write a proxy to convert this non-progressive to progressive and provide to player api/ On Thu, Jun 11, 2009 at 12:30 PM, N V wrote: > > Hi to all... > > Can anyone tried to play ipod(m4v) videos in android > emulator... Does android > support ipod videos? > > Thank You > N V > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] J2ME or ANDROID eclipse usage
hi can i join your group im from mongolia --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AJAX API support on Android 1.5
Please suggest how can we use AJAX search apis on Andorid. I am making a http request for the url: http://ajax.googleapis.com/ajax/services/search/local. I am getting time 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: Browser doesn't respond to trackball click event (on certain webpage), touch screen click ok
I found this issue at http://www.douban.com/login too. With empty input in the entry, there is no response when click submit button. While the status of checkbox changed. It confused me :( BR, fanfan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Hi, I was really hoping someone could make something like this, it would be very helpful.
I was thinking it may be possible to create a app to run with the phone so the SMS are password protected, either with the path maker or letters and numbers. It would be nice to have the option to protect your sms and maby some of the folders in the gallery. Does any one think this may be possible to do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Internet Activity
Hi, I am using emulator for development. I am trying to connect http://www.google.co.in/ from my Activity. Inside my onCreate method I have the below piece of code. try { // Specify proxy settings // TODO: Move these settings to properties file Properties sysProperties = System.getProperties(); sysProperties.put("proxyHost", "my ip address"); sysProperties.put("proxyPort", "my port"); sysProperties.put("proxySet", "true"); sysProperties.put("http.proxyUser", "name"); sysProperties.put("http.proxyPassword", "password"); URL u = new URL("http://www.google.co.in/";); HttpURLConnection huc = (HttpURLConnection) u.openConnection(); huc.setRequestMethod("GET"); huc.setRequestProperty("Proxy-Authorization", "name:password"); huc.setDoOutput(true); huc.connect(); System.out.println("Response : " + huc.getResponseMessage()); System.out.println("Response code :" + huc.getResponseCode()); InputStream is = huc.getInputStream(); BufferedReader in = new BufferedReader(new InputStreamReader(is)); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); int code = huc.getResponseCode(); System.out.println("Http Response Code:" + code); // if (HTTP_OK == code) System.out.println("huc :" + huc); // else // return null; } catch (Exception e) { e.printStackTrace(); } For the output of the above code I am getting the below error: 06-10 19:51:05.029: INFO/System.out(3258): Response : Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. ) 06-10 19:51:08.278: INFO/System.out(3258): Response code :407 06-10 19:51:11.927: WARN/System.err(3258): java.io.FileNotFoundException: http://www.google.co.in/ I have added my credentilas in settings.db. Also I have added http_proxy in my environment variable. Also I have tried to invoke my emulator from command line. But I could not succeed. Please let me know if any of you solved this kind of issue. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How can I know whether SIP(Soft Input Panel - Keyboard view) is showing or not
I have a similar problem. The only way I know of is to override onSizeChanged in your View. You also need android:windowSoftInputMode=adjustResize set on your Activity. onSizeChanged will be called with the smaller available screen dimensions when the keyboard is overlaid. This works in portrait mode. For some reason though, onSizeChanged isn't called in landscape when the soft input is shown. I'm still trying to figure out why. Its possibly a bug, but maybe there's another event I should be looking for. On Apr 26, 11:02 pm, Figaro wrote: > Hi > I wonder it is possible to know whether SIP is showing to user or not. > A user application(Activity) can show or hide theSoftInputthrough > theInputMethod Manager. > There is some APIs to handle the SIP. But I can't find API to know > status of SIP(it is on showing or hiding). > > When SIP is showing to user. It disturbs the UI of the Activity. > So Activity should know about the information related with upper case. > How can I know that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 set an android sdk that I built with eclipse adt plugins
In eclipse menu..-> window--> preferences-->select android and set the SDK path(where SDK store in u r disk)---> apply---> restart eclipse --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Need help in understanding ContactsListActivity callSelection() implementation
Hi, In code callSelection of ContactsListActivity, it calls ListView's getSelectedItem and casts the return to Cursor. boolean callSelection() { ListView list = getListView(); if (list.hasFocus()) { Cursor cursor = (Cursor) list.getSelectedItem(); // omitted ... } But what I don't understand is ListView's getSelectedItem is calling AdapterView's getSelectedItem. And that should returns a View object, instead of a Cursor object, right? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AAC/AACP shoutcast player -- available
Well, We have developed aac/aacp supported shoutcast/icecast Online Radio player. Its hosted in market as free. package: com.leadapps.android.radio. Please play and let us know feedback. thanks aor.leadapps --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Silly question about CameraPreview rotated and stretched
Hi, all I am a newbie with android and I have a silly question with CameraPreview. I grab the code CameraPreview code from ApiDemo and run it on my HTC G1 from T-Mobile. It runs fine but showing with a weird angle and also rotated and stretched. I am not sure I missed something or not but it is exactly same with the ApiDemo code. Could someone give me some hint? Thanks in advance.:) Armstrong Liu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ExpandableListActivity onCreateContextMenu
Hi, I'm a bit of an android beginner, so I'd like someone to confirm this for me before I post a bug report, but it seems that the onCreateContextMenu() method in ExpandableListActivity is never called when I override it in my ExpandableListActivity subclass. If I use getExpandableListView().setOnCreateContextMenuListener(myListener) to set the listener directly on the expandable list view, then the listener *is* called. When I look in the source of ExpandableListActivity I see in the onContentChanged() method that it registers itself as a listener for onChildClick, onGroupExpand and onGroupCollapse. However it does not register itself for the context menu event listener: @Override public void onContentChanged() { super.onContentChanged(); View emptyView = findViewById(com.android.internal.R.id.empty); mList = (ExpandableListView)findViewById(com.android.internal.R.id.list); if (mList == null) { throw new RuntimeException( "Your content must have a ExpandableListView whose id attribute is " + "'android.R.id.list'"); } if (emptyView != null) { mList.setEmptyView(emptyView); } mList.setOnChildClickListener(this); mList.setOnGroupExpandListener(this); mList.setOnGroupCollapseListener(this); if (mFinishedStart) { setListAdapter(mAdapter); } mFinishedStart = true; } Shouldn't it also have the line: mList.setOnCreateContextMenuListener(this); in there? Regards, Sebastiaan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Debugging sample app Snake
I am using the android 1.5 and have compiled and run the Snake sample application on the Emulator, using Eclipse to launch it. When I try to debug it using the Eclipse environment I get the error: "Launch error: Failed to connect to remote VM. Connection refused." I do have the AndroidManifest.xml debuggable=true set and i went into the emulator and set Dev Tools > Development Settings> and checked "Wait for debugger", and added the snake app to the Debug App. So not sure what else to do to get it to work. I also turned off my firewall just in case too. Here is my log for the launch: 2009-06-10 17:02:44 - Android_Snake] Android Launch! [2009-06-10 17:02:44 - Android_Snake] adb is running normally. [2009-06-10 17:02:44 - Android_Snake] Performing com.example.android.snake.Snake activity launch [2009-06-10 17:02:44 - Android_Snake] Automatic Target Mode: Preferred AVD 'Cell15' is available on emulator 'emulator-5554' [2009-06-10 17:02:44 - Android_Snake] WARNING: Application does not specify an API level requirement! [2009-06-10 17:02:45 - Android_Snake] Device API version is 3 (Android 1.5) [2009-06-10 17:02:45 - Android_Snake] Application already deployed. No need to reinstall. [2009-06-10 17:02:45 - Android_Snake] Starting activity com.example.android.snake.Snake on device [2009-06-10 17:02:46 - Android_Snake] ActivityManager: Starting: Intent { comp={com.example.android.snake/ com.example.android.snake.Snake} } [2009-06-10 17:02:47 - Android_Snake] Attempting to connect debugger to 'com.example.android.snake' on port 8616 [2009-06-10 17:02:48 - Android_Snake] Launch error: Failed to connect to remote VM. Connection refused. Thanks in advance for any help. John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 you make SlidingDrawer slide from top of screen without custom code?
I love the SlidingDrawer widget, but would love to be able to have it slide down from the top of the screen (like the notification bar) vs. just the bottom. Is this possible, or am I looking at copying the code to create a custom implementation --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: (application) cannot be installed on this phone
I have the same exact problem. My application runs fine on the emulator under both 1.1 and 1.5. But when trying to install on the phone, I get a message with the title "Application not installed" and the message "(application) could not be installed on this phone.". I couple of weeks ago, I updated my SDK to 1.5r2. Today I just updated my phone to cupcake 1.5. My AndroidManifest.xml has minSdkVersion set to 2. I have a .apk I built with the 1.1 SDK a couple of days prior to installing the 1.5r2 SDK and it installs fine, so I suspect that the problem has to do with how the 1.5r2 SDK builds the .apk compared with how the 1.1 SDK did it. So I'm stumped as well. On Jun 10, 5:53 am, Mark Hansen wrote: > Has anyone had an error along the lines of "(application) cannot be > installed on this phone.", where the application name is in place of > (application). > > This is on cupcake, I have my version minSdkVersion set to 3, and I've > had no problems prior to this new version. > > Runs fine in the emulator, so I'm stumped? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 we need to pay any licensing fee, if we release a WMA based Radio app?
hi, do we need to pay any licensing fee, if we release a WMA based Radio app? thx aor.leadapps --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 do locale setting?
Hellow developers, I wanna add or remove locale items which are in Settings->Locale & Text->Select locale, I don't know how to do it. Would you like to give me some information about it? BR, Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] shoutcast aac/aacp player available at market com.leadapps.android.radio
shoutcast aac/aacp player available at market com.leadapps.android.radio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---