[android-developers] Re: Building on Ant
Hi, You should make sure you have set the JAVA_HOME and the ANT_HOME variables, also it is probably best to set the Android home as a environment variable (http://code.google.com/android/intro/ installing.html). Also, after setting these variables, add them to your system PATH variable, that way you will have access to the tools from any directory on your system. Ant usually runs just by calling the ant command from the folder where your build.xml file resides. If the build file is named different than build.xml you need to run ant -buildfile buildfilename. Hope this helps, Mihai On Dec 9, 2:49 pm, Tharun Kumar [EMAIL PROTECTED] wrote: Hi, I'm trying to build on Ant. But I'm stuck with a thing. When I try to run ant, I'm getting following error note on command prompt. I've copied the build.xml inside java folder. D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.6. 0_02\lib\tools.jar Buildfile: build.xml does not exist! Build failed Prior to this, I've set JAVA_HOME environment variable. Which is the right path to copy the build.xml? Can you someone help on this? Regards, Tharun --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Receiving SMS Messages in 1.0?
Hi, The permissions you need to receive and send SMS are uses-permission android:name=android.permission.RECEIVE_SMS / uses-permission android:name=android.permission.SEND_SMS / About binarys SMS, AFAIK is not possible to emulate binanies SMS from DDMS. Maybe there is an option via telnet (doing a telnet to the emulator port, it opens an emulator console..look there if there is an appropiate command for binaries sms)..but I have not checked it (I did that by means of another phone emulator) About receiving binary SMS, I was trying to send them using a port..but in the emulator I was not able to receive them by port...But I think it is just an emulator problem, because Joe says this works on the G1. Cheers On Dec 9, 5:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Cristina, First off, thanks for the code, I have been looking everywhere for this and was annoyed to only find references to code from the outdated SDK's. Just a couple of questions for you. I'm trying to implement your code above and was wondering what permissions need to be added to the manifest file. Also, I'm still fairly new to this, is there a way to send binary SMS's to the emulator through either DDMS or a command line? My app will intercept and handle small binary files sent via SMS from non android devices. I have the binary files, and would prefer not to write another android app and set up a new emulator just to be able to send the files via SMS. Thanks in advance for any help. Chris On Dec 4, 9:30 am, Cristina [EMAIL PROTECTED] wrote: Hi Joe, Firt of all, thanks for the code. However I have tested your code with the emulator and does not work for me. So there must be something I am doing wrong. Have you checked that with the emulator or with the G1? I am doing my tests in the emulator because I still don't hava a phone yet. Can you provide the code you use to send de binarySMSand to receive it in the broadcastreceiver? Thanks Cristina On Dec 4, 11:22 am, joe.scheidegger [EMAIL PROTECTED] wrote: Hi all i have found the way how you can receive a binarysmsaddressed to an application port! You must create a BroadcastReceiver and then you must put the following in the manifest file: receiverandroid:name=.YourBroadcastReceiver intent-filter action android:name=android.intent.action.DATA_SMS_RECEIVED / data android:scheme=sms/ dataandroid:host=localhost/ dataandroid:port=your port/ /intent-filter /receiver and then you must add the following permission: uses-permissionandroid:name=android.permission.RECEIVE_SMS/uses- permission have fun! cheers joe- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.util.Timer NOT make sense in Activity?
Ya, it better to stick to Handler.postX(Runnable) technique. I dont know about TimerTask in particular but i have noticed if you try to stop a thread you created, it does not stop. Btw, when you resched ur task are yoy getting an Illegal Thread state Exception ? Can you post the stack trace? On Dec 10, 11:55 am, cindy [EMAIL PROTECTED] wrote: I used timer.schedule(timerTask,0,1000); then use timer.cancel() to stop the job. It works fine. But after I call timer.schedule(timerTask, 0,1000) again to start the same task, android crashed. Following is my timerTask code. So I guess Timer is not work in android: class updateTime extends TimerTask { public void run() { audioTime.post(new Runnable() { public void run() { recordTime++; int hour=(int)recordTime/3600; int min=(recordTime-hour*3600)/60; int sec=recordTime-hour*3600-min*60; String hStr, mStr, sStr; if(hour10) hStr=0+hour; else hStr=+hour; if(min10) mStr=0+min; else mStr=+min; if(sec10) sStr=0+sec; else sStr=+sec; String timeStr=hStr+:+mStr+:+sStr; audioTime.setText(timeStr); } }); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Receiving SMS Messages in 1.0?
Though I have not sent a binary SMS,i think this would work http://code.google.com/android/reference/android/telephony/gsm/SmsManager.html#sendDataMessage(java.lang.String,%20java.lang.String,%20short,%20byte[],%20android.app.PendingIntent,%20android.app.PendingIntent)http://code.google.com/android/reference/android/telephony/gsm/SmsManager.html#sendDataMessage%28java.lang.String,%20java.lang.String,%20short,%20byte%5B%5D,%20android.app.PendingIntent,%20android.app.PendingIntent%29 with the address of the dest number being the emulator instance like 5554,5556 and 5558.Ofcourse you need to start the emulator instance you are passing in the dest number field... On Wed, Dec 10, 2008 at 1:38 PM, Cristina [EMAIL PROTECTED] wrote: Hi, The permissions you need to receive and send SMS are uses-permission android:name=android.permission.RECEIVE_SMS / uses-permission android:name=android.permission.SEND_SMS / About binarys SMS, AFAIK is not possible to emulate binanies SMS from DDMS. Maybe there is an option via telnet (doing a telnet to the emulator port, it opens an emulator console..look there if there is an appropiate command for binaries sms)..but I have not checked it (I did that by means of another phone emulator) About receiving binary SMS, I was trying to send them using a port..but in the emulator I was not able to receive them by port...But I think it is just an emulator problem, because Joe says this works on the G1. Cheers On Dec 9, 5:34 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Cristina, First off, thanks for the code, I have been looking everywhere for this and was annoyed to only find references to code from the outdated SDK's. Just a couple of questions for you. I'm trying to implement your code above and was wondering what permissions need to be added to the manifest file. Also, I'm still fairly new to this, is there a way to send binary SMS's to the emulator through either DDMS or a command line? My app will intercept and handle small binary files sent via SMS from non android devices. I have the binary files, and would prefer not to write another android app and set up a new emulator just to be able to send the files via SMS. Thanks in advance for any help. Chris On Dec 4, 9:30 am, Cristina [EMAIL PROTECTED] wrote: Hi Joe, Firt of all, thanks for the code. However I have tested your code with the emulator and does not work for me. So there must be something I am doing wrong. Have you checked that with the emulator or with the G1? I am doing my tests in the emulator because I still don't hava a phone yet. Can you provide the code you use to send de binarySMSand to receive it in the broadcastreceiver? Thanks Cristina On Dec 4, 11:22 am, joe.scheidegger [EMAIL PROTECTED] wrote: Hi all i have found the way how you can receive a binarysmsaddressed to an application port! You must create a BroadcastReceiver and then you must put the following in the manifest file: receiverandroid:name=.YourBroadcastReceiver intent-filter action android:name=android.intent.action.DATA_SMS_RECEIVED / data android:scheme=sms/ dataandroid:host=localhost/ dataandroid:port=your port/ /intent-filter /receiver and then you must add the following permission: uses-permissionandroid:name=android.permission.RECEIVE_SMS/uses- permission have fun! cheers joe- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How To Start a RTSP connection
MediaPlayer m = new MediaPlayer(); m.setDataSource(rtsp://rtsp.yourserver.com/stream.mp3); m.prepare(); m.start(); You probably want to call the prepare() statement from something other than your UI thread, because it may take awhile. Alternatively, you can call prepareAsync() and call start() from the onPreparedListener. On Dec 9, 12:42 pm, Jona [EMAIL PROTECTED] wrote: Could someone help me figure out how to initialize the MediaPlayer to play an RTSP link? The link is only audio there is no video... would this matter? Thanksin Advance!!! Jona --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Building on Ant
Hi Fred, Now, I'm not facing the location error. But one more error is occurring D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant - buildfile C:\myAndroid\build.xml Buildfile: C:\myAndroid\build.xml dirs: [echo] Creating output directories if needed... resource-src: [echo] Generating R.java / Manifest.java from the resources... aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 2 source files to C:\myAndroid\bin\classes dex: [echo] Converting compiled files and external libraries into bin/ classes.de x... package-res: package-res-no-assets: [echo] Packaging resources... debug: [echo] Packaging bin/HelloAndroid-debug.apk, and signing it with a debug ke y... [exec] java.lang.NoClassDefFoundError: com/android/prefs/ AndroidLocation$An droidLocationException [exec] Exception in thread main BUILD FAILED Exception error is occurring. How to resolve this? Regards, Tharun On Dec 10, 1:39 am, Fred Grott(shareme) [EMAIL PROTECTED] wrote: Just install JDK in directory without spaces and than set JAVA HOME to that and the problem will go away On Dec 9, 2:34 pm, Fred Grott(shareme) [EMAIL PROTECTED] wrote: Tharun install JDK in directory without spaces and tell ant to find the tools.jar from that install..ie Ant should be launched from your jdk install.. Its only a headache on windows :) On Dec 9, 6:49 am, Tharun Kumar [EMAIL PROTECTED] wrote: Hi, I'm trying to build on Ant. But I'm stuck with a thing. When I try to run ant, I'm getting following error note on command prompt. I've copied the build.xml inside java folder. D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.6. 0_02\lib\tools.jar Buildfile: build.xml does not exist! Build failed Prior to this, I've set JAVA_HOME environment variable. Which is the right path to copy the build.xml? Can you someone help on this? Regards, Tharun- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to send email programmatically?
On Dec 9, 12:47 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: There is no standard settings dialog, we already have to e-mail apps that are very different: gmail and email. I don't think it makes sense to try to come up with a general-purpose UI for this as part of the platform, though of course making one that others can re-use embedded in their apps would be great. I don't think a general-purpose UI for sending email sounds useful, but a general-purpose API for email definitely sounds useful. Obviously, it would have to be a privilege you grant an application (access your email and send email on your behalf seem like good candidates), but given that the phone is so connected to my gmail account, I was really surprised to not be allowed to take advantage of it from my own apps. For example, one of the first apps I wanted to write was something that would hook into an incoming mail notification and play custom notification sounds based on simple message-matching rules. I don't think it's doable unless I want to duplicate IMAP client functionality and force the user to provide/manage duplicate credentials. Pretty lame from a platform standpoint. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Contacts insertion failure
HI all, Appreciate if some one could shed some light on my below query. A passing thought that just popped up in my mind regarding this issue. If the phonebook is not able insert record then wouldn't it be throwing an SQLLiteException. So even during memory full case can we expect the same behavior... Looking forward to some response Regards Abraham On Dec 9, 11:57 am, Abraham [EMAIL PROTECTED] wrote: HI all, I had a query regarding the behavior of insert method when contact insertion failure occures. Assume that the phone memory is full no more contacts can be added to the phone. While a user attempts to insert a contact into People Phones table in this scanrio what would be the URI that would be returned. How can one determine from the URI returned whether the contact was added successfully or not. Thanks in advance for all the help. --Abraham --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: new activity from PhoneStateListener callback method
You should be able to define your own constructor or setter that takes the context as a parameter, no? Does that not work? MyPhoneStateListener(Context ctx) { sthustfo wrote: Hi, I would like to know how I can start a new activity from within the PhoneStateListener method, say onCallStateChanged(). I do understand that notifications must be used in general but since my test app deals with voice call, I was thinking of starting an activity. public class MyPhoneStateListener extends PhoneStateListener { public void onCallStateChanged(int state, String incomingNumber) { //Context context = this; Log.d(test, incomingNumber); // context.startActivity(new Intent(com.test.DOSOMETHING)); return; } } The problem is that in order to send an intent, I do not have the 'context' available in the onCallStateChanged() method. In this case, how I can send an intent using startActivity? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: new activity from PhoneStateListener callback method
You should be able to define your own constructor or setter that takes the context as a parameter, no? Does that not work? MyPhoneStateListener(Context ctx) { sthustfo wrote: Hi, I would like to know how I can start a new activity from within the PhoneStateListener method, say onCallStateChanged(). I do understand that notifications must be used in general but since my test app deals with voice call, I was thinking of starting an activity. public class MyPhoneStateListener extends PhoneStateListener { public void onCallStateChanged(int state, String incomingNumber) { //Context context = this; Log.d(test, incomingNumber); // context.startActivity(new Intent(com.test.DOSOMETHING)); return; } } The problem is that in order to send an intent, I do not have the 'context' available in the onCallStateChanged() method. In this case, how I can send an intent using startActivity? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: new activity from PhoneStateListener callback method
You should be able to define your own constructor or setter that takes the context as a parameter, no? Does that not work? MyPhoneStateListener(Context ctx) { this.ctx = ctx; } or something - sthustfo wrote: Hi, I would like to know how I can start a new activity from within the PhoneStateListener method, say onCallStateChanged(). I do understand that notifications must be used in general but since my test app deals with voice call, I was thinking of starting an activity. public class MyPhoneStateListener extends PhoneStateListener { public void onCallStateChanged(int state, String incomingNumber) { //Context context = this; Log.d(test, incomingNumber); // context.startActivity(new Intent(com.test.DOSOMETHING)); return; } } The problem is that in order to send an intent, I do not have the 'context' available in the onCallStateChanged() method. In this case, how I can send an intent using startActivity? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Contact insertion successfull...But contact not be viewed through contacts app
HI All, I am facing a weird issue related to contacts. Issue: I'm able to insert a contact successfully to the phonebook from my application. But when I try verify the same by opening contacts application on SDK I'm not able to find this contact. My code for inserting contact Cursor cur = managedQuery(People.CONTENT_URI, new String[] { People._ID }, People.NAME + =? AND + People.NUMBER + =?, new String[] {contactName, contactNo }, null); if ((cur != null) (cur.getCount() == 0)) { ContentValues values = new ContentValues(); values.put(People.NAME, contactName); Uri uri = getContentResolver().insert (People.CONTENT_URI, values); // insert to People's table values.clear(); values.put(Phones.PERSON_ID, ContentUris.parseId (uri)); values.put(PhonesColumns.NUMBER, contactNo); values.put(PhonesColumns.TYPE, PhonesColumns.TYPE_MOBILE); getContentResolver().insert(Phones.CONTENT_URI, values); // insert to Phone's table. Am I missing or doing something wrong while insert opertion. How can I ensure that the newly added contact is visible when I launch my contacts application on SDK. Another observation: If I launch Contacts List view from my application by following code the contact added can be viewed. Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT_REQUEST); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] detect earphone
Hello, Anyone know how to detect if the ugly earphone has been plugged? Any API related to this? thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: the fastest way to draw on screen
To be honest the surface in created in C, as char* and originally i wanted to use 16bit colour, but Bitmap takes int[], which means i have to use 32bit, is there a way i can solve it to use 16bit? On 9 Dec, 17:38, Mike Reed [EMAIL PROTECTED] wrote: I am assuming you have predrawn what you want in the Bitmap. If so, be sure that the Bitmap's config matches your window (typically 565), otherwise things will go a lot slower, as we depth-convert your Bitmap each time it is drawn. If you have a large area that is a solid color, it might be faster to draw that (via canvas.drawColor or canvas.drawRect) and then draw the bitmap. It all depends, but the fastest a Bitmap can go is memcpy, but drawing a large area in a solid color can use memset, which is faster for the same number of dst pixels. On Dec 9, 2008, at 11:54 AM, Romkin wrote: What is the fastest way to draw on screen? currently we use OnDraw and have Bitmap, but is there a faster way to draw pixel array to screen? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Exception error while building on Ant
Hi, When try to build on Ant, I'm facing this problem, D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant - buildfile C:\myAndroid\build.xml Buildfile: C:\myAndroid\build.xml dirs: [echo] Creating output directories if needed... resource-src: [echo] Generating R.java / Manifest.java from the resources... aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 2 source files to C:\myAndroid\bin\classes dex: [echo] Converting compiled files and external libraries into bin/ classes.de x... package-res: package-res-no-assets: [echo] Packaging resources... debug: [echo] Packaging bin/HelloAndroid-debug.apk, and signing it with a debug ke y... [exec] java.lang.NoClassDefFoundError: com/android/prefs/ AndroidLocation$An droidLocationException [exec] Exception in thread main BUILD FAILED Exception error is occurring. How to resolve this? Regards, Tharun --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Contact insertion successfull...But contact not be viewed through contacts app
I believe the built in Contacts app is using the My Contacts group, not just all of the contents of the People table, etc. Looks like (at a quick glance) you are putting a record in People just fine, but not also putting the record in the group. You might find it easier to use the static creatPersonInMyContactsGroup method on the Contacts.People class (or one of the other static methods there to add an existing Person to the group, etc). http://code.google.com/android/reference/android/provider/Contacts.People.html On Dec 10, 4:45 am, Abraham [EMAIL PROTECTED] wrote: HI All, I am facing a weird issue related to contacts. Issue: I'm able to insert a contact successfully to the phonebook from my application. But when I try verify the same by opening contacts application on SDK I'm not able to find this contact. My code for inserting contact Cursor cur = managedQuery(People.CONTENT_URI, new String[] { People._ID }, People.NAME + =? AND + People.NUMBER + =?, new String[] {contactName, contactNo }, null); if ((cur != null) (cur.getCount() == 0)) { ContentValues values = new ContentValues(); values.put(People.NAME, contactName); Uri uri = getContentResolver().insert (People.CONTENT_URI, values); // insert to People's table values.clear(); values.put(Phones.PERSON_ID, ContentUris.parseId (uri)); values.put(PhonesColumns.NUMBER, contactNo); values.put(PhonesColumns.TYPE, PhonesColumns.TYPE_MOBILE); getContentResolver().insert(Phones.CONTENT_URI, values); // insert to Phone's table. Am I missing or doing something wrong while insert opertion. How can I ensure that the newly added contact is visible when I launch my contacts application on SDK. Another observation: If I launch Contacts List view from my application by following code the contact added can be viewed. Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivityForResult(intent, PICK_CONTACT_REQUEST); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MenuBuilder
Hi, ya.. when i added to my app.. MenuBuilder as error like MenuBuilder cannot be resolved to a type. i have done like this MenuBuilder builder = new MenuBuilder(this);http://wiki.droiddocs.net/Reference:Android.widget.MenuBuilder#MenuBuilder http://wiki.droiddocs.net/Reference:Android.widget.MenuBuilder#MenuBuilder kindly guide me. On Wed, Dec 10, 2008 at 5:51 AM, Charlie Collins [EMAIL PROTECTED]wrote: Yes. It's not called MenuBuilder but the Menu class has methods to let you add MenuItems in a variety of ways. http://code.google.com/android/reference/android/view/Menu.html On Dec 10, 1:00 am, diya blore [EMAIL PROTECTED] wrote: Hi All,Do we have MenuBuilder object in android api's? -- Thank's in adv. Diya :) -- Thank's in adv. Diya :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make an application run at boot-up?
Re-reading your question, I may not understand exactly what you want to do on second thought. I use the receiver approach to start Services at boot time, I am not sure if you can start an Activity that way or not - but either way you probably don't really want to start an application (meaning Activity) at boot time? That would be annoying for users (unless it's a special case, closed platform only for your corporate users or something - and even then still annoying). On Dec 10, 5:56 am, Charlie Collins [EMAIL PROTECTED] wrote: You need to create a BroadcastReceiver, use the RECEIVE_BOOT_COMPLETED permission in the manifest, and catch the ACTION_BOOT_COMPLETED action. http://code.google.com/android/reference/android/content/Intent.html#... On Dec 9, 6:05 am, VVPrasad [EMAIL PROTECTED] wrote: Hi, Can some one please help us know how to make an applicationrunat boot-up? Thanks in advance --VVPrasad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] bindBrowser what does it do?
I am going through the process of embedding webkit to develop an applicatin using html, css, and javascript and a little native classes thrown in I was looknig at PhoneGap code which now supports Android and was wondering what bindBrowser(webviewObject) does.. Thanks for whatever answer you can provide --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Exception error while building on Ant
Hi Fred, I'm unable find to autoandroid in code.google.com. Could you tell me the exact name of it? Regards, Tharun On Dec 10, 4:23 pm, Fred Grott(shareme) [EMAIL PROTECTED] wrote: Its not finding the anndroid.jar via the sdk.. Go to googlecode and in the search box type autoandroid..its the ant library most developers use once that is set up it detects your SDK home location and handles that.. On Dec 10, 4:41 am, tharun [EMAIL PROTECTED] wrote: Hi, When try to build on Ant, I'm facing this problem, D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant - buildfile C:\myAndroid\build.xml Buildfile: C:\myAndroid\build.xml dirs: [echo] Creating output directories if needed... resource-src: [echo] Generating R.java / Manifest.java from the resources... aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 2 source files to C:\myAndroid\bin\classes dex: [echo] Converting compiled files and external libraries into bin/ classes.de x... package-res: package-res-no-assets: [echo] Packaging resources... debug: [echo] Packaging bin/HelloAndroid-debug.apk, and signing it with a debug ke y... [exec] java.lang.NoClassDefFoundError: com/android/prefs/ AndroidLocation$An droidLocationException [exec] Exception in thread main BUILD FAILED Exception error is occurring. How to resolve this? Regards, Tharun- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Spinner - problems with padding and wrap_content
Hello I got the following XML style for my spinner: http://paste.pocoo.org/show/94667/ (just a snippet) In code I'm adding content to the spinner like this: http://paste.pocoo.org/show/94668/ (just a snippet) But this leads me to the following result: http://img.skitch.com/20081210-g99wxamu3qw4dd4n11fbm14y1n.jpg Why does the spinner ignore the paddingRight = 10px and why does the spinner not wrap around the content? (I don't want to use fill_parent for the width) I'm looking forward reading your help. Regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapActivity Problem --Debugs but won't launch from signed apk.
I would assume that there is an additional check on the app that there is a map key for it on the phone that is not present in the emulator. Try it with a map key and see what happens on the phone. Ludwig 2008/12/10 joshbeck [EMAIL PROTECTED] Problem: -I have the simplest MapActivity known to Android. (Code Below) -In Eclipse I run as-Android Application (G1 connected in debug mode.) -Works fine. Gray Grid is displayed. -Once I export, sign, and download it to my phone as an apk it says: -Install Successful! -The 'LAUNCH' button is grayed out. (Can't launch it.) -The application doesn't appear anywhere on the phone. -I do have '3rd Party Apps' enabled. Any help or insight is appreciated! Thanks, Josh Beck Here is my code: -- maptest.java -- imports --ALL CORRECT-- public class maptest extends MapActivity { protected MapView MyMapView = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MyMapView = new MapView (this,MyApiKeyDerivedFromKeystoreMD5); setContentView(MyMapView); } @Override protected boolean isRouteDisplayed() { return false; } } - MANIFEST ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.maptest uses-permission android:name=android.permission.INTERNET / application android:icon=@drawable/icon android:label=mymap uses-library android:name=com.google.android.maps / activity android:name=.maptest android:label=mymap1 intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest Any idea why it would debug but not run when installed as an apk? Thank you for any insight --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to make an application run at boot-up?
You need to create a BroadcastReceiver, use the RECEIVE_BOOT_COMPLETED permission in the manifest, and catch the ACTION_BOOT_COMPLETED action. http://code.google.com/android/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED On Dec 9, 6:05 am, VVPrasad [EMAIL PROTECTED] wrote: Hi, Can some one please help us know how to make an application run at boot-up? Thanks in advance --VVPrasad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MenuBuilder
Yes. It's not called MenuBuilder but the Menu class has methods to let you add MenuItems in a variety of ways. http://code.google.com/android/reference/android/view/Menu.html On Dec 10, 1:00 am, diya blore [EMAIL PROTECTED] wrote: Hi All,Do we have MenuBuilder object in android api's? -- Thank's in adv. Diya :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: start your application on camera button
Hi, So are you saying it cant be done ? There is no way I make my app launch when the user presses the CALL button ? Only access to 3rd party is by tapping their icon on the screen ? Or can I pretent to be the built-in app ? TIA Shimon On Dec 3, 10:26 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: The call button starts an activity, it doesn't send a broadcast, as described in the doc. (Yes this is inconsistent with the camera button and the camera button should probably be changed.) On Wed, Dec 3, 2008 at 11:32 AM, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote: Hi, I cant get this to work. I am trying this for the CALL_BUTTON and on the emulator. Added the lines below to my manifest. Created the MyReceiver class just like you do here. Then trying to register the receiver in OnCreate: IntentFilter filter = new IntentFilter (android.intent.action.CAMERA_BUTTON); Intent intnt = registerReceiver(mCallButtonIntentReceiver, filter); intnt always return null. What am I doing wrong here ? TIA Shimon On Nov 14, 10:09 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks Guys. I added a receiver with CAMERA_BUTTON intent-filter and it then triggers my Main application. But I am not getting the choose application dialog. Instead, both my Main application and camera application opens. activity android:name=MainApp android:label=@string/app_name android:theme=@android:style/Theme intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter intent-filter action android:name=android.intent.action.MY_INTENT/action category android:name=android.intent.category.DEFAULT / /intent-filter /activity receiver android:name=MyReceiver intent-filter action android:name=android.intent.action.CAMERA_BUTTON/ /intent-filter /receiver public class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent newIntent = new Intent(.android.intent.action.MY_INTENT); context.startActivity(newIntent); } } -abhi On Nov 14, 2:53 am, Ludwig [EMAIL PROTECTED] wrote: If you have more than one best matching activity for an intent is to offer you a list to pick the desired activity, with the option of using one as the default (ie do not ask again). It is easy to trigger, just by defining two activities with the same intent...Ludwig 2008/11/14 blindfold [EMAIL PROTECTED] What happens when more than one application has this in the manifest? Thanks On Nov 14, 8:53 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Register to receive the intent android.intent.action.CAMERA_BUTTON. Here's how you might add it to your app's manifest: receiver android:name=CameraButtonIntentReceiver intent-filter action android:name=android.intent.action.CAMERA_BUTTON/ /intent-filter /receiver -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: MapActivity Problem --Debugs but won't launch from signed apk.
Hello there, Thanks for the response. I debug using the actual device, but you are right. It probably treats the phone as if it were the emulator in that case. I've followed the directions and obtained an MD5 fingerprint of my keystore. I used the sign-up form and passed it the fingerprint in the form of XX:XX:XX ... etc. The form returned an api key, which I actually use in the place of this: MyMapView = new MapView (this,MyApiKeyDerivedFromKeystoreMD5); Logcat isn't giving me any useful information that might help me determine the cause. -Questions -How can I trouble shoot my api key to be sure it is not the root cause of the problem? (i.e. incorrect) -Does anyone know if there really is a check against the api key that would prevent the application from launching? (This would mean that map activities require network access in order to be launched?) Thanks again, Josh Beck On Dec 10, 6:23 am, Ludwig [EMAIL PROTECTED] wrote: I would assume that there is an additional check on the app that there is a map key for it on the phone that is not present in the emulator. Try it with a map key and see what happens on the phone. Ludwig 2008/12/10 joshbeck [EMAIL PROTECTED] Problem: -I have the simplest MapActivity known to Android. (Code Below) -In Eclipse I run as-Android Application (G1 connected in debug mode.) -Works fine. Gray Grid is displayed. -Once I export, sign, and download it to my phone as an apk it says: -Install Successful! -The 'LAUNCH' button is grayed out. (Can't launch it.) -The application doesn't appear anywhere on the phone. -I do have '3rd Party Apps' enabled. Any help or insight is appreciated! Thanks, Josh Beck Here is my code: -- maptest.java -- imports --ALL CORRECT-- public class maptest extends MapActivity { protected MapView MyMapView = null; [EMAIL PROTECTED] public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MyMapView = new MapView (this,MyApiKeyDerivedFromKeystoreMD5); setContentView(MyMapView); } [EMAIL PROTECTED] protected boolean isRouteDisplayed() { return false; } } - MANIFEST ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.maptest uses-permission android:name=android.permission.INTERNET / application android:icon=@drawable/icon android:label=mymap uses-library android:name=com.google.android.maps / activity android:name=.maptest android:label=mymap1 intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest Any idea why it would debug but not run when installed as an apk? Thank you for any insight --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Multiple email accounts
Hi Andrew, Many thanks for this, it's great! There's an application called ContactSync which at the moment only supports Outlook 2007. I'm pretty certain that most organisations still use previous versions of it so I'm basically wondering if you guys will create something that accommodates this? Blackberry dominates the Business market because of this and so if you were able to support, then Google will definitely give them and Apple a run for their money! All the best, Mukie On Dec 9, 5:33 pm, Andrew Stadler [EMAIL PROTECTED] wrote: Hello tanshin07, On the G1, the Gmail client (and related clients such as calendar) only support a single Gmail-based account. If you wish to check additional email accounts, however, you can use the Email client and configure them using IMAP access. If they are simple [EMAIL PROTECTED] accounts, they will auto-configure; If they are using Google Apps For Your Domain (see http://www.google.com/a/help/intl/en/org/) they'll still work but you'll have to manually configure them for IMAP. Note, you may need to configure each Gmail account to support IMAP access - see Settings and then Forwarding and POP/IMAP. On Tue, Dec 9, 2008 at 4:38 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi there, When using Android for the first time, it only allows you to register one of your gmail accounts. Would you be able to create a function that can allow you to sign on with a different account without having to go through the Internet? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
Mark Murphy wrote: Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :). * On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Exception error while building on Ant
Its not finding the anndroid.jar via the sdk.. Go to googlecode and in the search box type autoandroid..its the ant library most developers use once that is set up it detects your SDK home location and handles that.. On Dec 10, 4:41 am, tharun [EMAIL PROTECTED] wrote: Hi, When try to build on Ant, I'm facing this problem, D:\Tharun\DM_LJ\Android\apache-ant-1.7.1-bin\apache-ant-1.7.1\binant - buildfile C:\myAndroid\build.xml Buildfile: C:\myAndroid\build.xml dirs: [echo] Creating output directories if needed... resource-src: [echo] Generating R.java / Manifest.java from the resources... aidl: [echo] Compiling aidl files into Java classes... compile: [javac] Compiling 2 source files to C:\myAndroid\bin\classes dex: [echo] Converting compiled files and external libraries into bin/ classes.de x... package-res: package-res-no-assets: [echo] Packaging resources... debug: [echo] Packaging bin/HelloAndroid-debug.apk, and signing it with a debug ke y... [exec] java.lang.NoClassDefFoundError: com/android/prefs/ AndroidLocation$An droidLocationException [exec] Exception in thread main BUILD FAILED Exception error is occurring. How to resolve this? Regards, Tharun --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Anyone else seeing problems with the browser Google Sites?
Quick example; Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Try to download TNTManic_1.7.apk using the link from both a desktop browser the android built in one. On my system the desktop browser gives me the save as dialogue box, the android browser 404? Anyone else seeing this? Al. -- == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: bindBrowser what does it do?
Never mind found the answer On Dec 10, 5:20 am, Fred Grott(shareme) [EMAIL PROTECTED] wrote: I am going through the process of embedding webkit to develop an applicatin using html, css, and javascript and a little native classes thrown in I was looknig at PhoneGap code which now supports Android and was wondering what bindBrowser(webviewObject) does.. Thanks for whatever answer you can provide --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
Hi, I am trying to read non-local txt file, but I am getting error: java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator Any one has any idea? My code is like that: FileInputStream orifile = openFileInput(/data//samplefile.txt); BufferedReader bufReader = new BufferedReader(new FileReader(orifile.getFD())); I am able to read local file (created on my package). Arvind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error: java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator You probably don't have a file at /data/testing.txt. My code is like that: FileInputStream _orifile_ = openFileInput(/data//_samplefile_._txt_); openFileInput() accepts relative paths only. No leading slashes are allowed. openFileInput() represents files stored in an application-specific storage area. getFilesDir() will tell you where this is, IIRC. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: detect earphone
You want to register to receive Intent.ACTION_HEADSET_PLUG from package android.content. Check out: http://code.google.com/android/reference/android/content/Intent.html On Dec 10, 2:38 am, eric [EMAIL PROTECTED] wrote: Hello, Anyone know how to detect if the ugly earphone has been plugged? Any API related to this? thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to send email programmatically?
Mark Murphy wrote: [...] Those cases all require you to send emails. You can do this today. You need to get yourself a Java JAR that supports SMTP, ask the user for SMTP credentials (server, from address, SMTP authentication settings, etc.), and you're set. Speaking as a user, I don't want an app sending mail on my behalf, ever --- especially if it's through my account! But I *would* like an API that allows an app to launch the email application of my choice, with subject, recipient and body filled in, so that I can inspect it and press SEND if I choose. This has another advantage that it ought to be really easy to implement, requiring only a standardised intent with the data packed into it --- e.g. mailto://[EMAIL PROTECTED]body=Body, which is not only how the web does it, but is also a standard: http://www.rfc-editor.org/rfc/rfc2368.txt Am I right in thinking that the only thing this needs to work is that email apps declare themselves as supporting the mailto: data scheme? Do any Android email apps do this already? -- David Given [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to query for my current location?
I created the Listener and requested updates (see code below), but for some reason I'm not being notified. The method onStatusChanged() is being called instead, firstly with STATUS set to TEMPORARILY_UNAVAILABLE, then when I send the first GPS coordinate via DDMS, the method is called again with STATUS set to AVAILABLE, but the method onLocationChanged() is never called. Does anybody knows why this is happening? Am I missing something? LocationListener locList = new MyLocationListener(); m_locationMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locList);//new Intent (GPS_UPDATE)); class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location location) { setMapLocationCenter(location.getLatitude(), location.getLongitude()); } @Override public void onProviderDisabled(String provider) { return; } @Override public void onProviderEnabled(String provider) { return; } @Override public void onStatusChanged(String provider, int status, Bundle extras) { return; } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: the fastest way to draw on screen
If the image is predrawn, then you can just store it as .png, and then decode it (BitmapFactory) with a preferred config as RGB_565 (see BitmapFactory options). If the image is drawn by your code, and you can create a Bitmap in RGB_565, and use setPixels(int[]), which will down-sample your ints to 565 shorts for you. Either way, the resulting Bitmap will be 565, which should draw very quickly to the screen (assuming no matrix on the canvas, and no alpha or colorFilter or xfermode on the paint). On Dec 10, 2008, at 5:39 AM, Romkin wrote: To be honest the surface in created in C, as char* and originally i wanted to use 16bit colour, but Bitmap takes int[], which means i have to use 32bit, is there a way i can solve it to use 16bit? On 9 Dec, 17:38, Mike Reed [EMAIL PROTECTED] wrote: I am assuming you have predrawn what you want in the Bitmap. If so, be sure that the Bitmap's config matches your window (typically 565), otherwise things will go a lot slower, as we depth-convert your Bitmap each time it is drawn. If you have a large area that is a solid color, it might be faster to draw that (via canvas.drawColor or canvas.drawRect) and then draw the bitmap. It all depends, but the fastest a Bitmap can go is memcpy, but drawing a large area in a solid color can use memset, which is faster for the same number of dst pixels. On Dec 9, 2008, at 11:54 AM, Romkin wrote: What is the fastest way to draw on screen? currently we use OnDraw and have Bitmap, but is there a faster way to draw pixel array to screen? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Does android browser support plugins?
Does current android browser support pulgins whether the plugins are implemented by native code or java? If it does, how? As all know, gears is a plugin implemented by google. I investigated it, unfortunately, I haven't had a clear idea on it, anyone can help me? Best Regards Juliana --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android Dev Phone 1
From the order page (visible only after registering as a developer): Software features: ... * AndroidMarket ... So, yes. On Dec 9, 5:38 am, Joel [EMAIL PROTECTED] wrote: Thought this would be the best place to post this, as the Dev Phone is clearly not for typical users. However, on any of the pages with information about the Dev Phone 1, I don't see whether it supports the Android Market. Seems like it should be a simple question, so I'll post it as a yes/no. Using an Android Dev Phone 1 on att, will I have access to the Android Market on the phone? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Programatically Changing Default Name of Bluetooth Device Without Activating the Device Itself
Hi, I'm now investigating how to programatically change the default device name of bluetooth device (dream?) without activating the device, but as far as I looked over the code (around BluetoothSettings.java), it seems impossible, since the Preference is not a named SharedPreference. I assume that it is possible if activating the device (just do bluetoothManager.setName(brabra) right?), but I'd like to do it without activating it. Sorry for the bizzare request![?] Does anyone know about this kind of issue? Thanks, -- Daisuke Miyakawa (宮川大輔) [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~--- inline: 331.gif
[android-developers] Re: Android Dev Phone 1 + Shipping to Germany
Does the phone have to be shipped to the billing address or can I specify a different address to that on my Credit Card? On Dec 7, 5:53 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Any appropriate customs duties and taxes will be added on top of the $399 purchase price. You are correct, that this can add a substantial the base price. However, it should not add any hassle. Is there some specific difficulty you're referring to? Cheers, Justin Android Team @ Google On Dec 6, 2:13 am, Marc Seeger [EMAIL PROTECTED] wrote: Hi, I'm really interested in the possibility of buying a Android Dev Phone 1 (--http://code.google.com/android/dev-devices.html), the only question I have concerns the shipping. According to the site, it will be (?is?) available for order in Germany, I can't find any information about the details though. The price seems fair, but adding VAT + Import Taxes would add a BIG amount of money to the final number (and a lot of hassle). Does Google ship all of its devices from the US or are devices for European Devs shipped from inside the EU? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Get downloads at GetJar
If you’re interested in an alternative to the Andriod market, check out GetJar. We have 20 million downloads a month now. GetJar is testing in-app ads and payments to monetize your apps. The benefit of GetJar is that you can get free distribution and not rely on placement in the market. The leading apps get millions of downloads, such as Opera Mini. If you’re interested, check out http://www.getjar.com/software to see the top apps for all phones and http://my.getjar.com/site/developers to learn more. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] The problem of installing Repo
Dear Sirs: When I follow the steps of installing repo, I face the below errors. [EMAIL PROTECTED]:~/mydroid$ repo init -u http://android.git.kernel.org/platform/manifest.git Getting repo ... from git://android.kernel.org/tools/repo.git fatal: Unable to look up android.kernel.org (port 9418) (Name or service not known) Please help me solve this issue. Thanks a lot. Best Regards, Morris Chen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Has anybody received an android dev phone in the US yet?
Where in US are you? How long did it take to reach and what was the mode of shipping you used? I plan to order one if it is sure to reach in two weeks. And is it illegal to personally carry a single phone from US to UK? (Well without the carton box for myself). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Regarding .apk files
Hello, I would like to know, if i have only .apk file with me, how to get the APIs and Classes that are present in the .apk file. Please let me know if anybody has any idea. Thanks, Naina --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shipping a European dev phone to the US?
So is that a veiled yes then? ;) On Dec 8, 5:54 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: The charger that ships with theDevPhone1 works from 100-240V, so it supports European voltages, but you may need a plug adapter to physically adapt the plug. Additionally, if it doesn't come with one, you can just buy a USB-miniUSB cable and charge yourphonefrom your computer (this is what I often do). Cheers, Justin Android Team @ Google On Dec 8, 1:32 am, Jiri [EMAIL PROTECTED] wrote: I'm interested in buying the AndroidDevPhone1, which I'd mainly use in Finland and elsewhere in Europe. This means that I'd need to get the version that uses the Finnish GSM and UMTS band, and of course comes with a 230V charger. I'll be visiting the US over the holidays, so it'd be very convenient (read: probably faster and cheaper) for me to get thephoneshipped to a friend's place and pick it up from there. So my question is, is it possible to get the European version of thephoneshipped to an US address? Thanks, -Jiri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot finish download. There is not enough space.
Hi all, I'm still having this problem, I'm still using the original SD card and haven't done anything revolutionary with my software. Simply put, since the RC30 release I haven't been able to download files (images, in particular) at all...I get the Cannot finish download error. I've got at least 10x enough space on both the SD card and internal memory for the files in question...this is a major issue for me. Anyone else still having trouble? On Nov 12, 9:17 am, GasBot [EMAIL PROTECTED] wrote: Hey Guys, I figured out the problem I was having with this before. I had switched over to the 4GB MicroSD card that I was using in my Kaiser so I could manually update to RC29. For some reason, the Android OS thought that card was set to read only (even though I copied the file on there while it was inside the G1). After I swapped back to the 1GB card that came to the phone I was able to download without a problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: The problem of installing Repo
Morris wrote: When I follow the steps of installing repo, I face the below errors. This mailing list is for application developers. Questions regarding the Android open source project are best asked on lists for the Android open source project: http://source.android.com/discuss -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Does android browser support plugins?
Plugins aren't supported at this point. JBQ On Tue, Dec 9, 2008 at 11:13 PM, Juliana [EMAIL PROTECTED] wrote: Does current android browser support pulgins whether the plugins are implemented by native code or java? If it does, how? As all know, gears is a plugin implemented by google. I investigated it, unfortunately, I haven't had a clear idea on it, anyone can help me? Best Regards Juliana --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
Hi Mark, Thanks for reply, is there any methods to read non-local file (file present outside my application specific area). Arvind -Original Message- From: android-developers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Murphy Sent: Wednesday, December 10, 2008 7:52 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error: java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator You probably don't have a file at /data/testing.txt. My code is like that: FileInputStream _orifile_ = openFileInput(/data//_samplefile_._txt_); openFileInput() accepts relative paths only. No leading slashes are allowed. openFileInput() represents files stored in an application-specific storage area. getFilesDir() will tell you where this is, IIRC. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Shipping a European dev phone to the US?
Its not really either a 'yes' or a 'no', and there is no veil. The real point is there is no 'European version', every Android Dev Phone 1 charger will work anywhere in the world where power is between 100 and 240 volts. Cheers, Justin Android Team @ Google On Dec 10, 3:07 am, DazBy [EMAIL PROTECTED] wrote: So is that a veiled yes then? ;) On Dec 8, 5:54 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: The charger that ships with theDevPhone1 works from 100-240V, so it supports European voltages, but you may need a plug adapter to physically adapt the plug. Additionally, if it doesn't come with one, you can just buy a USB-miniUSB cable and charge yourphonefrom your computer (this is what I often do). Cheers, Justin Android Team @ Google On Dec 8, 1:32 am, Jiri [EMAIL PROTECTED] wrote: I'm interested in buying the AndroidDevPhone1, which I'd mainly use in Finland and elsewhere in Europe. This means that I'd need to get the version that uses the Finnish GSM and UMTS band, and of course comes with a 230V charger. I'll be visiting the US over the holidays, so it'd be very convenient (read: probably faster and cheaper) for me to get thephoneshipped to a friend's place and pick it up from there. So my question is, is it possible to get the European version of thephoneshipped to an US address? Thanks, -Jiri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Weird Map Problem (Controlling same map)
I'm glad that you've found a solution that works for you. Yes, unfortunately while we expect most Android devices to be pretty powerful and have fairly large amounts of memory, they still aren't desktop machines and more careful design and implementation will sometimes be necessary. Cheers, Justin Android Team @ Google On Dec 9, 5:42 pm, mscwd01 [EMAIL PROTECTED] wrote: Hi Justin, I too have spent a great deal of time debugging this - with little luck. Thanks for taking the time to explain your findings, it does help to understand what was going on. In the end I chose to redesign my application and use just the one MapView - mainly due to the memory issues. The reason I found myself in this problem was due to the fact I needed a TabHost and a MapView in the same activity. However I found I couldn't extend both a TabActivity and MapActivity in the same Activity so I opted to create my own TabbedMapActivity, created using the Android source code. I explained it all here if you want to see how I achieved this:http://groups.google.com/group/android-developers/browse_thread/threa... Ultimately, I believe you are right, having multiple MapViews will inevitable lead to memory issues regardless of how careful you are to save map states and recycle resources; so I think using just the one MapView is the only answer at this moment in time. Thanks On Dec 9, 11:49 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Once upon a time I spent a lot of time debugging this issue, so here is what I found. ***WARNING: This information was valid on an internal version of the SDK between M5-RC15 and 0.9 beta, it may no longer be valid, test thoroughly and proceed with caution.*** First, some information about MapView and MapActivity. Each Android process may have multiple MapViews and MapActivitys, but they all manipulate a single MapView backing object. This is because MapViews take a *huge* amount of memory, roughly half of the 16MB allowed to each application. This *also means* you need to be very careful about your memory usage when using MapView. Make sure to use DDMS to analyze memory usage to make sure you don't run out of space. Because a single view backs all map views in an application, you also need to save and restore the map state (including center position and zoom) when your MapActivity subclass pauses/resumes. For the purposes of discussion I will refer to two activities, ActivityAlpha and ActivityBeta, each is a subclass of MapActivity and has a MapView. ActivityAlpha starts ActivityBeta. The user will eventually return to ActivityAlpha either via the 'back' button or ActivityBeta finishing naturally. When ActivityBeta finishes, there are two issues that I believe causes the problem you see: 1) onCreate is not called on the launching ActivityAlpha, onResume is 2) a certain UI focal change doesn't occur Certain initialization of the MapView and various helper entities are done by MapActivity when onCreate is called. When ActivityBeta is launched, onPause is called on ActivityAlpha and the helpers for the MapView are stopped. onResume does some of the restarting, but clearly not all that is necessary. This can be worked around by calling super.onCreate(null) from your onResume or onActivityResult method of your launching MapActivity subclass. ***WARNING***: This is potentially very dangerous, MapActivity may not expect to be abused this way, test thoroughly and proceed with caution. The second issue results in the above hack not quite working. When ActivityBeta finishes, and the above hack is applied, ActivityAlpha is ready to load tiles, but it won't until the MapView is touched so that the MapView checks to see if it needs tiles. So far, I don't have a workaround for this, possibly a programmatic pan or zoom would cause the MapView to load any missing tiles. Some of my previous testing also indicated that any missing tiles would load when ActivityAlpha resumes if you use startActivity() to start ActivityBeta instead of startActivityForResult(). The bottom line is that maps were never designed to have multiple map views in a single application, they're very heavy objects. Hopefully this helps and is still valid information, let me know how it goes. Cheers, Justin Android Team @ Google On Dec 8, 5:39 pm, mscwd01 [EMAIL PROTECTED] wrote: Having tried the test you suggested it seems I can go back and forth between my Activity1 map and the inbuilt Google Maps app perfectly fine - no memory worries. However my application, constantly throws up OutOfMemory errors. One thing I have noticed is after Activity1 calls Activity2, Activity1 is never able to load additional tiles. It seems Activity2, even if it is destroyed after pressing the back button and returning to Activity1 always retains some kind of focus - If you reopen Activity 2, the map is
[android-developers] Re: Shipping a European dev phone to the US?
Hehe I meant in regard to getting one shipped to a US address but yeah thats good to know, thanks. On Dec 10, 3:44 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Its not really either a 'yes' or a 'no', and there is no veil. The real point is there is no 'European version', every Android Dev Phone 1 charger will work anywhere in the world where power is between 100 and 240 volts. Cheers, Justin Android Team @ Google On Dec 10, 3:07 am, DazBy [EMAIL PROTECTED] wrote: So is that a veiled yes then? ;) On Dec 8, 5:54 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: The charger that ships with theDevPhone1 works from 100-240V, so it supports European voltages, but you may need a plug adapter to physically adapt the plug. Additionally, if it doesn't come with one, you can just buy a USB-miniUSB cable and charge yourphonefrom your computer (this is what I often do). Cheers, Justin Android Team @ Google On Dec 8, 1:32 am, Jiri [EMAIL PROTECTED] wrote: I'm interested in buying the AndroidDevPhone1, which I'd mainly use in Finland and elsewhere in Europe. This means that I'd need to get the version that uses the Finnish GSM and UMTS band, and of course comes with a 230V charger. I'll be visiting the US over the holidays, so it'd be very convenient (read: probably faster and cheaper) for me to get thephoneshipped to a friend's place and pick it up from there. So my question is, is it possible to get the European version of thephoneshipped to an US address? Thanks, -Jiri --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Exception is raised when remove the last item in ExpandedListView
You didn't paste all of your code. But looking at the exception, it means that you are accessing a list item(at index 0, which means its of size 1) when infact the list is empty(size 0) . Its probably a bug in your code in the way you are removing the items --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Include/insert existing layout in an other layout ?
Hi all, I have a myform.xml layout with a simple form. I have also a main.xml layout. I would like to know if we can include/insert existing layout (myform.xml) in an other layout (main.xml). I would like to do that in my main.xml directly without use java programmation but if it's not possible let me know an other way to do. Something like that : Layout ... parent=@layout/myform ... / Thank you, Maxence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Programatically Changing Default Name of Bluetooth Device Without Activating the Device Itself
It gets set to the product name property the first time bluetooth is turned on. You could have it use another property. This is done internally by the bluez daemon. There is no easy way to change the device name with bt off, because the bluez daemon is not running. The bluetooth api is not available through the sdk, so this discussion should be on android-platform Nick Android Systems Engineer On 12/10/08, Daisuke Miyakawa [EMAIL PROTECTED] wrote: Hi, I'm now investigating how to programatically change the default device name of bluetooth device (dream?) without activating the device, but as far as I looked over the code (around BluetoothSettings.java), it seems impossible, since the Preference is not a named SharedPreference. I assume that it is possible if activating the device (just do bluetoothManager.setName(brabra) right?), but I'd like to do it without activating it. Sorry for the bizzare request![?] Does anyone know about this kind of issue? Thanks, -- Daisuke Miyakawa (宮川大輔) [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Clone inner-class Dalvik bug? or Don't do that
Hello. On the G1 Say you have a custom view class. It has an inner-class with some view state. This inner-class references some variables in the outer class. The outer-class instances the inner-class and holds a reference to it. Now, say you clone the inner class reference, and pass the copy to a new instance of the custom view in another activity (so the new view instance can pick up where the previous one left off). In the new activity, new view instance, inner-class view state clone, you find that the this pointer is that of the OLD view parent, and that attempts to access variables in the outer class access variables in the OLD outer class instance. In the debugger, it appears there is an anonymous pointer (Outer-class$0) to the enclosing outer-class that was not cloned / setup properly by the native clone helper and runtime. It still points back to the old outer-class. Not being an Uber Java Wonk(tm), you rewrite your code to not use inner-classes, and all works well. But you decide to write to the list and see if this is maybe a Dalvik bug, or just something you shouldn't try to do in the first place. -- Ward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
You might try just using java.io.File, which works well for me: File file = new File(/whatever/path/to/file.txt); try { InputStream in = new FileInputStream(file); ... } catch(Exception ex) { ... } I've noticed in the documentation that openFileInput() is supposed to be what you use, but I haven't determined if the above is not okay, and if not, why not. I'm doing this in several places, and it has never caused a problem. On Dec 10, 9:41 am, Chandrakar Aravind-rqj386 [EMAIL PROTECTED] wrote: Hi Mark, Thanks for reply, is there any methods to read non-local file (file present outside my application specific area). Arvind -Original Message- From: android-developers@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Murphy Sent: Wednesday, December 10, 2008 7:52 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator Chandrakar Aravind-rqj386 wrote: I am trying to read non-local txt file, but I am getting error: java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator You probably don't have a file at /data/testing.txt. My code is like that: FileInputStream _orifile_ = openFileInput(/data//_samplefile_._txt_); openFileInput() accepts relative paths only. No leading slashes are allowed. openFileInput() represents files stored in an application-specific storage area. getFilesDir() will tell you where this is, IIRC. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
kelly wrote: You might try just using java.io.File, which works well for me: File file = new File(/whatever/path/to/file.txt); try { InputStream in = new FileInputStream(file); ... } catch(Exception ex) { ... } That works, so long as you have read access to whatever it is you're trying to read. And, so long as you are able to put files wherever it is you're trying to read them from. I've noticed in the documentation that openFileInput() is supposed to be what you use, but I haven't determined if the above is not okay, and if not, why not. I'm doing this in several places, and it has never caused a problem. openFileInput() gives you a storage spot unique to your application in the on-board flash. It is not for use for, say, accessing /sdcard. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Include/insert existing layout in an other layout ?
include layout=@layout/blah / :) On Wed, Dec 10, 2008 at 5:18 PM, Maxence Warzecha [EMAIL PROTECTED] wrote: Hi all, I have a myform.xml layout with a simple form. I have also a main.xml layout. I would like to know if we can include/insert existing layout (myform.xml) in an other layout (main.xml). I would like to do that in my main.xml directly without use java programmation but if it's not possible let me know an other way to do. Something like that : Layout ... parent=@layout/myform ... / Thank you, Maxence -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
Ah, that makes sense. What I'm doing with the java.io.File approach is reading/writing to/from areas on the sd card. On Dec 10, 10:38 am, Mark Murphy [EMAIL PROTECTED] wrote: kelly wrote: You might try just using java.io.File, which works well for me: File file = new File(/whatever/path/to/file.txt); try { InputStream in = new FileInputStream(file); ... } catch(Exception ex) { ... } That works, so long as you have read access to whatever it is you're trying to read. And, so long as you are able to put files wherever it is you're trying to read them from. I've noticed in the documentation that openFileInput() is supposed to be what you use, but I haven't determined if the above is not okay, and if not, why not. I'm doing this in several places, and it has never caused a problem. openFileInput() gives you a storage spot unique to your application in the on-board flash. It is not for use for, say, accessing /sdcard. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenAL
ok, I've searched on the web but can't find a datasheet for the msm7201A which I believe to be the chip in the G1 ? Can you confirm that there is no positional audio in the G1 chipset ? I have a data sheet/brochure for the msm7200A which claims to support positional sound( QAudioFX™enhanced gaming audio for positional sound) , but obviously this is for an older chip, so has the functionality been removed or is it simply not up to scratch ? thanks On Dec 9, 4:36 pm, Dave Sparks [EMAIL PROTECTED] wrote: There is no 3D audio support in the G1, and it's unlikely that it will ever have more than rudimentary support for 3D audio (2D pan, distance, and doppler, and maybe basic environmental effects). I expect that future Android devices will have better 3D capability, but it's too early to project when that might happen. On Dec 9, 6:55 am, reillyse [EMAIL PROTECTED] wrote: ok, so is there any way to do 3D audio on the G1 ? regards Sean On Dec 8, 4:41 pm, Dave Sparks [EMAIL PROTECTED] wrote: Android does not have support forOpenALat this time. The G1 and iPhone chipsets are not the same, and even if they were, the software stacks are different. On Dec 8, 8:15 am, reillyse [EMAIL PROTECTED] wrote: Hi All, I've been searching for 3D audio support on the Android platform. I've usedopenALon other platforms (IPhone and Linux) but I can't find any mention of it in the android docs. Is there another way to do 3d sound on the android platform ? I knowopenALis open source and correct me if I'm wrong but I thought the audio chips in iphone and G1 were the same, so is there any barrier to usingopenalon the android platform ? regards, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Include/insert existing layout in an other layout ?
Ho my good it's so simple! I didn't see... Thank you Romain Guy ;) On 10 déc, 17:56, Romain Guy [EMAIL PROTECTED] wrote: include layout=@layout/blah / :) On Wed, Dec 10, 2008 at 5:18 PM, Maxence Warzecha [EMAIL PROTECTED] wrote: Hi all, I have a myform.xml layout with a simple form. I have also a main.xml layout. I would like to know if we can include/insert existing layout (myform.xml) in an other layout (main.xml). I would like to do that in my main.xml directly without use java programmation but if it's not possible let me know an other way to do. Something like that : Layout ... parent=@layout/myform ... / Thank you, Maxence -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Clone inner-class Dalvik bug? or Don't do that
Ward- This is not a Dalvik bug. It's a common side-effect of the way Java inner classes work. Not only will your approach not work properly, but it will cause significant memory leaks (the back-trail of outer-class this pointers will prevent the previous Activity from being GC'd). If you don't already have it, I would encourage you to check out Effective Java, which is loaded with tips that can steer you away from situations like this. http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ Back to your specific problem. The most important rule of thumb is that inner classes should be static whenever possible - this breaks the hidden linkage with the outer class, and makes them more appropriate for moving around. Depending on the complexity of what you're doing, you may also need to break it into two inner classes - one that's static for holding the data-to-be-shared, and one that's not static for doing things with its outer class. There are other solutions, but I would start there. --Andy On Wed, Dec 10, 2008 at 8:20 AM, Ward Willats [EMAIL PROTECTED] wrote: Hello. On the G1 Say you have a custom view class. It has an inner-class with some view state. This inner-class references some variables in the outer class. The outer-class instances the inner-class and holds a reference to it. Now, say you clone the inner class reference, and pass the copy to a new instance of the custom view in another activity (so the new view instance can pick up where the previous one left off). In the new activity, new view instance, inner-class view state clone, you find that the this pointer is that of the OLD view parent, and that attempts to access variables in the outer class access variables in the OLD outer class instance. In the debugger, it appears there is an anonymous pointer (Outer-class$0) to the enclosing outer-class that was not cloned / setup properly by the native clone helper and runtime. It still points back to the old outer-class. Not being an Uber Java Wonk(tm), you rewrite your code to not use inner-classes, and all works well. But you decide to write to the list and see if this is maybe a Dalvik bug, or just something you shouldn't try to do in the first place. -- Ward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to send email programmatically?
David- This is already supported in both the Email and Gmail apps. Is there a reason that you believed that it wasn't? Here is the raw Javadoc straight from Intent.ACTION_VIEW: /** * Activity Action: Display the data to the user. This is the most common * action performed on data -- it is the generic action you can use on * a piece of data to get the most reasonable thing to occur. For example, * when used on a contacts entry it will view the entry; when used on a * mailto: URI it will bring up a compose window filled with the information * supplied by the URI; when used with a tel: URI it will invoke the * dialer. * pInput: [EMAIL PROTECTED] #getData} is URI from which to retrieve data. * pOutput: nothing. */ So all you have to do is create an intent with the ACTION_VIEW action, a mailto:; scheme in the Uri, and send it. Hope this helps. --Andy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: java.util.Timer NOT make sense in Activity?
cindy wrote: But this implementation doesn't have same functionality as Timer, you can't update the screen at predefined interval. That implementation has a predefined interval of 3000 milliseconds -- the second parameter to the postDelayed() call. If you want a different interval, change that value. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Change screen brightness immediately
Does anyone know how to change the brightness immediately? I'm looking for a response to: http://groups.google.com/group/android-developers/browse_thread/thread/432802c9ad58d4f5/8adbb7c9c129519a?lnk=gstq=brightness#8adbb7c9c129519a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Weird Map Problem (Controlling same map)
Mark, Great book. I recommend it to all. I like the subscription model also. Very cool. Bob On Dec 10, 7:57 am, Justin (Google Employee) [EMAIL PROTECTED] wrote: I'm glad that you've found a solution that works for you. Yes, unfortunately while we expect most Android devices to be pretty powerful and have fairly large amounts of memory, they still aren't desktop machines and more careful design and implementation will sometimes be necessary. Cheers, Justin Android Team @ Google On Dec 9, 5:42 pm, mscwd01 [EMAIL PROTECTED] wrote: Hi Justin, I too have spent a great deal of time debugging this - with little luck. Thanks for taking the time to explain your findings, it does help to understand what was going on. In the end I chose to redesign my application and use just the one MapView - mainly due to the memory issues. The reason I found myself in this problem was due to the fact I needed a TabHost and a MapView in the same activity. However I found I couldn't extend both a TabActivity and MapActivity in the same Activity so I opted to create my own TabbedMapActivity, created using the Android source code. I explained it all here if you want to see how I achieved this:http://groups.google.com/group/android-developers/browse_thread/threa... Ultimately, I believe you are right, having multiple MapViews will inevitable lead to memory issues regardless of how careful you are to save map states and recycle resources; so I think using just the one MapView is the only answer at this moment in time. Thanks On Dec 9, 11:49 pm, Justin (Google Employee) [EMAIL PROTECTED] wrote: Once upon a time I spent a lot of time debugging this issue, so here is what I found. ***WARNING: This information was valid on an internal version of the SDK between M5-RC15 and 0.9 beta, it may no longer be valid, test thoroughly and proceed with caution.*** First, some information about MapView and MapActivity. Each Android process may have multiple MapViews and MapActivitys, but they all manipulate a single MapView backing object. This is because MapViews take a *huge* amount of memory, roughly half of the 16MB allowed to each application. This *also means* you need to be very careful about your memory usage when using MapView. Make sure to use DDMS to analyze memory usage to make sure you don't run out of space. Because a single view backs all map views in an application, you also need to save and restore the map state (including center position and zoom) when your MapActivity subclass pauses/resumes. For the purposes of discussion I will refer to two activities, ActivityAlpha and ActivityBeta, each is a subclass of MapActivity and has a MapView. ActivityAlpha starts ActivityBeta. The user will eventually return to ActivityAlpha either via the 'back' button or ActivityBeta finishing naturally. When ActivityBeta finishes, there are two issues that I believe causes the problem you see: 1) onCreate is not called on the launching ActivityAlpha, onResume is 2) a certain UI focal change doesn't occur Certain initialization of the MapView and various helper entities are done by MapActivity when onCreate is called. When ActivityBeta is launched, onPause is called on ActivityAlpha and the helpers for the MapView are stopped. onResume does some of the restarting, but clearly not all that is necessary. This can be worked around by calling super.onCreate(null) from your onResume or onActivityResult method of your launching MapActivity subclass. ***WARNING***: This is potentially very dangerous, MapActivity may not expect to be abused this way, test thoroughly and proceed with caution. The second issue results in the above hack not quite working. When ActivityBeta finishes, and the above hack is applied, ActivityAlpha is ready to load tiles, but it won't until the MapView is touched so that the MapView checks to see if it needs tiles. So far, I don't have a workaround for this, possibly a programmatic pan or zoom would cause the MapView to load any missing tiles. Some of my previous testing also indicated that any missing tiles would load when ActivityAlpha resumes if you use startActivity() to start ActivityBeta instead of startActivityForResult(). The bottom line is that maps were never designed to have multiple map views in a single application, they're very heavy objects. Hopefully this helps and is still valid information, let me know how it goes. Cheers, Justin Android Team @ Google On Dec 8, 5:39 pm, mscwd01 [EMAIL PROTECTED] wrote: Having tried the test you suggested it seems I can go back and forth between my Activity1 map and the inbuilt Google Maps app perfectly fine - no memory worries. However my application, constantly throws up OutOfMemory errors. One thing I have noticed is after Activity1 calls
[android-developers] Re: Weird Map Problem (Controlling same map)
BobW wrote: Mark, Great book. I recommend it to all. I like the subscription model also. Very cool. Thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there a way to tell the emulator to kill an activity?
Is there a way to tell the emulator to kill an activity (not the entire process / just the activity)? An adb or ddms command perhaps? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Problem with Callbacks while restoring UI state
What is the right way to disable callback methods (onChangeListener etc) untill the UI is restored to the last status? While setting my UI back to the last status (setting checkboxes etc) a lot of callback methods get called that I don't want to be called. Since it is no interaction from the user. What is the right way to handle that? To be more precise I am doing some auto save mechanism directly started from a callback. (It is linked to a bind with a service) Now I don't want this callbacks to be called without user interaction which happens when I restore the UI state in the onResume method. I'm looking forward reading your answers. Regards! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Has anybody received an android dev phone in the US yet?
You can carry up to 300 GBP (approx 490 USD) of goods into the UK for personal use without having to pay UK Tax or Duty, so you can legally carry a G1/Dev Phone 1 in lwithout paying tax if its for your PERSONAL use ;). See http://customs.hmrc.gov.uk/channelsPortalWebApp/channelsPortalWebApp.portal?_nfpb=true_pageLabel=pageTravel_InfoGuidespropertyType=documentid=HMCE_PROD_010220 Al. http://andappstore.com/ Rajesh wrote: Where in US are you? How long did it take to reach and what was the mode of shipping you used? I plan to order one if it is sure to reach in two weeks. And is it illegal to personally carry a single phone from US to UK? (Well without the carton box for myself). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Has anybody received an android dev phone in the US yet?
I have ordered G1 Dev 1 on Sunday and I didn't get it as yet. I assume that nobody got it: http://groups.google.com/group/android-beginners/browse_thread/thread/997f5bfc633feb37# On Dec 10, 1:02 pm, Rajesh [EMAIL PROTECTED] wrote: Where in US are you? How long did it take to reach and what was the mode of shipping you used? I plan to order one if it is sure to reach in two weeks. And is it illegal to personally carry a single phone from US to UK? (Well without the carton box for myself). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
I suppose the question now is is this an Android bug or a Google sites bug? Al. Al Sutton wrote: Mark Murphy wrote: Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :). * On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
Have you tried accessing it on Wifi vs. cell data? Could also be a t-mobile data issue. On Wed, Dec 10, 2008 at 10:52 AM, Al Sutton [EMAIL PROTECTED] wrote: I suppose the question now is is this an Android bug or a Google sites bug? Al. Al Sutton wrote: Mark Murphy wrote: Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :). * On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
Bill Napier wrote: Have you tried accessing it on Wifi vs. cell data? Could also be a t-mobile data issue. My test was WiFi, FWIW. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
I can only use Wi-Fi where I live (due to shabby T-Mobile reception), so both tests left my house via the same network link (my ADSL line) Al. Bill Napier wrote: Have you tried accessing it on Wifi vs. cell data? Could also be a t-mobile data issue. On Wed, Dec 10, 2008 at 10:52 AM, Al Sutton [EMAIL PROTECTED] wrote: I suppose the question now is is this an Android bug or a Google sites bug? Al. Al Sutton wrote: Mark Murphy wrote: Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :). * On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ExpandableListAdapter Crash
My uses an expandable list adapter. I ran into a problem when I update the adapter content. Here is the sequence of events: 1) Adapter contains groups A, B, C. Group A and C contain 2 children 2) I update the adapter data (I call notifyDataSetChanged) due to the fact that Group B is removed by the user 3) If group C was expanded the code crashes in getChildrenCount because it gets called with a groupPosition which is 3 (the old number of groups) @Override public int getChildrenCount( int groupPosition) { if( groupPosition = m_groups.size()) { Log.e( getChildrenCount, Group index: + groupPosition); return 0; } return m_groups.get(groupPosition).getBuddies().size(); } If I check that the group position is correct and return 0 for the children count the problem goes away. Also, if group C was not collapsed before I removed group B the crash does not occur because getChildrenCount is not called (makes sense). It seems to me that the adapter is using the old size of the groups array to do something with the expanded items. If the last item is expanded a crash would occur. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Optional Permissions
Is there a way to make a permission optional for the user? I would like my app's user to be able to send emails to their contacts if they want, but don't want them to have to approve the Contacts permissions when the app is installed. What I'd like to do is have a button in the app that they could click on, the app would check to see if it had that permission, and if it didn't popup a dialog box to ask the user if they want to give that permission, and only continue if they agreed, and disable that feature if they don't want to. Obviously this would have to be built into the framework for it to work, but is it there now? Is there a way to grant an application additional permissions after it is installed? Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.pricebunny.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Anyone else seeing problems with the browser Google Sites?
Just tried the 1.0r2 emulator browser and it fails in the same way as the G1 Al. Al Sutton wrote: I can only use Wi-Fi where I live (due to shabby T-Mobile reception), so both tests left my house via the same network link (my ADSL line) Al. Bill Napier wrote: Have you tried accessing it on Wifi vs. cell data? Could also be a t-mobile data issue. On Wed, Dec 10, 2008 at 10:52 AM, Al Sutton [EMAIL PROTECTED] wrote: I suppose the question now is is this an Android bug or a Google sites bug? Al. Al Sutton wrote: Mark Murphy wrote: Al Sutton wrote: Go to http://sites.google.com/site/piggybanksoftwarehomepage/dowloads Are you sure you don't have any examples with shorter URLs? ;-) *http://tinyurl.com/5hnbz5 could be a bit easier on the fingers :). * On my system the desktop browser gives me the save as dialogue box, the android browser 404? I get a save-as on the desktop and I get a Web page not available on the G1. Feels like some browser sniffing gone awry. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] manage files
Hello. I would like to know if there is possible to use txt or xml files that I put in the assets folder. I mean, I´m integrating a program into android, this program needs to use some files, so I can put those files in the assets folder, but now, I don´t know how to pass the path of those files. I guess I can pass an InputStream, but I would like to pass the root path of the assets folder cause there will be a lot of files inside. Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: manage files
Or maybe I should put those files in a raw folder inside res? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application
It seems that my problem was due to using Activity.getApplicationContext as the context. On Nov 29, 9:23 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: It would help if you would include the stack crawl of the error and such. One cause of this error may be trying to display an application window/dialog through a Context that is not an Activity. On Wed, Nov 26, 2008 at 9:33 AM, Ash [EMAIL PROTECTED] wrote: Hello super smart people, I've got a strangle little bug to test you. I have an application that tries to display an RTSP video in a view (Content View - ScrollView - AbsoluteLayout - VideoView). However, in the emulator the MediaPlayer throws dispatches an error message which tries to display an Alert which throws the WindowManager exception. On device I hear the sound but do not see the the video then I get the exception when the MediaController is shown. WTF is going on? If I create a tiny Activity this works fine but once I get into a real application it all goes to hell. Is this Dalvik and the Android SDK showing it's immaturity? Ash -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Canvas.drawBitmap(int[] colors, ...) creates wrong alpha blending
Hi All, I'm trying to use Canvas.drawBitmap(int[] colors, int offset, int stride, int x, int y, int width, int height, boolean hasAlpha, Paint paint) to draw an integer color array containing an image pixels array in the format of ARGB_ (with alpha channel). This function is provided in SDK 1.0 to draw a color pixel array directly without creating an intermediate Bitmap. However, I found this function does not perform alpha blending at all. The attached picture is the screen shot of my test result. Left screen shot is the correct result if I create a Bitmap from the color array first then draw the created Bitmap. Right screen shot is the wrong result if I draw the color array directly. I noticed in the wrong rendering, all pixels are treated as either completely opaque or completely transparent. if a pixel has a alpha value other than 0xFF or 0x00 (translucent pixel), it will be rendered incorrectly. I hope anyone in Android team can give some suggestions for this issue. I'm currently thinking this is a bug. Hongkun OmniGSoft --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Canvas.drawBitmap(int[] colors, ...) creates wrong alpha blending
I could not find a way to attach pictures with my post, so I post the screen shot on the web, and here is the link: The test screen shot: http://www.omnigsoft.com/TechnicalSupport/TestResult.png The original PNG image (with alpha channel) I used for the test: http://www.omnigsoft.com/TechnicalSupport/pngWithAlpha.png Hongkun OmniGSoft --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to access file system
Hi! I have similar question. Can I install any external file xml or text file next to apk like .config file? It will allow me to send updates without actually binary changes. Is it possible? Thanks On Nov 26, 8:18 pm, Christine [EMAIL PROTECTED] wrote: What do you mean by accessthefilesystem? You can read and write files as you would in any Java program. On Nov 26, 6:58 am, [EMAIL PROTECTED] wrote: Hi, Dose anybody know how toaccessfilesystem? What the meaning of the permission toaccessthe cachefilesystem? Is the cachefilesystem afilesystem of virtual machine? BW, DK 2008.11.26 --- 新浪空间与朋友开心分享网络新生活!(http://space.sina.com.cn/)- 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to access file system
EvgenyV wrote: Can I install any external file xml or text file next to apk like .config file? If your program downloads or creates data, it can store the data on the device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to access file system
No. There are preferences coming with apk. But I would avoid to include it to apk as reource file(s). It will give the flexibility when will send updates without recompile the apk. Thanks On Wed, Dec 10, 2008 at 10:44 PM, Mark Murphy [EMAIL PROTECTED]wrote: EvgenyV wrote: Can I install any external file xml or text file next to apk like .config file? If your program downloads or creates data, it can store the data on the device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Optional Permissions
This has been kicked around the #android irc channel off and on for a while, and the basic answer from Google devs seems to be no, thats not how we want it to work. (Which leads to only one alternative really - ship multiple versions of your app into the marketplace, with different security requests and a shared uid..) Not to pick on anyone specific, but the various webpage apps (wikipedia.. bank of america.. etc) that require gps are perfect examples here. Sure, SOMETIMES I might want to know what pages (or branches) are nearby. But usually, I just want to use the app. And sometimes I explicitly might -not- want the app to be able to suck up my location... On Wed, Dec 10, 2008 at 2:03 PM, Brad Gies [EMAIL PROTECTED] wrote: Is there a way to make a permission optional for the user? I would like my app's user to be able to send emails to their contacts if they want, but don't want them to have to approve the Contacts permissions when the app is installed. What I'd like to do is have a button in the app that they could click on, the app would check to see if it had that permission, and if it didn't popup a dialog box to ask the user if they want to give that permission, and only continue if they agreed, and disable that feature if they don't want to. Obviously this would have to be built into the framework for it to work, but is it there now? Is there a way to grant an application additional permissions after it is installed? Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.pricebunny.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
On Wed, Dec 10, 2008 at 8:38 AM, Mark Murphy [EMAIL PROTECTED] wrote: openFileInput() gives you a storage spot unique to your application in the on-board flash. It is not for use for, say, accessing /sdcard. This brings up a question I have: is there an etiquette for apps putting stuff on the sdcard? If there were some app specific storage area on the sdcard like openFileInput does on the internal memory, it would seemingly help for namespace collisions and other untidy stuff on the sdcard... Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Getting error when trying to read file : java.lang.IllegalArgumentException: File /data/testing.txt contains a path separator
I noticed that lots of apps have been making a mess of my SD card. So when I had to store some data there, I made the decision to keep things cleaner. The path I used is /var/MyProgramName/ and then various directories below. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] SubMenu MenuItem icon?
Is it by design that we can't set icons in a submenu's menu item? SubMenu sub = menu.addSubMenu(...); MenuItem item = sub.add (...); item.setIcon(...); -- icon does not show up Any Idea? Thanks, J --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Cannot delete rows from sqlite database
Ah! I did not realize the setTransactionSuccessful() part. Thanks!! On Dec 4, 2:14 pm, visionera gmbh [EMAIL PROTECTED] wrote: hi, you have to use setTransactionSuccessful() as in int nRows = 0; mDb.beginTransaction(); try { nRows = mDb.delete(mytable, KEY_ITEM + = + rowId,null); mDb.setTransactionSuccessful(); // implies commit at endTransaction} catch( SQLException anyDbError } // error logging ...} finally { mDb.endTransaction();} return nRows 0; worx for me marcus Von: Jack C. Holt [EMAIL PROTECTED] An: Android Developers android-developers@googlegroups.com Gesendet: Donnerstag, den 4. Dezember 2008, 19:03:19 Uhr Betreff: [android-developers] Re: Cannot delete rows from sqlite database Seehttp://code.google.com/android/reference/android/database/sqlite/SQLi...() On Nov 17, 3:28 pm, techvd [EMAIL PROTECTED] wrote: Hi, I'm having a strange issue deleting rows from a sqlite database. Here's the code snippet: mDb.beginTransaction(); int nRows = mDb..delete(mytable, KEY_ITEM + = + rowId, null); mDb.endTransaction(); return nRows 0; The database is opened for write. The code above executes perfectly; it even returns the number of rows deleted. However, the rows are still in the table (even after I exit the app restart, etc.). Am I missing anything here. The rest of the code is boilerplate and I can read the data from the tables fine. 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: problem answering a call
I did an upgrade to SDK r2 but it appears to be a Manifest file problem: intent-filter action android:name=android.intent.action.ANSWER / category android:name=android.intent.category.DEFAULT / /intent-filter appears to fix the crash. On Dec 9, 6:04 pm, dreamerBoy [EMAIL PROTECTED] wrote: code: try { // answer the phone Intent myIntent = new Intent(Intent.ACTION_ANSWER); myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP // | Intent.FLAG_DEBUG_LOG_RESOLUTION // | Intent.FLAG_FROM_BACKGROUND // | Intent.FLAG_ACTIVITY_NEW_TASK); ftaContext.startActivity(myIntent); } catch (Exception e) { cleanup(); return; } This is called from an ordinary (raw) thread. I simulate an incoming call with: telnet localhost 5554 gsm call 1234567 result: 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Resolving type null scheme null of intent Intent { action=android.intent.action.ANSWER flags=0x300c } 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Action list: [ActivityIntentInfo{433df190 com.android.phone.InCallScreen}] 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Matching against filter ActivityIntentInfo{433df190 com.android.phone.InCallScreen} 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Filter matched! match=0x108000 12-09 17:50:26.731: WARN/IntentResolver(52): resolveIntent failed: found match, but none with Intent.CATEGORY_DEFAULT 12-09 17:50:26.731: VERBOSE/IntentResolver(52): Final result list: 12-09 17:50:26.731: INFO/ActivityManager(52): Starting activity: Intent { action=android.intent.action.ANSWER flags=0x300c } 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): error answering call 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1472) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): android.app.Instrumentation.execStartActivity(Instrumentation.java: 1442) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): android.app.ApplicationContext.startActivity(ApplicationContext.java: 596) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): android.content.ContextWrapper.startActivity(ContextWrapper.java:236) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): cta.fta.fta_voice.FTAvoiceCmdMt_call_setup.waitForResult (FTAvoiceCmdMt_call_setup.java:610) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): cta.fta.fta_voice.FTAvoiceCmdMt_call_setup.access$2 (FTAvoiceCmdMt_call_setup.java:508) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): cta.fta.fta_voice.FTAvoiceCmdMt_call_setup$1.run (FTAvoiceCmdMt_call_setup.java:496) 12-09 17:50:26.741: ERROR/FTAvoiceCmdMt_call_setup3(32178): java.lang.Thread.run(Thread.java:935) Can anyone see what I'm doing wrong? Thanks so much. dreamer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
I 've a similar problem. I am going crazy from several days Is impossible to show images from internal or external memory captured from camera. Also I tried to read a file jpg of 700KB and use BitmapFactory.decodeByteArray to get the bitmap, but I receive that exeption: 12-11 00:50:27.819: ERROR/dalvikvm-heap(3547): 6291456-byte external allocation too large for this process. if I try to load an image smaller (around 4K) BitmapFactory.decodeByteArray work good. somebody has a solution ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Allocation too large for this process
fala70 wrote: I 've a similar problem. I am going crazy from several days Is impossible to show images from internal or external memory captured from camera. Also I tried to read a file jpg of 700KB and use BitmapFactory.decodeByteArray to get the bitmap, but I receive that exeption: 12-11 00:50:27.819: ERROR/dalvikvm-heap(3547): 6291456-byte external allocation too large for this process. if I try to load an image smaller (around 4K) BitmapFactory.decodeByteArray work good. somebody has a solution ? Use a smaller image. A 700KB JPEG is fairly massive. Bear in mind that JPEG files have to be decompressed when they get turned into a bitmap. Apparently the uncompressed form of your image exceeds a limit on how big an individual memory allocation can be. Furthermore, a 700KB JPEG has *got* to have a resolution bigger than what the G1 can handle. If you intend to show the whole image via some sort of panning mechanism, consider splitting the image up into discrete tiles, akin to what Google Maps does. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] startActivity(), Browser, and windows
In an app, I am launching the built-in Browser activity via: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(http://www.google.com;))); The first time you do this, it starts another window. This doesn't faze me. However, if you back-arrow out of the browser back into my application, and trigger startActivity() again, it creates a third window. Back-arrow and trigger startActivity() again, it creates a fourth window. And so on. I don't mind adding one more window to the Browser, but adding one per startActivity() call seems evil. My guess is that I need to use a FLAG_ACTIVITY_*, or combination of same, with my Intent to stop this behavior. However, I've tried a few, and nothing has worked. Any thoughts? Thanks in advance! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: What is google's official position on JNI ?
I tried out what Volker suggested. My test results is as following: Can someone advice with the part that I make native function calls? 1. I added the following code to android application Lunarlander.java //native method declaration native void hello(String name); static { System.out.println(libhello.so loaded); System.load(/data/app/libhello.so); } I added my libhellp.so to lunalander.apk and then uploaded the apk to / data/app. The application launches ok. 2. I added the following code to android application Lunarlander.java //native method declaration native void hello(String name); static { System.out.println(libhello.so loaded); System.load(/data/app/libhello.so); } … protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); … //test loading hello lib and call hello function LunarLander myLunarLander = new LunarLander(); myLunarLander.hello(Hi there!); … } I added my libhellp.so to lunalander.apk and then uploaded the apk to / data/app. The application launches was forced to close and the error message is “The application Lunar lander has stopped unexpectedly. Please try again”. On Nov 7, 3:22 am, pasquale.anatriello [EMAIL PROTECTED] wrote: I would like to know this too. We are willing to port our project in android too but we have all our HUGE library written in C. Is there a hope to have a native support soon enough? Is it official that this support will be relased? We managed to run some code on the Emulator but as it is now it's not possible to run native code on the device without hacking it Thank you for your patience (and sorry for my poor english) Pasquale Anatriello On 21 Ott, 19:37, StephC [EMAIL PROTECTED] wrote: On 1 oct, 17:23, Romain Guy [EMAIL PROTECTED] wrote: First of all,JNIis not used in our apps. Only in the framework. Then, we are working on a native SDK that will provide official and correct support forJNI. Just be patient :) This is very good news for games developers! We're working on Augmented Reality games with real time image analysis not doable inside a VM. We'll be glad to port it on the Android platform. How long will we have to wait for this native SDK? On Wed, Oct 1, 2008 at 2:53 AM, MrSnowflake [EMAIL PROTECTED] wrote: I believeJNIis not supported for developers, because 1: It would require developers to build libs for every different android platform out and 2: While Google (probably) usesJNI, they can just change the JNIinterface and fix their code, but say if youJNIable program works on SDK 1.0r1 and then suddenly, when r2 gets released (and Google changed theJNI) your program wouldn't work anymore. This is something google really wants to avoid. On 1 okt, 11:42, Tauno T [EMAIL PROTECTED] wrote: Oh, sorry, I misunderstood you there :) On Oct 1, 12:37 pm, Volker Gropp [EMAIL PROTECTED] wrote: Hi, you may call it unfair of course. But please keep in mind, they did not tell us that they use it in their apps. But they use it in their API to delegate calls to native libs. Regards Volker On Oct 1, 11:18 am, Tauno T [EMAIL PROTECTED] wrote: Isn't it a little .. how do I say it.. unfair to tell us thatJNIis not supported at all and then use it in their own apps to make them better and give them more features than are available to the rest of the developers? On Oct 1, 11:49 am, Volker Gropp [EMAIL PROTECTED] wrote: Hi Ranjeet, although I'm not the Android Dev Team i can tell you what ive been told last weeks about this topic:JNIis currently not supported in SDK 1.0. The reason is not quite clear, some say cause it may not work at all, or may break in the (near) future. Plus your app wont be portable and needs special versions for every hw platform. Actually i bet Android Dev Team will just tell you: native libs andJNIis not supported!. On the other handJNIis working and Android uses it internally a lot [google talks]. But you may have problems to link against the stripped down libc they are using, or may run into other problems you cannot resolve. Plus please keep in mind there is no real solution to deploy your app on real phones, because /system/lib is read only. You might add your .so into the apk as a raw resource and extract it into your app writable directory under /data. Loading the .so works for me using System.load(). But this way the .so is stored on your phone in 2 locations, using a lot unnecessary space. Currently for a real world app on real phones i would'nt useJNIand native libs at all due to those problems.
[android-developers] Clearing or disabling browser cache
Hi, Is there anyway to disable the browser cache, or clear the cache through an API? Thanks, -Patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---