[android-developers] Re: repackaging .apk
Great! Thanks :) Just what I needed. On Oct 12, 8:07 pm, hackbod [EMAIL PROTECTED] wrote: An .apk is really just a zip file, so you can manipulate it with standard tools. Note that you will also need to re-sign any .apk you generate. On Oct 12, 7:57 am, legerb [EMAIL PROTECTED] wrote: Is it possible to repackage an existing .apk file? I would like to give each user that will download my app a unique user id, which would be stored in a properties file inside the .apk. Is it possible to unzip/extract the existing apk on my server, replace the properties file, and then zip it back, without compiling a new .apk? (I prefer to avoid getting the id through httprequest) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Intent's Extra transfer
Hi, Anyone knows the way that Intent's extra transfer between different activities?I mean the extra is transfered by value or by reference.And is there a limit for the extra size?Thank you very much. Best 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: AuthenticationException when accessing Google Spreadsheets
androidian wrote: By the way, I'm running android NOT from behind a proxy ( I have direct internet access). Also, the built in browser works fine, so it's definitely something with my app which is at fault. Anyone got any ideas on this one? Can you post your manifest? This is just by using the following code in my app: SpreadsheetService myService = new SpreadsheetService( mydomain.com-myapp-1); myService.setUserCredentials([EMAIL PROTECTED], mypassword); U...the SDK doesn't have a SpreadsheetService. I'm assuming that either you wrote it or it's a third-party JAR. Can you provide any code around the point of where actual HTTP requests are being made? If that's buried in a third-party class, it may be that it's not compatible with the version of support libraries inside Android. -- 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] Doubt in Notepad Application
Hi All, I m a neebie with Android. Jus went through the Notepad application. I have several of doubts regarding the application. 1. What is the exact purpose of Intent class? 2. Why do we pass this Intent object to startActivityForResult(i, ACTIVITY_CREATE); method. 3. What happens at the end of startActivityForResult(i, ACTIVITY_CREATE); method, which method is getting called after that? 4. What is the purpose of onActivityResult(int requestCode, int resultCode, Intent intent) method?? Any explanation would be highly appreciated Thanks in Advance Thanks JavaAndroid --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 sms from inbox
hi everyone, plz help me out... how to get sms from inbox and how to delete it.. could u plz help me out --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: ListView Issue in Notepad Application
The answer is in the last post here: http://groups.google.com/group/android-beginners/browse_thread/thread/affc088e8843feb5 Since there can be several emulators open at a time, you also have to open the devices list, and click on your emulator to activate the logcat output. Peli On Oct 13, 10:25 am, JavaAndroid [EMAIL PROTECTED] wrote: Hi Peli, Thanks for ur Valuable response. I m not aware of this logcat tab in eclipse. Is that present in any Window?? Thanks JavaAndroid On Oct 13, 12:42 pm, Peli [EMAIL PROTECTED] wrote: You have to use logcat to see the debugging statements. Either from Eclipse open the logcat tab and choose the device from the devices list. Or in a shell enter adb logcat. Peliwww.openintents.org On Oct 13, 2:49 am, JavaAndroid [EMAIL PROTECTED] wrote: Hi All, I m a novice in Google Android.. Just started with couple of tutorials present in Google Android Documentation page. I have modified the NotePad application present there. I have four textfields namely, employeeName,employeeAge, employeeQualification, employeeDept. I could insert a new record and delete an existing record, but i m facing problem in editing an existing record. When i click a record it says, the Application EmployeeInformation has stopped unexpectedly. Here is my EmployeeInfo class package com.dreamapp.employeeinfo.activity; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import com.dreamapp.employeeinfo.util.EmployeeDAO; public class EmployeeInfo extends ListActivity { private static final int ACTIVITY_CREATE =0; private static final int ACTIVITY_EDIT =1; private static final int INSERT_ID = Menu.FIRST; private static final int DELETE_ID = Menu.FIRST+1; private EmployeeDAO employee; private Cursor mCursor; private static final String TAG=EmployeeInfo; /** Called when the activity is first created. */ [EMAIL PROTECTED] public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.employee_list); employee = new EmployeeDAO(this); employee.open(); fillData(); } public void fillData(){ mCursor = employee.fetchAllEmployeeInformation(); startManagingCursor(mCursor); String[] from = new String[] {EmployeeDAO.EMP_NAME}; int[] to = new int[] {R.id.text1}; SimpleCursorAdapter employeeList = new SimpleCursorAdapter(this, R.layout.employee_row, mCursor,from, to); setListAdapter(employeeList); } public boolean onCreateOptionsMenu(Menu menu){ super.onCreateOptionsMenu(menu); menu.add(0, INSERT_ID, 0, R.string.menu_insert); menu.add(0, DELETE_ID, 0, R.string.menu_delete); return true; } public boolean onMenuItemSelected(int featureId, MenuItem item){ switch(item.getItemId()){ case INSERT_ID: insertEmployeeInformation(); return true; case DELETE_ID: employee.deleteEmployeenformation(getListView(). getSelectedItemId()); fillData(); return true; } return super.onMenuItemSelected(featureId, item); } public void insertEmployeeInformation(){ Intent i = new Intent(this,EmployeeEdit.class); startActivityForResult(i, ACTIVITY_CREATE); } protected void onListItemClick(ListView l, View v, int position, long id){ super.onListItemClick(l, v, position, id); Cursor c = mCursor; Log.w(TAG, Position in the List +position); c.moveToPosition(position); Intent i = new Intent(this,EmployeeEdit.class); i.putExtra(EmployeeDAO.KEY_ROW_ID, id); i.putExtra(EmployeeDAO.EMP_NAME, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_NAME))); i.putExtra(EmployeeDAO.EMP_AGE, id); i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getInt( c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION))); i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION))); i.putExtra(EmployeeDAO.EMP_DEPT, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_DEPT))); startActivityForResult(i, ACTIVITY_EDIT); } protected void onActivityResult(int requestCode, int resultCode, Intent intent){ super.onActivityResult(requestCode, resultCode,
[android-developers] Re: Intent's Extra transfer
Also, intent extras could be passed between different applications, living in separate processes, in which case there is no way to transfer them by reference. But I'd be also interested in the question if there exists a hard limit on intent extras size. Peli www.openintents.org On Oct 13, 1:46 pm, Jake Maui [EMAIL PROTECTED] wrote: I believe I read somewhere that it's passed by value. This makes sense because I tried to pass a bitmap and it was extremely slow and there seemed to be a size limit beyond which, it would not work. If I come across the site that discussed that it was by value, I'll post it. On Mon, Oct 13, 2008 at 3:44 AM, Ernest [EMAIL PROTECTED] wrote: Hi, Anyone knows the way that Intent's extra transfer between different activities?I mean the extra is transfered by value or by reference.And is there a limit for the extra size?Thank you very much. Best 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: AliasActivity: Two Questions
Hmmm.. I tested it again and the startActivity()/finish() seems to be working now. It may have been an issue with an exception that was thrown in the child activity during initialization. I would launch the app, briefly see the entry-point activity, get a first draw of the child, and then a error dialog. When I clicked past the error dialog, I would see the entry-point activity again, then the child activity, then another error dialog that would close the app. I didn't commit my code at that point and don't remember specifics. But slightly related... Is there anyway to prevent the brief view of the redirecting activity's UI? It seems silly to push through start/resume/pause/stop when the app has already requested a new startActivity() or finish() from onCreate(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Doubt in Notepad Application
1. What is the exact purpose of Intent class? Here's a good overview: http://code.google.com/android/reference/android/content/Intent.html There's a good discussion on intents and notepad here: http://groups.google.com/group/android-beginners/browse_frm/thread/31e6ecd386b29cbe 2. Why do we pass this Intent object to startActivityForResult(i, ACTIVITY_CREATE); method. The intents i defines what which activity is being called next. ACTIVITY_CREATE is just a number so you know which activity returned a result later. 3. What happens at the end of startActivityForResult(i, ACTIVITY_CREATE); method, which method is getting called after that? See activity life-cycle here: http://code.google.com/android/reference/android/app/Activity.html The current activity is paused, and another activity is created. 4. What is the purpose of onActivityResult(int requestCode, int resultCode, Intent intent) method?? After the new activity closed, your original activity is called again. This function is called for you so that you can see the result. Apart from the examples in the official documentation, here is a nice list of available intents ;-) http://www.openintents.org/en/intentstable Would this answer your questions? Peli www.openintents.org On Oct 13, 2:49 pm, JavaAndroid [EMAIL PROTECTED] wrote: Hi All, I m a neebie with Android. Jus went through the Notepad application. I have several of doubts regarding the application. 1. What is the exact purpose of Intent class? 2. Why do we pass this Intent object to startActivityForResult(i, ACTIVITY_CREATE); method. 3. What happens at the end of startActivityForResult(i, ACTIVITY_CREATE); method, which method is getting called after that? 4. What is the purpose of onActivityResult(int requestCode, int resultCode, Intent intent) method?? Any explanation would be highly appreciated Thanks in Advance Thanks JavaAndroid --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: AuthenticationException when accessing Google Spreadsheets
Hi Mark, thanks very much for your reply. I imported gdata-core-1.0.jar and gdata-spreadsheet-1.0.jar into my project and the SpreadsheetService class comes from the latter. The HTTP requests must be being done in the setUserCredentials method (all inside those two jars). Perhaps one of those jars is not compatible with android? Is there a support matrix somewhere that I can check? I'm a little bit confused as to why there would be incompatibilities - can you elaborate? My manifest: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.mydomain.hello android:versionCode=1 android:versionName=1.0.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.HelloAndroid android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-permission android:name=android.permission.INTERNET/uses- permission /manifest I appreciate your help. cheers, Ian On Oct 13, 8:41 pm, Mark Murphy [EMAIL PROTECTED] wrote: androidian wrote: By the way, I'm running android NOT from behind a proxy ( I have direct internet access). Also, the built in browser works fine, so it's definitely something with my app which is at fault. Anyone got any ideas on this one? Can you post your manifest? This is just by using the following code in my app: SpreadsheetService myService = new SpreadsheetService( mydomain.com-myapp-1); myService.setUserCredentials([EMAIL PROTECTED], mypassword); U...the SDK doesn't have a SpreadsheetService. I'm assuming that either you wrote it or it's a third-party JAR. Can you provide any code around the point of where actual HTTP requests are being made? If that's buried in a third-party class, it may be that it's not compatible with the version of support libraries inside Android. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://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] Announcement: yet another Android GUI prototyping tool
Hi, Today I found one more GUI prototyping tools for Android, and I found it more promising and professional in compare to DroidDraw. Android GUI Prototyping Stencil for Microsoft Visio: http://www.artfulbits.com/Android/Stencil.aspx For downloading required registration... I'm now playing with that stencils... Nice and easy... of course if you have a Visio experience :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: AuthenticationException when accessing Google Spreadsheets
androidian wrote: I imported gdata-core-1.0.jar and gdata-spreadsheet-1.0.jar into my project and the SpreadsheetService class comes from the latter. The HTTP requests must be being done in the setUserCredentials method (all inside those two jars). Perhaps one of those jars is not compatible with android? Off the cuff, given the symptoms, I'd say that's likely. Is there a support matrix somewhere that I can check? Not that I'm aware of. There are at least two possible problems with any given third-party JAR: 1. The JAR makes assumptions regarding the underlying Java platform, in terms of available APIs or their behavior, and those assumptions fall down in the case of Android's Dalvik. 2. The JAR was compiled with an incompatible version of the Java compiler, so the bytecode that the Android build process uses gets fouled up. For example, with Beanshell (http://www.beanshell.org), using the JAR downloaded straight from the site didn't work for, um, beans. However, when I recompiled Beanshell, using the same compiler as with the rest of my project, it worked just fine. I'm a little bit confused as to why there would be incompatibilities - can you elaborate? Assuming those JARs don't have any dependencies of their own (e.g., they did not make you copy even more JARs into your project), they are probably using HttpUrlConnection and kin for doing their HTTP work. I would suspect that the Google Docs login process requires SSL. So, going back to my two points above: 1. It may be that SSL handling in Dalvik behaves differently than it does in whatever JavaSE edition your JARs were written for 2. It may be that a simple recompile of those JARs from source will suffice My manifest: Well, that looks OK, at least in terms of where your uses-permission element lives. Sometimes people put that inside the application element by mistake, and Android is pretty picky about that sort of thing. -- 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: AuthenticationException when accessing Google Spreadsheets
Great stuff Mark, thank you very much. As a first step I'll try recompiling the gdata stuff and see what happens. cheers, Ian On Oct 13, 10:14 pm, Mark Murphy [EMAIL PROTECTED] wrote: androidian wrote: I imported gdata-core-1.0.jar and gdata-spreadsheet-1.0.jar into my project and the SpreadsheetService class comes from the latter. The HTTP requests must be being done in the setUserCredentials method (all inside those two jars). Perhaps one of those jars is not compatible with android? Off the cuff, given the symptoms, I'd say that's likely. Is there a support matrix somewhere that I can check? Not that I'm aware of. There are at least two possible problems with any given third-party JAR: 1. The JAR makes assumptions regarding the underlying Java platform, in terms of available APIs or their behavior, and those assumptions fall down in the case of Android's Dalvik. 2. The JAR was compiled with an incompatible version of the Java compiler, so the bytecode that the Android build process uses gets fouled up. For example, with Beanshell (http://www.beanshell.org), using the JAR downloaded straight from the site didn't work for, um, beans. However, when I recompiled Beanshell, using the same compiler as with the rest of my project, it worked just fine. I'm a little bit confused as to why there would be incompatibilities - can you elaborate? Assuming those JARs don't have any dependencies of their own (e.g., they did not make you copy even more JARs into your project), they are probably using HttpUrlConnection and kin for doing their HTTP work. I would suspect that the Google Docs login process requires SSL. So, going back to my two points above: 1. It may be that SSL handling in Dalvik behaves differently than it does in whatever JavaSE edition your JARs were written for 2. It may be that a simple recompile of those JARs from source will suffice My manifest: Well, that looks OK, at least in terms of where your uses-permission element lives. Sometimes people put that inside the application element by mistake, and Android is pretty picky about that sort of thing. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://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: Intent's Extra transfer
I believe I read somewhere that it's passed by value. This makes sense because I tried to pass a bitmap and it was extremely slow and there seemed to be a size limit beyond which, it would not work. If I come across the site that discussed that it was by value, I'll post it. On Mon, Oct 13, 2008 at 3:44 AM, Ernest [EMAIL PROTECTED] wrote: Hi, Anyone knows the way that Intent's extra transfer between different activities?I mean the extra is transfered by value or by reference.And is there a limit for the extra size?Thank you very much. Best 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] UUID.randomUUID().toString() always give the same uuid?
I am using UUID().randomUUID() to generate an unique key, but on the emulator it always give the same id.. Can someone confirm this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] nullPointer/thread error when reading contacts
Hi all, I've been trying to read the contacts list so that I can compare phone numbers in it against the number on an incomming SMS message. I've been getting an error that I just can't fix. The method is: public String checkContacts(String telNo) { String[] projection = new String[] {People.NAME, People.NUMBER}; Uri mContacts = People.CONTENT_URI; String selection = People.NUMBER + = + telNo; String sort = People.NAME + ASC; Cursor managedCursor = managedQuery(mContacts, projection, selection, null, sort); startManagingCursor(managedCursor); if(managedCursor.getCount() 0) { managedCursor.moveToFirst(); return managedCursor.getString(0); } else { return telNo; } } Output from LogCat looks like this: 10-13 16:37:35.966: DEBUG/AndroidRuntime(292): Shutting down VM 10-13 16:37:35.966: WARN/dalvikvm(292): threadid=3: thread exiting with uncaught exception (group=0x40010e28) 10-13 16:37:35.976: ERROR/AndroidRuntime(292): Uncaught handler: thread main exiting due to uncaught exception 10-13 16:37:35.996: ERROR/AndroidRuntime(292): java.lang.RuntimeException: Unable to start activity ComponentInfo{napier.vallis/napier.vallis.SMSClient}: java.lang.NullPointerException 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2140) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2156) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.os.Handler.dispatchMessage(Handler.java:88) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.os.Looper.loop(Looper.java:123) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread.main(ActivityThread.java:3742) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at java.lang.reflect.Method.invokeNative(Native Method) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at java.lang.reflect.Method.invoke(Method.java:515) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:739) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at dalvik.system.NativeStart.main(Native Method) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): Caused by: java.lang.NullPointerException 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.content.ContextWrapper.getContentResolver(ContextWrapper.java: 89) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.Activity.managedQuery(Activity.java:1442) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at napier.vallis.Functions.checkContacts(Functions.java:70) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at napier.vallis.SMSClient.onCreate(SMSClient.java:34) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1122) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2103) 10-13 16:37:35.996: ERROR/AndroidRuntime(292): ... 11 more If any further information is needed I can easily post it up. Any advice or guidance would be greatly appreciated. Thanks, V. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How switch or bring an activities to top?
Hi let say i start an activities A then follow by activities B. So B sure is at front or on top of A. Now can i bring A to run at front or on top of B? Any one have any idea? Wesley --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Capturing outgoing SMS?
yes..plz tell me On Oct 13, 1:53 pm, denismo [EMAIL PROTECTED] wrote: I know it is possible to get an incoming SMS, using intent android.provider.Telephony.SMS_RECEIVED. On SDK 1.0_r1, is it possible to capture an outgoing SMS (text, phone number)? Thanks. Denis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Intent's Extra transfer
Here's a site that discusses the pass by value thing ... http://code.google.com/android/reference/aidl.html#parcelable I don't know what the upper limit is but when I was passing bitmaps in a bundle, I could pass a ~250K bitmap. It was a tremendous performance hit though. On Mon, Oct 13, 2008 at 8:25 AM, Peli [EMAIL PROTECTED] wrote: Also, intent extras could be passed between different applications, living in separate processes, in which case there is no way to transfer them by reference. But I'd be also interested in the question if there exists a hard limit on intent extras size. Peli www.openintents.org On Oct 13, 1:46 pm, Jake Maui [EMAIL PROTECTED] wrote: I believe I read somewhere that it's passed by value. This makes sense because I tried to pass a bitmap and it was extremely slow and there seemed to be a size limit beyond which, it would not work. If I come across the site that discussed that it was by value, I'll post it. On Mon, Oct 13, 2008 at 3:44 AM, Ernest [EMAIL PROTECTED] wrote: Hi, Anyone knows the way that Intent's extra transfer between different activities?I mean the extra is transfered by value or by reference.And is there a limit for the extra size?Thank you very much. Best 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: AliasActivity: Two Questions
You may need to give more information on what you are doing. If the flicker you are seeing is happening when you launch your app from the home screen, this is not atually your app but a preview of it based on its theme and such in the manifest. If you can't make this match what will ultimately run, you can set the theme to be something like a dialog so the system won't show it (since without the content a dialog won't look anything like what the user sees). But if you do that, it will feel like the app takes slower to launch. Best is to have the manifest set up so that the preview looks close to what they see so the user can see this while the app is launching. On Oct 13, 6:31 am, Anm [EMAIL PROTECTED] wrote: Hmmm.. I tested it again and the startActivity()/finish() seems to be working now. It may have been an issue with an exception that was thrown in the child activity during initialization. I would launch the app, briefly see the entry-point activity, get a first draw of the child, and then a error dialog. When I clicked past the error dialog, I would see the entry-point activity again, then the child activity, then another error dialog that would close the app. I didn't commit my code at that point and don't remember specifics. But slightly related... Is there anyway to prevent the brief view of the redirecting activity's UI? It seems silly to push through start/resume/pause/stop when the app has already requested a new startActivity() or finish() from onCreate(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Capturing outgoing SMS?
I know it is possible to get an incoming SMS, using intent android.provider.Telephony.SMS_RECEIVED. On SDK 1.0_r1, is it possible to capture an outgoing SMS (text, phone number)? Thanks. Denis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Uninstall packages API
Hi, I know there is a way to uninstall applications on emulator, using ADB, but that is not available on the phone. My application needs to provide a way to uninstall itself, initiated automatically or by user's request through UI, with user's permission of course - it doesn't need to be uncontrolled. So it should be done programmatically, using some public API like PackageManager.uninstall. Any ideas on how this can be done? Thanks. Denis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Intent's Extra transfer
The size limit is: keep it as small as possible. Definitely don't put a bitmap in there unless it is no larger than an icon (32x32 or whatever). Regardless of the size limit, having a lot of data in there is going to have a pretty big performance impact, since it needs to first go to the activity manager process, which holds on to it the -entire- time the user can return to the new activity (so that it can be re-created with the same intent), and then copied in to the process of the new activity (which may or may not be your own). Small is good! On Oct 13, 9:02 am, Jake Maui [EMAIL PROTECTED] wrote: Here's a site that discusses the pass by value thing ... http://code.google.com/android/reference/aidl.html#parcelable I don't know what the upper limit is but when I was passing bitmaps in a bundle, I could pass a ~250K bitmap. It was a tremendous performance hit though. On Mon, Oct 13, 2008 at 8:25 AM, Peli [EMAIL PROTECTED] wrote: Also, intent extras could be passed between different applications, living in separate processes, in which case there is no way to transfer them by reference. But I'd be also interested in the question if there exists a hard limit on intent extras size. Peli www.openintents.org On Oct 13, 1:46 pm, Jake Maui [EMAIL PROTECTED] wrote: I believe I read somewhere that it's passed by value. This makes sense because I tried to pass a bitmap and it was extremely slow and there seemed to be a size limit beyond which, it would not work. If I come across the site that discussed that it was by value, I'll post it. On Mon, Oct 13, 2008 at 3:44 AM, Ernest [EMAIL PROTECTED] wrote: Hi, Anyone knows the way that Intent's extra transfer between different activities?I mean the extra is transfered by value or by reference.And is there a limit for the extra size?Thank you very much. Best 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] Issue with Calendar APIs
Hi all, I am facing an issue with Android's Calendar API. When I get a Calendar instance with Calendar.getInstance(TimeZone) method with a Timezone other than the default time zone of the emulator/device, the returned calendar still has the default timezone. For example, my default timezone of India (GMT+5.30), and I get a calendar instance with time zone of US (GMT-700) I always get time of default time zone when I call getTime() or get default time zone when I call getTimeZone() method of calendar instance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Issue with Calendar APIs
vworld4u wrote: I am facing an issue with Android's Calendar API. When I get a Calendar instance with Calendar.getInstance(TimeZone) method with a Timezone other than the default time zone of the emulator/device, the returned calendar still has the default timezone. For example, my default timezone of India (GMT+5.30), and I get a calendar instance with time zone of US (GMT-700) I always get time of default time zone when I call getTime() or get default time zone when I call getTimeZone() method of calendar instance. You need to tell the emulator what time zone you are in, by passing the -timezone switch (e.g., -timezone America/New_York) -- 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] Hiring Developer... Have Some Free Time?
I'm interested in hiring a developer to put together an application. Based on concept alone, it should be relatively simple. That being said, I'm not exactly sure how long it would take. Depending on the size of the project, I'd love to work on part-cash part-equity payment terms, but I'm flexible and willing to work out something we're both happy/excited about pursuing. If you'd like, include experience, expectations if you have any (for payment/terms) and contact information! Thanks Rob Jackson phandroid.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] ThreadSafe HTTP Connection
Is there something in android that can be used for thread safe http requests? As I understand ThreadSafeClientConnManager, which is used in apache http client for this purpose, is NOT part of Android SDK. Is there something else in android instead? Thanks, Rishi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 switch or bring an activities to top?
Sorry, activities in an app are in a stack. On Oct 13, 4:54 am, Wesley Sagittarius [EMAIL PROTECTED] wrote: Hi let say i start an activities A then follow by activities B. So B sure is at front or on top of A. Now can i bring A to run at front or on top of B? Any one have any idea? Wesley --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Uninstall packages API
Sorry, I don't think this is supported in 1.0. On Oct 13, 3:51 am, denismo [EMAIL PROTECTED] wrote: Hi, I know there is a way to uninstall applications on emulator, using ADB, but that is not available on the phone. My application needs to provide a way to uninstall itself, initiated automatically or by user's request through UI, with user's permission of course - it doesn't need to be uncontrolled. So it should be done programmatically, using some public API like PackageManager.uninstall. Any ideas on how this can be done? Thanks. Denis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: ListView Issue in Notepad Application
Peli Thanks a million for your timely help. Logcat was really helpful in identifying the issue, and i got my application working.thanks again JavaAndroid On Oct 13, 6:15 pm, Peli [EMAIL PROTECTED] wrote: The answer is in the last post here:http://groups.google.com/group/android-beginners/browse_thread/thread... Since there can be several emulators open at a time, you also have to open the devices list, and click on your emulator to activate the logcat output. Peli On Oct 13, 10:25 am, JavaAndroid [EMAIL PROTECTED] wrote: Hi Peli, Thanks for ur Valuable response. I m not aware of this logcat tab in eclipse. Is that present in any Window?? Thanks JavaAndroid On Oct 13, 12:42 pm, Peli [EMAIL PROTECTED] wrote: You have to use logcat to see the debugging statements. Either from Eclipse open the logcat tab and choose the device from the devices list. Or in a shell enter adb logcat. Peliwww.openintents.org On Oct 13, 2:49 am, JavaAndroid [EMAIL PROTECTED] wrote: Hi All, I m a novice in Google Android.. Just started with couple of tutorials present in Google Android Documentation page. I have modified theNotePadapplicationpresent there. I have four textfields namely, employeeName,employeeAge, employeeQualification, employeeDept. I could insert a new record and delete an existing record, but i m facing problem in editing an existing record. When i click a record it says, theApplicationEmployeeInformation has stopped unexpectedly. Here is my EmployeeInfo class package com.dreamapp.employeeinfo.activity; import android.app.ListActivity; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ListView; import android.widget.SimpleCursorAdapter; import com.dreamapp.employeeinfo.util.EmployeeDAO; public class EmployeeInfo extends ListActivity { private static final int ACTIVITY_CREATE =0; private static final int ACTIVITY_EDIT =1; private static final int INSERT_ID = Menu.FIRST; private static final int DELETE_ID = Menu.FIRST+1; private EmployeeDAO employee; private Cursor mCursor; private static final String TAG=EmployeeInfo; /** Called when the activity is first created. */ [EMAIL PROTECTED] public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.employee_list); employee = new EmployeeDAO(this); employee.open(); fillData(); } public void fillData(){ mCursor = employee.fetchAllEmployeeInformation(); startManagingCursor(mCursor); String[] from = new String[] {EmployeeDAO.EMP_NAME}; int[] to = new int[] {R.id.text1}; SimpleCursorAdapter employeeList = new SimpleCursorAdapter(this, R.layout.employee_row, mCursor,from, to); setListAdapter(employeeList); } public boolean onCreateOptionsMenu(Menu menu){ super.onCreateOptionsMenu(menu); menu.add(0, INSERT_ID, 0, R.string.menu_insert); menu.add(0, DELETE_ID, 0, R.string.menu_delete); return true; } public boolean onMenuItemSelected(int featureId, MenuItem item){ switch(item.getItemId()){ case INSERT_ID: insertEmployeeInformation(); return true; case DELETE_ID: employee.deleteEmployeenformation(getListView(). getSelectedItemId()); fillData(); return true; } return super.onMenuItemSelected(featureId, item); } public void insertEmployeeInformation(){ Intent i = new Intent(this,EmployeeEdit.class); startActivityForResult(i, ACTIVITY_CREATE); } protected void onListItemClick(ListView l, View v, int position, long id){ super.onListItemClick(l, v, position, id); Cursor c = mCursor; Log.w(TAG, Position in the List +position); c.moveToPosition(position); Intent i = new Intent(this,EmployeeEdit.class); i.putExtra(EmployeeDAO.KEY_ROW_ID, id); i.putExtra(EmployeeDAO.EMP_NAME, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_NAME))); i.putExtra(EmployeeDAO.EMP_AGE, id); i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getInt( c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION))); i.putExtra(EmployeeDAO.EMP_QUALIFICATION, c.getString( c.getColumnIndexOrThrow(EmployeeDAO.EMP_QUALIFICATION))); i.putExtra(EmployeeDAO.EMP_DEPT,
[android-developers] Re: Replacing Dialer, IM, and SMS Apps
How about replacing the contacts app with your own - Is there any way to do that? Rohit On Sep 29, 8:00 pm, Xolotl Loki [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2) Hidden Content Providers. The open access guarantees don't necessarily grant access to the underlying content providers that power the native applications. At the moment (this might change) access to the native mail, SMS, and IM Content Providers is not available. I figured out how to read the SMS provider: Cursor c = this.getContentResolver().query(Uri.parse(content://sms/inbox), null, null, null, null); Log.d(TAG, Read + Integer.toString(c.getCount()) + SMS messages from content ( + Integer.toString(c.getColumnCount()) + columns)); String[] cols = c.getColumnNames(); for(int i = 0; i cols.length; i++) { Log.d(TAG, Column: + cols[i]); } while(c.moveToNext()) { Log.d(TAG, c.getString(c.getColumnIndex(address)) + : + c.getString(c.getColumnIndex(person)) + : +c.getString(c.getColumnIndex(date)) + : +c.getString(c.getColumnIndex(body))); } I saw the URI content://sms/inbox after adding the receiver and listening for incoming SMS. I got the column names from the middle block of code. cheers, - -- ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org iEYEARECAAYFAkjhlmcACgkQNig/07RbnEvfwACfVuJbDVbkmN4254ACfGK+sj8Q GT0An3iVFc8COgtX500vO3okk0viN7AD =xsFW -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Replacing Dialer, IM, and SMS Apps
Sure, the contacts provider is public, and you can handle the action that is broadcast by the phone button. Note that in -any- situation where you are replacing an app, the original application will still be there in the launcher for the user to see, what it means to replace an app is that you handle the various Intent activities etc that the built-in one does, so the user can decide to use your app instead of the built-in one. On Oct 13, 11:36 am, Rohit Mordani [EMAIL PROTECTED] wrote: How about replacing the contacts app with your own - Is there any way to do that? Rohit On Sep 29, 8:00 pm, Xolotl Loki [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2) Hidden Content Providers. The open access guarantees don't necessarily grant access to the underlying content providers that power the native applications. At the moment (this might change) access to the native mail, SMS, and IM Content Providers is not available. I figured out how to read the SMS provider: Cursor c = this.getContentResolver().query(Uri.parse(content://sms/inbox), null, null, null, null); Log.d(TAG, Read + Integer.toString(c.getCount()) + SMS messages from content ( + Integer.toString(c.getColumnCount()) + columns)); String[] cols = c.getColumnNames(); for(int i = 0; i cols.length; i++) { Log.d(TAG, Column: + cols[i]); } while(c.moveToNext()) { Log.d(TAG, c.getString(c.getColumnIndex(address)) + : + c.getString(c.getColumnIndex(person)) + : +c.getString(c.getColumnIndex(date)) + : +c.getString(c.getColumnIndex(body))); } I saw the URI content://sms/inbox after adding the receiver and listening for incoming SMS. I got the column names from the middle block of code. cheers, - -- ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org iEYEARECAAYFAkjhlmcACgkQNig/07RbnEvfwACfVuJbDVbkmN4254ACfGK+sj8Q GT0An3iVFc8COgtX500vO3okk0viN7AD =xsFW -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Hiring Developer... Have Some Free Time?
Rob, so that the group doesn't get flooded with resumes (possibly including mine), how would you like us to contact you? Email address or through your website or... ? On Mon, Oct 13, 2008 at 12:31 PM, phandroid [EMAIL PROTECTED] wrote: I'm interested in hiring a developer to put together an application. Based on concept alone, it should be relatively simple. That being said, I'm not exactly sure how long it would take. Depending on the size of the project, I'd love to work on part-cash part-equity payment terms, but I'm flexible and willing to work out something we're both happy/excited about pursuing. If you'd like, include experience, expectations if you have any (for payment/terms) and contact information! Thanks Rob Jackson phandroid.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Program Finished - Now What?
On Mon, Oct 13, 2008 at 12:14 PM, Ewan Grantham [EMAIL PROTECTED]wrote: OK, I have completed coding for the first version of my game (basically it's as complete as I can get it before launch). I gather I need to do something to sign the package (there's a link for that, right?). But then how do I get it to someone so it will be in the Market on launch day? TIA! We are preparing to launch a market within the next couple of weeks: http://slideme.org . We will be releasing an Android client for users to interact with the market place. Shane --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Program Finished - Now What?
OK, I have completed coding for the first version of my game (basically it's as complete as I can get it before launch). I gather I need to do something to sign the package (there's a link for that, right?). But then how do I get it to someone so it will be in the Market on launch day? TIA! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Program Finished - Now What?
Hi Ewan, You can list it up at http://andappstore.com/ if you have an .apk available. The site is getting a fair number of hits which would indicate people are looking at it, and new releases get fed into an RSS feed and twitter. If you're looking for a way to get into Googles Marketplace, at the moment information is very thin on the ground. Regards, Al. Ewan Grantham wrote: OK, I have completed coding for the first version of my game (basically it's as complete as I can get it before launch). I gather I need to do something to sign the package (there's a link for that, right?). But then how do I get it to someone so it will be in the Market on launch day? TIA! -- Al Sutton W: www.alsutton.com B: alsutton.wordpress.com T: twitter.com/alsutton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Writing file to a shared directory on Android
Hello everyone, I have three small android applications that read and write data to the same file. Is there a directory on Android file system that is shareable across multiple applications? I tried creating a file in / system/usr/share but getting aorent directory nit writable error. I can write a file to one of the application's data directory by calling openFileOutput function and set the mode to MODE_WORLD_READABLE and then read from another application. But, I would like to create the file in a directory that is not specific to any of the three application. Is that possible? Thanks, -AJ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OnTouchListener
Touch events are delivered first to the inner-most view that is under the finger and then, if that view doesn't handle them, up to parents until either someone handles it or we reach the top of the hierarchy. If you want to intercept all touch events then you can override Activity.dispatchTouchEvent(), but this is a -really- rare thing to want to do and requires special care. If you just want to have a big view that the user touches in, you can make that your entire content view and receive touch events there. On Oct 13, 1:33 pm, Rishi [EMAIL PROTECTED] wrote: I was trying to implement OnTouch Event in my application, where user could touch (move fingers) anywhere in the screen. I thought the best way to do that would be, to set OnTouchListener on topmost layout. But it appears, layouts does not receive all the motion events. Here is a sample code - main.xml ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/topLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/txtHello android:layout_width=fill_parent android:layout_height=wrap_content android:text=Hello! / /LinearLayout public class Hello extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); View topLayout = this.findViewById(R.id.topLayout); HelloOnTouchListener l = new HelloOnTouchListener(); topLayout.setOnTouchListener(l); } class HelloOnTouchListener implements OnTouchListener{ @Override public boolean onTouch(View arg0, MotionEvent arg1) { // TODO Auto-generated method stub Log.i(tag, arg0 + + arg1.getAction()); return false; } } private static final String tag = Hello.class.getName(); } When I touch it prints the ACTION_DOWN MotionEvent, but nothing else. There is no ACTION_MOVE or ACTION_UP. Am I missing any thing? I'll really appreciate you help. Thanks, Rishi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OutOfMemoryError when switching orientation
This is a little confusing then, though. The animation thread dies as expected when I stop the application using the back arrow, but does not die (without being explicitly killed) when I flip the orientation. So some extra cleaning up must be happening for one that isn't happening for the other. Also, any ideas on the lag? On Oct 12, 11:00 am, hackbod [EMAIL PROTECTED] wrote: onCreate -is- called when the activity is starting fresh. When an orientation switch happens, the old activity is removed through onPause()-onStop()-onDestroy(), and a new instance created in the new orientation. On Oct 11, 10:15 pm, songs [EMAIL PROTECTED] wrote: Tracked the leak down to my animation thread which was getting recreated on every onCreate. From the lifecycle docs, I had thought that onCreate only got called when the activity was starting fresh and any old instances had died (and killed everything associated with it). Since this apparently isn't always the case, I'm now managing this thread more actively. This mostly solved the issue except for two things - I can still get the memory issue to happen (I just have to try harder), and after changing the orientation it takes about 2-3 seconds before the app will respond to touch events. From watching the heap using DDMS, there's a good a couple of seconds between the thread dying and its resources getting cleaned up. Because of this lag, if I quickly switch back and forth between orientations I can get the memory error to happen. These remaining issues are kind of on outside of expected behavior so I'm not too worried about things now, but there's gotta be something I'm missing that would help button this up a little tighter. - Steve On Oct 10, 1:53 am, songs [EMAIL PROTECTED] wrote: Interesting. Thanks for the lead. I'll look into this an report back either way. On Oct 10, 1:48 am, Romain Guy [EMAIL PROTECTED] wrote: Then you should check carefully where exactly you pass your Activity (or Context) to other classes/APIs, etc. The Context is used by many different classes in the Android framework and if you somehow leak the Context, you leak all the views, images, etc. Your issue is very similar to several issues we fixed over the past few months: on each rotation the Context leaks and everything leaks with it. You can use DDMS to check how the heap is growing after each rotation, it should tell you whether this is the problem or not. On Fri, Oct 10, 2008 at 1:44 AM, songs [EMAIL PROTECTED] wrote: Nope, the only static variables I have are constants. I do keep an array of Drawable in the view, but that's an instance variable. On Oct 10, 1:14 am, Romain Guy [EMAIL PROTECTED] wrote: Looks like you're leaking memory somewhere. Do you keep a static cache somewhere in your app? On Thu, Oct 9, 2008 at 10:02 PM, songs [EMAIL PROTECTED] wrote: Hi, I think that either I've stumbled onto a bug or I'm missing something on how to manage my resources. I have an activity with a Java based view that contains 30 or so small images (~2k each .png) that are loaded into an array when the view is created. In normal operation, everything runs fine. When I flip the orientation between landscape and portrait 3-4 times, I get the following: E/AndroidRuntime( 472): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 472): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) E/AndroidRuntime( 472): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290) E/AndroidRuntime( 472): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:635) E/AndroidRuntime( 472): at android.content.res.Resources.loadDrawable(Resources.java:1440) E/AndroidRuntime( 472): at android.content.res.Resources.getDrawable(Resources.java:498) When the orientation gets changed, the activity seems to go through the entire lifecycle (pause, stop, then create again). A new instance of the activity's view is created in the onCreate method and it seems that the pause/stop steps in the lifecycle don't clean up the old view. I've tried explicitly setting the reference to the view to null in onPause and doing a System.gc(), but that doesn't seem to help. I've also tried setting the requested orientation to portrait in hopes that the activity would then ignore orientation changes, but that didn't work either. GC messages come up after every orientation change so one would think that the garbage collector was doing its job. I could just leave this be and assume people aren't going to be randomly flipping their phone open and closed
[android-developers] Google Visualization doesn't show?
Hi, It seems like only image-based graphs will show up in the browser. Going to: http://code.google.com/apis/visualization/documentation/gallery/linechart.html doesn't work, but going to the image based one at: http://code.google.com/apis/visualization/documentation/gallery/imagelinechart.html does. What's going on? Regards, Steve --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Writing file to a shared directory on Android
You could use the sdcard that is accessible by all applications... Peli On Oct 13, 10:27 pm, Anshul [EMAIL PROTECTED] wrote: Hello everyone, I have three small android applications that read and write data to the same file. Is there a directory on Android file system that is shareable across multiple applications? I tried creating a file in / system/usr/share but getting aorent directory nit writable error. I can write a file to one of the application's data directory by calling openFileOutput function and set the mode to MODE_WORLD_READABLE and then read from another application. But, I would like to create the file in a directory that is not specific to any of the three application. Is that possible? Thanks, -AJ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] interpolators
hi, i've created 3 interpolators based on Robert Penner easing classes. you can download sources with small vizualization app from: http://code.google.com/p/android-easing-interpolators/downloads/list only implemented Elastic, Back Bounce interpolators - other will be done soon ;) will be glad for any comments skink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Location for common/shared libraries?
Hi, I see that many devs are porting FreeTTS to Android. It's like 5 MB or so w/ Kevin's voice. Is every TTS-enabled application going to include the library as part of its package (thus unnecessarily bloating the device/card's storage) or there is a special location, where shared/common libraries can be installed and reused by many applications. Then, if that's possible, what about versioning? Thanks, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] OnTouchListener
I was trying to implement OnTouch Event in my application, where user could touch (move fingers) anywhere in the screen. I thought the best way to do that would be, to set OnTouchListener on topmost layout. But it appears, layouts does not receive all the motion events. Here is a sample code - main.xml ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:id=@+id/topLayout android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent TextView android:id=@+id/txtHello android:layout_width=fill_parent android:layout_height=wrap_content android:text=Hello! / /LinearLayout public class Hello extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); View topLayout = this.findViewById(R.id.topLayout); HelloOnTouchListener l = new HelloOnTouchListener(); topLayout.setOnTouchListener(l); } class HelloOnTouchListener implements OnTouchListener{ @Override public boolean onTouch(View arg0, MotionEvent arg1) { // TODO Auto-generated method stub Log.i(tag, arg0 + + arg1.getAction()); return false; } } private static final String tag = Hello.class.getName(); } When I touch it prints the ACTION_DOWN MotionEvent, but nothing else. There is no ACTION_MOVE or ACTION_UP. Am I missing any thing? I'll really appreciate you help. Thanks, Rishi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OnTouchListener
Thanks Hackbod! At this point I don't have OnTouchListener set any where other than top layout. So it's pretty simple. My question was more on why OnTouchListener works differently on layout as compared to other widget (say Button). On button, when you try to drag it, you would receive ACTION_DOWN, ACTION_MOVE or ACTION_UP motion events. But on layout, you never receive any thing other than ACTION_DOWN. Is that expected? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Replacing Dialer, IM, and SMS Apps
Thanks - I figured out that the original app co-exists with the replacing app and the user has a choice to select either (kinda like windows). I like that, though it would be awesome if there was a setting to select the default app. The follow up to the previous question that I have is - how do I find out what actions/intent (that are handled by the contacts app) to override? For example, I found out that to replace the home screen you need to have the following intent filter in the manifest: intent-filter action android:name=android.intent.action.MAIN/action category android:name=android.intent.category.DEFAULT/ category category android:name=android.intent.category.HOME/category /intent-filter I found this in the groups - how do I find out the set of actions/ category/data to override for replacing the contacts app? Is there some documentation by Google on this? Rohit On Oct 13, 12:05 pm, hackbod [EMAIL PROTECTED] wrote: Sure, the contacts provider is public, and you can handle the action that is broadcast by the phone button. Note that in -any- situation where you are replacing an app, the original application will still be there in the launcher for the user to see, what it means to replace an app is that you handle the various Intent activities etc that the built-in one does, so the user can decide to use your app instead of the built-in one. On Oct 13, 11:36 am, Rohit Mordani [EMAIL PROTECTED] wrote: How about replacing the contacts app with your own - Is there any way to do that? Rohit On Sep 29, 8:00 pm, Xolotl Loki [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 2) Hidden Content Providers. The open access guarantees don't necessarily grant access to the underlying content providers that power the native applications. At the moment (this might change) access to the native mail, SMS, and IM Content Providers is not available. I figured out how to read the SMS provider: Cursor c = this.getContentResolver().query(Uri.parse(content://sms/inbox), null, null, null, null); Log.d(TAG, Read + Integer.toString(c.getCount()) + SMS messages from content ( + Integer.toString(c.getColumnCount()) + columns)); String[] cols = c.getColumnNames(); for(int i = 0; i cols.length; i++) { Log.d(TAG, Column: + cols[i]); } while(c.moveToNext()) { Log.d(TAG, c.getString(c.getColumnIndex(address)) + : + c.getString(c.getColumnIndex(person)) + : +c.getString(c.getColumnIndex(date)) + : +c.getString(c.getColumnIndex(body))); } I saw the URI content://sms/inbox after adding the receiver and listening for incoming SMS. I got the column names from the middle block of code. cheers, - -- ᛏᚠᛖᚾᚱᛁᛊᚢᛚᚠᚱᛏ ᛏᚢᛚᚠᛊᛚᛖᛁᚠᚨᚱᛏ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org iEYEARECAAYFAkjhlmcACgkQNig/07RbnEvfwACfVuJbDVbkmN4254ACfGK+sj8Q GT0An3iVFc8COgtX500vO3okk0viN7AD =xsFW -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OnTouchListener
On 13 Paź, 21:33, Rishi @Override public boolean onTouch(View arg0, MotionEvent arg1) { // TODO Auto-generated method stub Log.i(tag, arg0 + + arg1.getAction()); return false; } } try to return true in your onTouch method skink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Replacing Dialer, IM, and SMS Apps
On Oct 13, 2:37 pm, Rohit Mordani [EMAIL PROTECTED] wrote: Thanks - I figured out that the original app co-exists with the replacing app and the user has a choice to select either (kinda like windows). I like that, though it would be awesome if there was a setting to select the default app. In the dialog to pick which one to use, there is a checkbox to make that selection the defaut. The follow up to the previous question that I have is - how do I find out what actions/intent (that are handled by the contacts app) to override? For example, I found out that to replace the home screen you need to have the following intent filter in the manifest: Many of these can be determined by locking at the constants for Intent and the types and constants for the contacts provider. There does need to be better documentation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OutOfMemoryError when switching orientation
You need to make sure you have cleaned up everything by the time you return from onDestroy(). If you do that, there will not be a leak. On Oct 13, 1:46 pm, songs [EMAIL PROTECTED] wrote: This is a little confusing then, though. The animation thread dies as expected when I stop the application using the back arrow, but does not die (without being explicitly killed) when I flip the orientation. So some extra cleaning up must be happening for one that isn't happening for the other. Also, any ideas on the lag? On Oct 12, 11:00 am, hackbod [EMAIL PROTECTED] wrote: onCreate -is- called when the activity is starting fresh. When an orientation switch happens, the old activity is removed through onPause()-onStop()-onDestroy(), and a new instance created in the new orientation. On Oct 11, 10:15 pm, songs [EMAIL PROTECTED] wrote: Tracked the leak down to my animation thread which was getting recreated on every onCreate. From the lifecycle docs, I had thought that onCreate only got called when the activity was starting fresh and any old instances had died (and killed everything associated with it). Since this apparently isn't always the case, I'm now managing this thread more actively. This mostly solved the issue except for two things - I can still get the memory issue to happen (I just have to try harder), and after changing the orientation it takes about 2-3 seconds before the app will respond to touch events. From watching the heap using DDMS, there's a good a couple of seconds between the thread dying and its resources getting cleaned up. Because of this lag, if I quickly switch back and forth between orientations I can get the memory error to happen. These remaining issues are kind of on outside of expected behavior so I'm not too worried about things now, but there's gotta be something I'm missing that would help button this up a little tighter. - Steve On Oct 10, 1:53 am, songs [EMAIL PROTECTED] wrote: Interesting. Thanks for the lead. I'll look into this an report back either way. On Oct 10, 1:48 am, Romain Guy [EMAIL PROTECTED] wrote: Then you should check carefully where exactly you pass your Activity (or Context) to other classes/APIs, etc. The Context is used by many different classes in the Android framework and if you somehow leak the Context, you leak all the views, images, etc. Your issue is very similar to several issues we fixed over the past few months: on each rotation the Context leaks and everything leaks with it. You can use DDMS to check how the heap is growing after each rotation, it should tell you whether this is the problem or not. On Fri, Oct 10, 2008 at 1:44 AM, songs [EMAIL PROTECTED] wrote: Nope, the only static variables I have are constants. I do keep an array of Drawable in the view, but that's an instance variable. On Oct 10, 1:14 am, Romain Guy [EMAIL PROTECTED] wrote: Looks like you're leaking memory somewhere. Do you keep a static cache somewhere in your app? On Thu, Oct 9, 2008 at 10:02 PM, songs [EMAIL PROTECTED] wrote: Hi, I think that either I've stumbled onto a bug or I'm missing something on how to manage my resources. I have an activity with a Java based view that contains 30 or so small images (~2k each .png) that are loaded into an array when the view is created. In normal operation, everything runs fine. When I flip the orientation between landscape and portrait 3-4 times, I get the following: E/AndroidRuntime( 472): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 472): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) E/AndroidRuntime( 472): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290) E/AndroidRuntime( 472): at android.graphics.drawable.Drawable.createFromStream(Drawable.java:635) E/AndroidRuntime( 472): at android.content.res.Resources.loadDrawable(Resources.java:1440) E/AndroidRuntime( 472): at android.content.res.Resources.getDrawable(Resources.java:498) When the orientation gets changed, the activity seems to go through the entire lifecycle (pause, stop, then create again). A new instance of the activity's view is created in the onCreate method and it seems that the pause/stop steps in the lifecycle don't clean up the old view. I've tried explicitly setting the reference to the view to null in onPause and doing a System.gc(), but that doesn't seem to help. I've also tried setting the requested orientation to portrait in hopes that the activity would then ignore orientation
[android-developers] Re: OnTouchListener
You are right! It works fine after returning true in that method. The return statement was generated by eclipse, and I did not pay attention to it. I still don't understand why it acts differently for button. Either way, what appears to have been happening is it does not reach to ACTION_MOVE or ACTION_UP unless ACTION_DOWN is consumed by listener. Thanks a lot for the quick 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: OutOfMemoryError when switching orientation
I think we might be talking about a couple of different things. I've got a handle on the leak. What I'm saying is that there seem to be side-effects that change the assumptions of how the think about the lifecycle. From the perspective of the lifecycle and side-effects, I would have expected hitting the curved back arrow and then starting the app to have had the same effect as changing the orientation (except that the former would have had no saved state passed in and the latter would). This isn't the case. One has side-effects that the other doesn't so they behave differently. What about the lag? Even with cleaning up the thread, since it takes a couple of seconds for the system to actually reclaim the memory, a zealous user can still cause an OutOfMemoryError. On Oct 13, 3:05 pm, hackbod [EMAIL PROTECTED] wrote: You need to make sure you have cleaned up everything by the time you return from onDestroy(). If you do that, there will not be a leak. On Oct 13, 1:46 pm, songs [EMAIL PROTECTED] wrote: This is a little confusing then, though. The animation thread dies as expected when I stop the application using the back arrow, but does not die (without being explicitly killed) when I flip the orientation. So some extra cleaning up must be happening for one that isn't happening for the other. Also, any ideas on the lag? On Oct 12, 11:00 am, hackbod [EMAIL PROTECTED] wrote: onCreate -is- called when the activity is starting fresh. When an orientation switch happens, the old activity is removed through onPause()-onStop()-onDestroy(), and a new instance created in the new orientation. On Oct 11, 10:15 pm, songs [EMAIL PROTECTED] wrote: Tracked the leak down to my animation thread which was getting recreated on every onCreate. From the lifecycle docs, I had thought that onCreate only got called when the activity was starting fresh and any old instances had died (and killed everything associated with it). Since this apparently isn't always the case, I'm now managing this thread more actively. This mostly solved the issue except for two things - I can still get the memory issue to happen (I just have to try harder), and after changing the orientation it takes about 2-3 seconds before the app will respond to touch events. From watching the heap using DDMS, there's a good a couple of seconds between the thread dying and its resources getting cleaned up. Because of this lag, if I quickly switch back and forth between orientations I can get the memory error to happen. These remaining issues are kind of on outside of expected behavior so I'm not too worried about things now, but there's gotta be something I'm missing that would help button this up a little tighter. - Steve On Oct 10, 1:53 am, songs [EMAIL PROTECTED] wrote: Interesting. Thanks for the lead. I'll look into this an report back either way. On Oct 10, 1:48 am, Romain Guy [EMAIL PROTECTED] wrote: Then you should check carefully where exactly you pass your Activity (or Context) to other classes/APIs, etc. The Context is used by many different classes in the Android framework and if you somehow leak the Context, you leak all the views, images, etc. Your issue is very similar to several issues we fixed over the past few months: on each rotation the Context leaks and everything leaks with it. You can use DDMS to check how the heap is growing after each rotation, it should tell you whether this is the problem or not. On Fri, Oct 10, 2008 at 1:44 AM, songs [EMAIL PROTECTED] wrote: Nope, the only static variables I have are constants. I do keep an array of Drawable in the view, but that's an instance variable. On Oct 10, 1:14 am, Romain Guy [EMAIL PROTECTED] wrote: Looks like you're leaking memory somewhere. Do you keep a static cache somewhere in your app? On Thu, Oct 9, 2008 at 10:02 PM, songs [EMAIL PROTECTED] wrote: Hi, I think that either I've stumbled onto a bug or I'm missing something on how to manage my resources. I have an activity with a Java based view that contains 30 or so small images (~2k each .png) that are loaded into an array when the view is created. In normal operation, everything runs fine. When I flip the orientation between landscape and portrait 3-4 times, I get the following: E/AndroidRuntime( 472): java.lang.OutOfMemoryError: bitmap size exceeds VM budget E/AndroidRuntime( 472): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) E/AndroidRuntime( 472): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:290) E/AndroidRuntime( 472): at
[android-developers] Re: Draw children manually in custom ViewGroup
Romain, Now that the FLAG_SUPPORT_STATIC_TRANSFORMATIONS flag is gone in the 1.0 SDK, what do you recommend for such a scenario? Thanks, Cheryl On Aug 21, 10:30 am, Erik Calissendorff [EMAIL PROTECTED] wrote: Thanks, that was a much easier way to modify the views at drawing. Some tips which I learned as I tested this approach: You indicate that the ViewGroup supports static transformation with: this.mGroupFlags = this.mGroupFlags | FLAG_SUPPORT_STATIC_TRANSFORMATIONS; For the modified transformation to be performed you should return true from: boolean getChildStaticTransformation(View child, Transformation t) Kindest regards, //Erik On Aug 14, 5:12 pm, Romain Guy [EMAIL PROTECTED] wrote: You need to translate the canvas to the right position for each child and take into account the scroll offsets. I highly advise against overriding dispatchDraw() because it does a number of delicate things. The next version of the SDK will make ViewGroup.drawChild() protected so that you can override dispatchDraw() more safely. To move, scale and apply transparency to your Views at drawing time, it's a lot simpler than what you are doing. You can simply override the getChildStaticTransformation() method (I'm not sure of the exact name) and make sure your ViewGroup indicates it supports static transformations. Then simply return the appropriate Transformation that translates, scales and applies alpha. This is what Gallery does for instance. On Thu, Aug 14, 2008 at 5:15 AM, Erik Calissendorff [EMAIL PROTECTED] wrote: I'm trying to draw the children manually in my custom ViewGroup but the code below only displays the left top most child. I have tried not to clip the canvas and simply just call the child draw(Canvas c) method directly but that results in that all children are drawn on top of each other. What I like to accomplish is to be able to manually move,scale and modify the transparency of theViewat each draw call from the parent. I hope that someone can inform me how to make this work. Below is a my onLayout and dispatchDraw functions as they are now. [EMAIL PROTECTED] protected void onLayout(boolean changed, int l, int t, int r, int b) { for(int i=0;ithis.getChildCount();i++) { Viewchild = this.getChildAt(i); Rectrect=this.mCellPositions[i]; child.layout(rect.left,rect.top,rect.right,rect.bottom); } } [EMAIL PROTECTED] protected void dispatchDraw(Canvas canvas) { for(int i=0;ithis.getChildCount();i++) { Viewview= this.getChildAt(i); Rectcell=this.mCellPositions[i]; canvas.save(); if(canvas.clipRect(cell,Op.REPLACE)) { if(!canvas.quickReject(view.getLeft(),view.getTop(), view.getRight(),view.getBottom(), EdgeType.BW)) { view.draw(canvas); } } canvas.restore(); } } -- 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] Android License
Hello, New guy here, sorry to ask stupid questions but. If I want to make a phone from scratch (hardware included) where the software part is Android from Google. Do I need to sign any license agreement or pay some kind of licensing fee to Google first before I can use Android? Or, do I just download android from the web and start using it on my own custom hardware? What if I start selling it, do I have to pay a fee then? Anybody knows how the licensing it works? Thanks Dread_Locks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Sticky Broadcasts and Concurrency
When you send a sticky broadcast, that broadcast will replace any other existing one with the same action, type, data, and categories. No need to remove it. Just be sure that all of your changing state is in the extras part of the Intent, not in the main fields. On Oct 13, 3:35 pm, Soonil Nagarkar [EMAIL PROTECTED] wrote: I have a component that uses sticky broadcasts to send out state information about itself along the lines of enabled/disabled. By using sticky broadcasts, anybody that needs to check the state of the component (which can be changed at any time by other threads) can stay up to date rather than using a polling mechanism which doesn't guarantee any 'up-to-date-ness'. However, my understanding of the sticky broadcast documentation is that sticky broadcast intents stay around forever unless removed and never replace each other. Since I don't want some huge list of previous intents gumming up the system, and since other components only need the last sticky broadcast, not the whole list, to determine what the current component state is, I use removeStickyBroadcast() to always remove the last intent. As far as I can see however, this leads to concurrency problems. See the following code... Ex 1. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and not get any //information on the previous component state last_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); Ex 2. Intent new_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and receive two sticky //broadcast intents instead of one. a better, but not ideal solution. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); last_broadcast = new_broadcast; Neither of these two scenarios solves the problem entirely, and I can't imagine any way to make this synchronous with respect to other registerReceiver() calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 License
Dread_Locks wrote: If I want to make a phone from scratch (hardware included) where the software part is Android from Google. Do I need to sign any license agreement or pay some kind of licensing fee to Google first before I can use Android? Once it is released as open source, you shouldn't have to *sign* any sort of software license. It should all be Apache 2.0, plus GPL for the Linux kernel and various other licenses for the other open source bits. You'll have to abide by those licenses' terms, of course, but they're fee-free and fairly liberal. There may be licenses for Google/OHA trademarks, Google services (e.g., Street View), etc., but those damn well better be optional. Precise terms should be available when it is released, which is believed to be somewhere around the G1 release on October 22nd, though I'm not aware of any firm dates or announcements. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 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: Draw children manually in custom ViewGroup
Note that this is a mistake from us. The flag (actually a setter method) will be back in the next version of Android. I already made sure of that. Without this flag, unfortunately, you need to override ViewGroup's drawChild()/onLayout() manually and apply the transformation yourself. On Mon, Oct 13, 2008 at 3:42 PM, Cheryl Sedota [EMAIL PROTECTED] wrote: Romain, Now that the FLAG_SUPPORT_STATIC_TRANSFORMATIONS flag is gone in the 1.0 SDK, what do you recommend for such a scenario? Thanks, Cheryl On Aug 21, 10:30 am, Erik Calissendorff [EMAIL PROTECTED] wrote: Thanks, that was a much easier way to modify the views at drawing. Some tips which I learned as I tested this approach: You indicate that the ViewGroup supports static transformation with: this.mGroupFlags = this.mGroupFlags | FLAG_SUPPORT_STATIC_TRANSFORMATIONS; For the modified transformation to be performed you should return true from: boolean getChildStaticTransformation(View child, Transformation t) Kindest regards, //Erik On Aug 14, 5:12 pm, Romain Guy [EMAIL PROTECTED] wrote: You need to translate the canvas to the right position for each child and take into account the scroll offsets. I highly advise against overriding dispatchDraw() because it does a number of delicate things. The next version of the SDK will make ViewGroup.drawChild() protected so that you can override dispatchDraw() more safely. To move, scale and apply transparency to your Views at drawing time, it's a lot simpler than what you are doing. You can simply override the getChildStaticTransformation() method (I'm not sure of the exact name) and make sure your ViewGroup indicates it supports static transformations. Then simply return the appropriate Transformation that translates, scales and applies alpha. This is what Gallery does for instance. On Thu, Aug 14, 2008 at 5:15 AM, Erik Calissendorff [EMAIL PROTECTED] wrote: I'm trying to draw the children manually in my custom ViewGroup but the code below only displays the left top most child. I have tried not to clip the canvas and simply just call the child draw(Canvas c) method directly but that results in that all children are drawn on top of each other. What I like to accomplish is to be able to manually move,scale and modify the transparency of theViewat each draw call from the parent. I hope that someone can inform me how to make this work. Below is a my onLayout and dispatchDraw functions as they are now. @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { for(int i=0;ithis.getChildCount();i++) { Viewchild = this.getChildAt(i); Rectrect=this.mCellPositions[i]; child.layout(rect.left,rect.top,rect.right,rect.bottom); } } @Override protected void dispatchDraw(Canvas canvas) { for(int i=0;ithis.getChildCount();i++) { Viewview= this.getChildAt(i); Rectcell=this.mCellPositions[i]; canvas.save(); if(canvas.clipRect(cell,Op.REPLACE)) { if(!canvas.quickReject(view.getLeft(),view.getTop(), view.getRight(),view.getBottom(), EdgeType.BW)) { view.draw(canvas); } } canvas.restore(); } } -- Romain Guywww.curious-creature.org -- 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] Sticky Broadcasts and Concurrency
I have a component that uses sticky broadcasts to send out state information about itself along the lines of enabled/disabled. By using sticky broadcasts, anybody that needs to check the state of the component (which can be changed at any time by other threads) can stay up to date rather than using a polling mechanism which doesn't guarantee any 'up-to-date-ness'. However, my understanding of the sticky broadcast documentation is that sticky broadcast intents stay around forever unless removed and never replace each other. Since I don't want some huge list of previous intents gumming up the system, and since other components only need the last sticky broadcast, not the whole list, to determine what the current component state is, I use removeStickyBroadcast() to always remove the last intent. As far as I can see however, this leads to concurrency problems. See the following code... Ex 1. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and not get any //information on the previous component state last_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); Ex 2. Intent new_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and receive two sticky //broadcast intents instead of one. a better, but not ideal solution. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); last_broadcast = new_broadcast; Neither of these two scenarios solves the problem entirely, and I can't imagine any way to make this synchronous with respect to other registerReceiver() calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Sticky Broadcasts and Concurrency
Great, and thanks! If I might advise, the documentation for sticky broadcasts doesn't make it very clear that Intents with the same action, type, data, and categories will replace each other, and could be updated. On Oct 13, 6:49 pm, hackbod [EMAIL PROTECTED] wrote: When you send a sticky broadcast, that broadcast will replace any other existing one with the same action, type, data, and categories. No need to remove it. Just be sure that all of your changing state is in the extras part of the Intent, not in the main fields. On Oct 13, 3:35 pm, Soonil Nagarkar [EMAIL PROTECTED] wrote: I have a component that uses sticky broadcasts to send out state information about itself along the lines of enabled/disabled. By using sticky broadcasts, anybody that needs to check the state of the component (which can be changed at any time by other threads) can stay up to date rather than using a polling mechanism which doesn't guarantee any 'up-to-date-ness'. However, my understanding of the sticky broadcast documentation is that sticky broadcast intents stay around forever unless removed and never replace each other. Since I don't want some huge list of previous intents gumming up the system, and since other components only need the last sticky broadcast, not the whole list, to determine what the current component state is, I use removeStickyBroadcast() to always remove the last intent. As far as I can see however, this leads to concurrency problems. See the following code... Ex 1. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and not get any //information on the previous component state last_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); Ex 2. Intent new_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and receive two sticky //broadcast intents instead of one. a better, but not ideal solution. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); last_broadcast = new_broadcast; Neither of these two scenarios solves the problem entirely, and I can't imagine any way to make this synchronous with respect to other registerReceiver() calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Sticky Broadcasts and Concurrency
Yeah the doc for that function should be better, it is a low priority because this is really not something that most apps should use (in fact it was made available pretty late in development). On Oct 13, 4:07 pm, Tsunami [EMAIL PROTECTED] wrote: Great, and thanks! If I might advise, the documentation for sticky broadcasts doesn't make it very clear that Intents with the same action, type, data, and categories will replace each other, and could be updated. On Oct 13, 6:49 pm, hackbod [EMAIL PROTECTED] wrote: When you send a sticky broadcast, that broadcast will replace any other existing one with the same action, type, data, and categories. No need to remove it. Just be sure that all of your changing state is in the extras part of the Intent, not in the main fields. On Oct 13, 3:35 pm, Soonil Nagarkar [EMAIL PROTECTED] wrote: I have a component that uses sticky broadcasts to send out state information about itself along the lines of enabled/disabled. By using sticky broadcasts, anybody that needs to check the state of the component (which can be changed at any time by other threads) can stay up to date rather than using a polling mechanism which doesn't guarantee any 'up-to-date-ness'. However, my understanding of the sticky broadcast documentation is that sticky broadcast intents stay around forever unless removed and never replace each other. Since I don't want some huge list of previous intents gumming up the system, and since other components only need the last sticky broadcast, not the whole list, to determine what the current component state is, I use removeStickyBroadcast() to always remove the last intent. As far as I can see however, this leads to concurrency problems. See the following code... Ex 1. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and not get any //information on the previous component state last_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); Ex 2. Intent new_broadcast = new Intent(...); context.sendStickyBroadcast(last_broadcast); //it is possible for a thread to interleave its own call to registerReceiver() right here, and receive two sticky //broadcast intents instead of one. a better, but not ideal solution. if(last_broadcast != null) context.removeStickyBroadcast(last_broadcast); last_broadcast = new_broadcast; Neither of these two scenarios solves the problem entirely, and I can't imagine any way to make this synchronous with respect to other registerReceiver() calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Location for common/shared libraries?
There is no support for third party shared libraries in 1.0. One approach you can take is to implement it as a Service that others can use. On Oct 13, 2:13 pm, Stoyan Damov [EMAIL PROTECTED] wrote: Hi, I see that many devs are porting FreeTTS to Android. It's like 5 MB or so w/ Kevin's voice. Is every TTS-enabled application going to include the library as part of its package (thus unnecessarily bloating the device/card's storage) or there is a special location, where shared/common libraries can be installed and reused by many applications. Then, if that's possible, what about versioning? Thanks, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Draw children manually in custom ViewGroup
Thanks, Romain. On Oct 13, 5:57 pm, Romain Guy [EMAIL PROTECTED] wrote: Note that this is a mistake from us. The flag (actually a setter method) will be back in the next version of Android. I already made sure of that. Without this flag, unfortunately, you need to override ViewGroup's drawChild()/onLayout() manually and apply the transformation yourself. On Mon, Oct 13, 2008 at 3:42 PM, Cheryl Sedota [EMAIL PROTECTED] wrote: Romain, Now that the FLAG_SUPPORT_STATIC_TRANSFORMATIONS flag is gone in the 1.0 SDK, what do you recommend for such a scenario? Thanks, Cheryl On Aug 21, 10:30 am, Erik Calissendorff [EMAIL PROTECTED] wrote: Thanks, that was a much easier way to modify the views at drawing. Some tips which I learned as I tested this approach: You indicate that the ViewGroup supports static transformation with: this.mGroupFlags = this.mGroupFlags | FLAG_SUPPORT_STATIC_TRANSFORMATIONS; For the modified transformation to be performed you should return true from: boolean getChildStaticTransformation(View child, Transformation t) Kindest regards, //Erik On Aug 14, 5:12 pm, Romain Guy [EMAIL PROTECTED] wrote: You need to translate the canvas to the right position for each child and take into account the scroll offsets. I highly advise against overriding dispatchDraw() because it does a number of delicate things. The next version of the SDK will make ViewGroup.drawChild() protected so that you can override dispatchDraw() more safely. To move, scale and apply transparency to your Views at drawing time, it's a lot simpler than what you are doing. You can simply override the getChildStaticTransformation() method (I'm not sure of the exact name) and make sure your ViewGroup indicates it supports static transformations. Then simply return the appropriate Transformation that translates, scales and applies alpha. This is what Gallery does for instance. On Thu, Aug 14, 2008 at 5:15 AM, Erik Calissendorff [EMAIL PROTECTED] wrote: I'm trying to draw the children manually in my custom ViewGroup but the code below only displays the left top most child. I have tried not to clip the canvas and simply just call the child draw(Canvas c) method directly but that results in that all children are drawn on top of each other. What I like to accomplish is to be able to manually move,scale and modify the transparency of theViewat each draw call from the parent. I hope that someone can inform me how to make this work. Below is a my onLayout and dispatchDraw functions as they are now. [EMAIL PROTECTED] protected void onLayout(boolean changed, int l, int t, int r, int b) { for(int i=0;ithis.getChildCount();i++) { Viewchild = this.getChildAt(i); Rectrect=this.mCellPositions[i]; child.layout(rect.left,rect.top,rect.right,rect.bottom); } } [EMAIL PROTECTED] protected void dispatchDraw(Canvas canvas) { for(int i=0;ithis.getChildCount();i++) { Viewview= this.getChildAt(i); Rectcell=this.mCellPositions[i]; canvas.save(); if(canvas.clipRect(cell,Op.REPLACE)) { if(!canvas.quickReject(view.getLeft(),view.getTop(), view.getRight(),view.getBottom(), EdgeType.BW)) { view.draw(canvas); } } canvas.restore(); } } -- Romain Guywww.curious-creature.org -- 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] Confused by Android testing framework
I'm attempting to use the JUnit-based testing framework supplied with Android 1.0r1...and I'm baffled. I found the tests associated with the ApiDemos in the SDK. In the AllTests class, it says to run: adb shell am instrument -w \ com.example.android.apis.tests/android.test.InstrumentationTestRunner I do that, and I get: INSTRUMENTATION_FAILED: com.example.android.apis.tests/android.test.InstrumentationTestRunner and DDMS gives me an Unable to find instrumentation info for... warning. But, that's OK, I want to run my own tests. So, in a fresh activityCreator-created project, I: 1. Create an AndroidManifest.xml file: manifest xmlns:android=http://schemas.android.com/apk/res/android; package=xyz.test android:versionCode=1 android:versionName=1.0.0 application uses-library android:name=android.test.runner / /application instrumentation android:name=android.test.InstrumentationTestRunner android:targetPackage=xyz android:label=Tests for the heck of it/ /manifest 2. Make a suite class in my xyz.test package: public class XYZSuite extends TestSuite { public static Test suite() { return(new TestSuiteBuilder(XYZSuite.class) .includeAllPackagesUnderHere() .build()); } } 3. Make a stupid test class in an xyz.test.foo sub-package: public class SampleTest extends AndroidTestCase { protected void setUp() { // do something here } protected void tearDown() { // do something here } public void testStupid() { assert(true); } public void testStupider() { assert(false); } } 4. Build and install the APK for all this on the emulator, bundling in a JAR of classes in the xyz namespace that I (eventually) want to test. 5. Run: adb shell am instrument -w \ xyz.test/android.test.InstrumentationTestRunner ...and it too fails with INSTRUMENTATION_FAILED. This time, I get a different warning from DDMS: Unable to find instrumentation target package: xyz Where am I going wrong? Thanks in advance! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 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: Replacing Dialer, IM, and SMS Apps
What I meant is - if I were to ship a device with the replacement app as the default (out of the box), rather than confusing the user. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: OnTouchListener
On 13 Paź, 23:15, Rishi I still don't understand why it acts differently for button. Either way, what appears to have been happening is it does not reach to ACTION_MOVE or ACTION_UP unless ACTION_DOWN is consumed by listener. it's not documented (i think) but in my opinion google designers treat down/move/up actions as a sequence of events. if you are not interested in down event the rest (move/up) won't appear. skink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Confused by Android testing framework
Mark- I think it would make sense to start with the ApiDemos tests, so that you can (at a minimum) start with a known good quantity. The structure of these is that there are two packages - the Api Demos package itself (com.example.android.apis), and the package of tests that goes with it (com.example.android.apis.tests). So the first thing to do is to make sure that everything built properly and installed properly. It's easy to confirm that the ApiDemos package is on your emulator - you should be able to launch it from the home screen. To look under the covers, use this command: $ adb shell pm list packages | grep example And you should see (among other things) both of the packages I mentioned. If you don't see both packages, then fix that first (no point in launching the instrumentation yet). Finally, when you have instrumentation launch failure, did you take a look at what's happening in adb logcat? As you've discovered, the output from adb shell am instrument is pretty thin; Sometimes you can learn more about the problem from the logcat output. --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: Confused by Android testing framework
Andrew Stadler wrote: To look under the covers, use this command: $ adb shell pm list packages | grep example And you should see (among other things) both of the packages I mentioned. If you don't see both packages, then fix that first (no point in launching the instrumentation yet). The .tests package is not there, so I'm guessing that's not pre-installed in the emulator. I notice there are no build.xml files in the ApiDemos anywhere. I am assuming I need to build and install the tests -- will a stock activitycreator-style build.xml suffice for the ApiDemos tests? What is also interesting is, for my attempt at using my own tests, xyz.test is listed, but not xyz. However, xyz's code is loaded in two separate APKs (a sample app in the xyz.sample package, plus the xyz.test test suite), so I know for certain the code is on the emulator. What exactly constitutes the packages that adb shell pm list packages lists? It's clearly not Java packages, as the list is missing lots of stuff. Is it the default namespace for each installed APK? And is that the targetPackage I'm supposed to have in my AndroidManifest.xml file? I'm starting to suspect I'm suffering from term overload on package. Finally, when you have instrumentation launch failure, did you take a look at what's happening in adb logcat? Yes. I mentioned that in the original email, but here's more detail: For the ApiDemos one, DDMS gives me: Unable to find instrumentation info for: ComponentInfo{com.example.android.apis.tests/android.test.InstrumentationTestRunner} For my own, DDMS gives me: Unable to find instrumentation target package: xyz Many thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 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: Confused by Android testing framework
If you know Maven, you can check out: http://code.google.com/p/masa/wiki/GettingStarted The instrumentation plugin will run the api demo tests. Shane On Mon, Oct 13, 2008 at 5:21 PM, Mark Murphy [EMAIL PROTECTED]wrote: Andrew Stadler wrote: To look under the covers, use this command: $ adb shell pm list packages | grep example And you should see (among other things) both of the packages I mentioned. If you don't see both packages, then fix that first (no point in launching the instrumentation yet). The .tests package is not there, so I'm guessing that's not pre-installed in the emulator. I notice there are no build.xml files in the ApiDemos anywhere. I am assuming I need to build and install the tests -- will a stock activitycreator-style build.xml suffice for the ApiDemos tests? What is also interesting is, for my attempt at using my own tests, xyz.test is listed, but not xyz. However, xyz's code is loaded in two separate APKs (a sample app in the xyz.sample package, plus the xyz.test test suite), so I know for certain the code is on the emulator. What exactly constitutes the packages that adb shell pm list packages lists? It's clearly not Java packages, as the list is missing lots of stuff. Is it the default namespace for each installed APK? And is that the targetPackage I'm supposed to have in my AndroidManifest.xml file? I'm starting to suspect I'm suffering from term overload on package. Finally, when you have instrumentation launch failure, did you take a look at what's happening in adb logcat? Yes. I mentioned that in the original email, but here's more detail: For the ApiDemos one, DDMS gives me: Unable to find instrumentation info for: ComponentInfo{com.example.android.apis.tests/android.test.InstrumentationTestRunner} For my own, DDMS gives me: Unable to find instrumentation target package: xyz Many thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 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: Confused by Android testing framework
As you've figured out, both of your problems are related to having one but not both packages installed. Interestingly, it appears to be the opposite condition: It sounds as if your ApiDemos *tests* are not loaded, but your own app is also not loaded. Yes, you've also figured out that the name packages has been overloaded here. In the context of the package manager, as well as the way that Instrumentation is applied, we are referring here to Android packages, which are mostly typically found in .apk files. In the case of ApiDemos, you'll note that there are two makefiles and two manifests. The android package string is set near the top of each manifest. Anyway, as I said before, at the end of the day for any given app+test pair, you should be able to build both packages, install both packages, and view them using adb shell pm list packages. Only then, try running them --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: Location for common/shared libraries?
In fact, there is already a FreeTTS service set up and available in the Android Market. Once the user downloads it any app can use it. On Oct 13, 3:13 pm, Stoyan Damov [EMAIL PROTECTED] wrote: Hi, I see that many devs are porting FreeTTS to Android. It's like 5 MB or so w/ Kevin's voice. Is every TTS-enabled application going to include the library as part of its package (thus unnecessarily bloating the device/card's storage) or there is a special location, where shared/common libraries can be installed and reused by many applications. Then, if that's possible, what about versioning? Thanks, Stoyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Confused by Android testing framework
Andrew Stadler wrote: Yes, you've also figured out that the name packages has been overloaded here. In the context of the package manager, as well as the way that Instrumentation is applied, we are referring here to Android packages, which are mostly typically found in .apk files. snip Anyway, as I said before, at the end of the day for any given app+test pair, you should be able to build both packages, install both packages, and view them using adb shell pm list packages. Only then, try running them Well, that got me further. Sorta. I'm trying to test a library (JAR exposing a public API), not an app. So I tried setting targetPackage to be the closest thing I have to an app, which is a sample app (xyz.sample). That works but claims there are no test cases in xyz.sample. That's absolutely true -- the test cases are in xyz.test -- and I have no idea why it would be looking in xyz.sample for tests when my adb shell command is telling it to run tests in xyz.test. Heck, I don't even know why it cares about xyz.sample in the first place. What seems to work is making targetPackage in the manifest be the test package itself (xyz.test). That at least claims to run the tests, and I see the names of my tests in logcat output. However, the fact that all tests are run twice, and assert(false); passes both times, doesn't exactly inspire me with confidence. But, that's OK. I'll skin the cat some other way. Perhaps I'll circle back to the Android testing framework sometime in the future. Thanks again for the help! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.3 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 -~--~~~~--~~--~--~---