[android-beginners] Re: Directory names
Thanks Mark - I know all about the Linux file system behavior - ls vs ls -a etc. So I guess my question was answered indirectly, the emulator File Explorer does not display dotted files and it emulates an 'ls'. On Jul 28, 6:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 28, 2010 at 11:39 AM, kypriakos demet...@ece.neu.edu wrote: I have been experimenting with the file system that the emulator presents and I noticed that although I can create files with 'normal' names (ex. test, src), I don't seem to be able to create dotted names, such as .test, .src. Is there a restriction on dir names (other than the common rules that apply on most OSs)? You can create them. You can't see them. Directories with leading periods are normally suppressed from directory listings. This has been standard Linux behavior for a very long time. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Contents of dex
Good thanks - I was able to use the dedexer last night and it worked like a champ. Able to view the complete fs of the classes archive ... On Jul 28, 5:44 pm, fadden fad...@android.com wrote: On Jul 27, 9:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 27, 2010 at 11:50 PM, kypriakos demet...@ece.neu.edu wrote: is there a way to view what is enclosed (file list) in the dex file? http://dedexer.sourceforge.net/ Also dexdump (which comes installed on development devices) andhttp://code.google.com/p/smali/. -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Contents of dex
Great thanks Mark. On Jul 28, 12:03 am, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 27, 2010 at 11:50 PM, kypriakos demet...@ece.neu.edu wrote: is there a way to view what is enclosed (file list) in the dex file? http://dedexer.sourceforge.net/ -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Directory names
Hi again, I have been experimenting with the file system that the emulator presents and I noticed that although I can create files with 'normal' names (ex. test, src), I don't seem to be able to create dotted names, such as .test, .src. Is there a restriction on dir names (other than the common rules that apply on most OSs)? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Contents of dex
Hi all, is there a way to view what is enclosed (file list) in the dex file? You can zip-view the apk archive but I cannot find a way to do the same with the dex file. Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Large jars in Android
Hey Paul, I will try increasing the -Xmx to 768 and hope it helps out. I am also looking for circular refs in the jars just in case that is the problem but I doubt I will find any. Some older postings do refer to apps that go to size up to 16MB and more so my 5MB one should not be the issue. I think the packaging of apps over 1MB gives the Android plug in a bit too much to chew ( especially if it is composed of thousands of classes) ... I will let you know how it goes - thanks On Jul 25, 11:14 am, Paul Turchenko paul.turche...@gmail.com wrote: Just increase JVM's heap size. For eclipse I use willowing eclipse.ini: -framework plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar -vm C:/Program Files/Java/jre6/bin/client/jvm.dll -vmargs -Xms256m -Xmx768m -startup file:/C:/Program%20Files/eclipse/plugins/ org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library file:/C:/Program%20Files/eclipse/plugins/ org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vm C:\Program Files\Java\jre6\bin\client\jvm.dll -Xss2m -XX:PermSize=128m -XX:CompileThreshold=5 -Xoptimize As for the ANT, use -Xmx768m switch for JVM On Jul 25, 5:43 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I looked for any info on this but could not find much. Originally I had a number of 3rd jars that I was importing into the Android project. The general concensus I got was that I needed to find the source for them and compile them in Android - well I kicked my behind and did all that and finally I have all jars in place for my Android app. The compilation and packaging of apk of the app with those jars sitting in the libs dir of the app takes 10-12 mins and towards the end it gives an Eclipse internal error and it quits! I tried doing this outside Eclipse using ant and still the same result. I have the java heap params jacked up for -xmx and -xms to 256MB and still no luck. The jars sum up to 6MB and the actual app to 0.25MB. The individual library directories that use to compile each of the 3rd jars compile fairly fast. So I am wondering if anyone has any insights on this - is the Android plugin or in general the Android devices not meant to handle such large apks? Is there anything else I need to configure or look into to get this packaged? Thanks very much Demetris -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Large jars in Android
Hi all, I looked for any info on this but could not find much. Originally I had a number of 3rd jars that I was importing into the Android project. The general concensus I got was that I needed to find the source for them and compile them in Android - well I kicked my behind and did all that and finally I have all jars in place for my Android app. The compilation and packaging of apk of the app with those jars sitting in the libs dir of the app takes 10-12 mins and towards the end it gives an Eclipse internal error and it quits! I tried doing this outside Eclipse using ant and still the same result. I have the java heap params jacked up for -xmx and -xms to 256MB and still no luck. The jars sum up to 6MB and the actual app to 0.25MB. The individual library directories that use to compile each of the 3rd jars compile fairly fast. So I am wondering if anyone has any insights on this - is the Android plugin or in general the Android devices not meant to handle such large apks? Is there anything else I need to configure or look into to get this packaged? Thanks very much Demetris -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Source code
Thanks Mark and Rogerio - I did google but I jumped straight to the link that referred to the cupcake :) My bad .. Got it now On Jul 20, 5:10 pm, Rogério de Souza Moraes rogerio.so...@gmail.com wrote: You can get the source fromhttp://source.android.com. Next time google a little bit more and you will find out the answer. Regards, Rogerio 2010/7/20 Mark Murphy mmur...@commonsware.com On Tue, Jul 20, 2010 at 3:20 PM, kypriakos demet...@ece.neu.edu wrote: is the Android 2.1 or 2.2 source code available somewhere? http://source.android.com I was able to find the source code of what they called android 1.5 cupcake but I am not sure that is very recent. Cupcake is from last year. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
Hi Mark, so it does seem that if the jars are not compiled under Android, the Android plug in (if the Eclipse Project Build Automatically is checked) rejects them from the apk - in other cases it does not generate the apk at all. Some of the libs I need are part of the Java's standard libs (ex. java.awt.*; does exist in Android SDK but java.awt.event.ActionEvent; does not). So I am guessing that either I should find a compatibility library written for Android for these libs or to avoid using them and use only what Android offers. Thanks for helping out with your pointers on this On Jul 18, 8:30 pm, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jul 18, 2010 at 4:52 PM, kypriakos demet...@ece.neu.edu wrote: Step #1: Put the JAR in libs/ I did Step #2: If using Eclipse, add it to your build path I did Step #3: Code to the JAR's API and build your APK I did Even for the case of the jars that are Android-friendly they don't get included in the apk. :: shrug :: It works for many other developers, including hundreds of students of mine. Since the non-Eclipse portion is pretty bulletproof, and since I don't use Eclipse, my guess is that your problems stem from something Eclipse-related, perhaps in the way you are putting it in your build path. The libs dir is either in the src dir or the top level dir. The libs/ dir is supposed to be in the root of the project dir. Now, I have heard that you can have it located elsewhere when you are building with Eclipse, but I have not tried that. Once I move it in the assets dir I can see it being wrapped inside the apk. I suspect having it there will be useless. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Source code
Hi all, is the Android 2.1 or 2.2 source code available somewhere? I was able to find the source code of what they called android 1.5 cupcake but I am not sure that is very recent. Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
:: shrug :: It works for many other developers, including hundreds of students of mine. Since the non-Eclipse portion is pretty bulletproof, and since I don't use Eclipse, my guess is that your problems stem from something Eclipse-related, perhaps in the way you are putting it in your build path. I don't doubt that it works actually and I do think it has to do with either how I configured the plug in or some other issues with Eclipse - the build path etc I know that pretty well so I don't think that's the problem. I will post a solution once I find it to help anyone else who may have the same issue. The libs dir is either in the src dir or the top level dir. The libs/ dir is supposed to be in the root of the project dir. Now, I have heard that you can have it located elsewhere when you are building with Eclipse, but I have not tried that. I tried both - I will keep it in the root dir to be on the safe side and eliminate at least that unknown. Once I move it in the assets dir I can see it being wrapped inside the apk. I suspect having it there will be useless. Ack. On a related note - I think the http commons (apache) is part of the Android platform but in the general scheme of things is there a repository somewhere that stores 3rd party jars compiled for Android (similar to ibm's wsdl, bouncycastle etc.)? Thanks again -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
If jars are not compatible with the Android platform would that prevent them from being packaged in the .apk? I checked build class paths etc. and everything looks good ... On Jul 18, 8:19 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 17, 2010 at 11:45 PM, kypriakos demet...@ece.neu.edu wrote: But older postings and some sources supported that in general external jars may not work under Android There are a multitude of reasons why an existing JAR may not work on Android: -- It was compiled with Java 1.4.2 or a non-Sun/Oracle Java compiler -- It assumes certain classes exist (from, say, JavaSE) that do not ship with Android -- It uses JNI (and therefore needs to be adjusted to work with the NDK) -- It assumes certain platform binary programs exist, or exist at certain paths, which may not be the case on Android -- and so on and that their corresponding source should be compiled with its SDK before they can be used That will directly resolve the compiled-with-wrong-compiler program and will give you better error information for the assumes-certain-classes-exist problem. In any case, then it makes no sense as to why the classes are not visible in the emulator even though I (finally) managed to include the jars in the apk - having them in the classpath does not do it. Step #1: Put the JAR in libs/ Step #2: If using Eclipse, add it to your build path Step #3: Code to the JAR's API and build your APK and you're done...assuming the JAR is Android-friendly. For example, here is a sample project using a re-compiled edition of the BeanShell interpreter: http://github.com/commonsguy/cw-android/tree/master/Java/AndShell/ -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
Just to make this a bit more visual - the .classpath shows: ?xml version=1.0 encoding=UTF-8? classpath classpathentry kind=src path=src/ classpathentry kind=src path=gen/ classpathentry kind=con path=com.android.ide.eclipse.adt.ANDROID_FRAMEWORK/ classpathentry kind=con path=org.eclipse.jdt.USER_LIBRARY/myLib/ classpathentry kind=output path=bin/ /classpath The myLib contains the jars that reside under ROOT/libs in this particular project. And finally the .dex archive (and subsequently the .apk file) contains all the project classes but not the jars from above. So what am I missing?? Like I said in the previous email, unless the Android plugin packaging ignores the jars I don't see any other reason why they would not be included. Thanks On Jul 18, 8:19 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 17, 2010 at 11:45 PM, kypriakos demet...@ece.neu.edu wrote: But older postings and some sources supported that in general external jars may not work under Android There are a multitude of reasons why an existing JAR may not work on Android: -- It was compiled with Java 1.4.2 or a non-Sun/Oracle Java compiler -- It assumes certain classes exist (from, say, JavaSE) that do not ship with Android -- It uses JNI (and therefore needs to be adjusted to work with the NDK) -- It assumes certain platform binary programs exist, or exist at certain paths, which may not be the case on Android -- and so on and that their corresponding source should be compiled with its SDK before they can be used That will directly resolve the compiled-with-wrong-compiler program and will give you better error information for the assumes-certain-classes-exist problem. In any case, then it makes no sense as to why the classes are not visible in the emulator even though I (finally) managed to include the jars in the apk - having them in the classpath does not do it. Step #1: Put the JAR in libs/ Step #2: If using Eclipse, add it to your build path Step #3: Code to the JAR's API and build your APK and you're done...assuming the JAR is Android-friendly. For example, here is a sample project using a re-compiled edition of the BeanShell interpreter: http://github.com/commonsguy/cw-android/tree/master/Java/AndShell/ -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
And one more interesting fact - if I add the jars as External Jars using Eclipse, building the workspace takes a while, eventually it runs out of memory and it only generates the resources file (no apk and no dex). If I add the jars as Lib (as I showed in the previous posting), the workspace is built fast, all archived deployable files are generated but no jars are include ... something seems a bit out of wack here - anyone else saw this before? Thanks again On Jul 18, 8:19 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 17, 2010 at 11:45 PM, kypriakos demet...@ece.neu.edu wrote: But older postings and some sources supported that in general external jars may not work under Android There are a multitude of reasons why an existing JAR may not work on Android: -- It was compiled with Java 1.4.2 or a non-Sun/Oracle Java compiler -- It assumes certain classes exist (from, say, JavaSE) that do not ship with Android -- It uses JNI (and therefore needs to be adjusted to work with the NDK) -- It assumes certain platform binary programs exist, or exist at certain paths, which may not be the case on Android -- and so on and that their corresponding source should be compiled with its SDK before they can be used That will directly resolve the compiled-with-wrong-compiler program and will give you better error information for the assumes-certain-classes-exist problem. In any case, then it makes no sense as to why the classes are not visible in the emulator even though I (finally) managed to include the jars in the apk - having them in the classpath does not do it. Step #1: Put the JAR in libs/ Step #2: If using Eclipse, add it to your build path Step #3: Code to the JAR's API and build your APK and you're done...assuming the JAR is Android-friendly. For example, here is a sample project using a re-compiled edition of the BeanShell interpreter: http://github.com/commonsguy/cw-android/tree/master/Java/AndShell/ -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
Hey Mark, good points as always - There are a multitude of reasons why an existing JAR may not work on Android: -- It was compiled with Java 1.4.2 or a non-Sun/Oracle Java compiler -- It assumes certain classes exist (from, say, JavaSE) that do not ship with Android -- It uses JNI (and therefore needs to be adjusted to work with the NDK) -- It assumes certain platform binary programs exist, or exist at certain paths, which may not be the case on Android -- and so on Exactly - the jars I am importing are from Sun's famous JXTA-JXSE project that was compiled with Sun's Java 1.5+ but although it does not use JNI I have a feeling that it assumes certain classes exist ... I noticed the owners of the PeerDroid project did manage to compile the J2ME-CDC version of JXTA-JXME under the Android platform. However, what was curious there is that they also included external jars in their compilations (bcprov-1.4 etc.) that I am also try to include - I will see if I can find how they got away with that. But before I can get to the bottom of this one my first issue is what you are describing below ... Step #1: Put the JAR in libs/ I did Step #2: If using Eclipse, add it to your build path I did Step #3: Code to the JAR's API and build your APK I did Even for the case of the jars that are Android-friendly they don't get included in the apk. The libs dir is either in the src dir or the top level dir. Once I move it in the assets dir I can see it being wrapped inside the apk. So before attempt to compile the code from above I will see if I can figure this one out. Thanks for the pointers though - they will help -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
Really? That would make me feel much better. But older postings and some sources supported that in general external jars may not work under Android and that their corresponding source should be compiled with its SDK before they can be used - which throws reusability out of the window. In any case, then it makes no sense as to why the classes are not visible in the emulator even though I (finally) managed to include the jars in the apk - having them in the classpath does not do it. Including them in the assets dir will .. unless someone else knows of a better way to do it ( I did use the export and order and no it doesn't work). Thanks Dan On Jul 17, 9:06 am, DanH danhi...@ieee.org wrote: That's not been my impression, and when I browse an Android class file with a hex editor it says CAFEBABE. On Jul 16, 11:48 pm, kypriakos demet...@ece.neu.edu wrote: So it is fair to say = Android bytecode != 3rd party code bytecode (particularly from IBM or SUN or Axis)? So the reason I am not seeing the libraries (which otherwise helped me compile my imported app in Eclipse) in the apk file is because they are not recognized by the Android platform? Unless I obtain the source code for all those libs and try to compile and fix the millions of errors that will probably appear, I won't be able to use them? Is that a fair statement? Oh o ... Thanks On Jul 16, 4:31 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I managed to compile the imported application (the trick was not to just throw the lib directory in the project but to also build a library out of the jars and present that in the project class path). However, I am noticing in DDMS (and in debug perspective) when I launch the app that one of the threads quits and complains that: Failed resolving Lcom/myApp/PeerToPeerAdapter: interface 211 Lnet/ wlib/PeerGen. I can see the net/lib/PeerGen in the jar files included in the library that is in the classpath. Afterall it compiles fine. Why does it complain at runtime? Doesn't the Android plugin package what it needs in the dex, apk and res_ files before it deploys the app in the emulator? I could not find anything on this in the resources so I am wondering if anyone had this issue before - It could be trivial and I am missing something very obvious. Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Including libraries in project
Hi all, I managed to compile the imported application (the trick was not to just throw the lib directory in the project but to also build a library out of the jars and present that in the project class path). However, I am noticing in DDMS (and in debug perspective) when I launch the app that one of the threads quits and complains that: Failed resolving Lcom/myApp/PeerToPeerAdapter: interface 211 Lnet/ wlib/PeerGen. I can see the net/lib/PeerGen in the jar files included in the library that is in the classpath. Afterall it compiles fine. Why does it complain at runtime? Doesn't the Android plugin package what it needs in the dex, apk and res_ files before it deploys the app in the emulator? I could not find anything on this in the resources so I am wondering if anyone had this issue before - It could be trivial and I am missing something very obvious. Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Including libraries in project
So it is fair to say = Android bytecode != 3rd party code bytecode (particularly from IBM or SUN or Axis)? So the reason I am not seeing the libraries (which otherwise helped me compile my imported app in Eclipse) in the apk file is because they are not recognized by the Android platform? Unless I obtain the source code for all those libs and try to compile and fix the millions of errors that will probably appear, I won't be able to use them? Is that a fair statement? Oh o ... Thanks On Jul 16, 4:31 pm, kypriakos demet...@ece.neu.edu wrote: Hi all, I managed to compile the imported application (the trick was not to just throw the lib directory in the project but to also build a library out of the jars and present that in the project class path). However, I am noticing in DDMS (and in debug perspective) when I launch the app that one of the threads quits and complains that: Failed resolving Lcom/myApp/PeerToPeerAdapter: interface 211 Lnet/ wlib/PeerGen. I can see the net/lib/PeerGen in the jar files included in the library that is in the classpath. Afterall it compiles fine. Why does it complain at runtime? Doesn't the Android plugin package what it needs in the dex, apk and res_ files before it deploys the app in the emulator? I could not find anything on this in the resources so I am wondering if anyone had this issue before - It could be trivial and I am missing something very obvious. Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Emulator
Super - but then if you are already running an app how do you stop it to reload new code? I noticed that if I move to the Menu the app is still running in the background. Is there a kill process equivalent in Android? Thanks On Jul 13, 1:56 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 13, 2010 at 12:44 PM, kypriakos demet...@ece.neu.edu wrote: You can?? That's super - where can I find documentation on that? Or is it straight forward? You just run the app. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Application monitoring
Got it - thanks Mark. I would like to ideally change them to the Log class but they are a bit too many so it will be a long process. On Jul 13, 1:59 pm, Mark Murphy mmur...@commonsware.com wrote: On Tue, Jul 13, 2010 at 1:48 PM, kypriakos demet...@ece.neu.edu wrote: The applications I am importing into Android make use of out.println in many places. That was one of the way we could monitor them at runtime. I don't suppose this would be the case with Android - how would I be able to monitor the execution of these apps here? LogCat, though ideally you would change those to use the android.util.Log class. These apps are primarily background services - they run and wait for input from the user to route the messages through the network. What would the best way to debug them be? You can access LogCat via adb logcat, DDMS, or the DDMS perspective in Eclipse. Or, just Eclipse's debugger. Etc. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 2.2 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] I/O
Is it possible to write and read files on Android? I know it sounds a bit silly to ask this but I found out that writing a file in the same directory as where the app is executing stall my process. Where in the dir hierarch do Android apps execute and if I was to write or read a file do I need to do so in a particular directory? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
I noticed that using the standard Java to create the new file stalls: File UIDfile = new File(/data/local/tmp/myUID.txt); UIDfile.createNewFile(); Is this something that should not be used in Android? Anyone else faced this issue before? Should I convert these to: FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE); fos.write(string.getBytes()); fos.close(); Thanks On Jul 14, 2:26 pm, kypriakos demet...@ece.neu.edu wrote: Is it possible to write and read files on Android? I know it sounds a bit silly to ask this but I found out that writing a file in the same directory as where the app is executing stall my process. Where in the dir hierarch do Android apps execute and if I was to write or read a file do I need to do so in a particular directory? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
That's what I figured - thanks Mark. I think it makes more sense now. Regarding the emulator's storage, if I wanted to manually add a file let's say into the sdcard dir, is this possible (in other words is this a real file system dir or a simulated entity?). Thanks again On Jul 14, 3:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 2:59 PM, kypriakos demet...@ece.neu.edu wrote: I noticed that using the standard Java to create the new file stalls: File UIDfile = new File(/data/local/tmp/myUID.txt); UIDfile.createNewFile(); Is this something that should not be used in Android? You cannot write to arbitrary paths on hardware. Please use getFilesDir() to find a safe spot to write files on the on-board flash for your application, or Environment.getExternalFilesDir() for the root of the external storage (SD card). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
The Environment.getExternalFilesDir() does return /sdcard and although empty it still stalls on writing the file out. What package carries the getFilesDir()? On Jul 14, 3:09 pm, kypriakos demet...@ece.neu.edu wrote: That's what I figured - thanks Mark. I think it makes more sense now. Regarding the emulator's storage, if I wanted to manually add a file let's say into the sdcard dir, is this possible (in other words is this a real file system dir or a simulated entity?). Thanks again On Jul 14, 3:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 2:59 PM, kypriakos demet...@ece.neu.edu wrote: I noticed that using the standard Java to create the new file stalls: File UIDfile = new File(/data/local/tmp/myUID.txt); UIDfile.createNewFile(); Is this something that should not be used in Android? You cannot write to arbitrary paths on hardware. Please use getFilesDir() to find a safe spot to write files on the on-board flash for your application, or Environment.getExternalFilesDir() for the root of the external storage (SD card). -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
Sorry for not being clear from the start Mark - my bad. When the app reaches the createNewFile() method it quits (I thought it was stalling on that method but I was wrong). I think that method is the problem in my case. I did use adb push to copy files to the emulator's filesystem so that answers that question - I could play around with that from my app and see how the file i/o works since I am new to it on the Android. How would I go about creating/finding an SD card image for the emulator? On Jul 14, 3:31 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 3:20 PM, kypriakos demet...@ece.neu.edu wrote: The Environment.getExternalFilesDir() does return /sdcard and although empty it still stalls on writing the file out. I have no idea what stalls means in this context. You need an SD card (or SD card image for the emulator), and you need the WRITE_EXTERNAL_STORAGE permission. What package carries the getFilesDir()? That is a method on Context, and therefore is available to all subclasses of Context, like Activity. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
Normally I don't get into this back and forth QA loop as I know very well how busy most people are and what the real purpose of the mailing lists are, so I apologize for letting it get out of hand. You are right, most likely I should be able to find a lot of these fundamental concepts either on the web site or the books and I did have good luck finding most of them. However, since I am importing a large application from an existing standard java code to Android there are cases that I am not finding whether what exists in standard java is generally accepted under Android and thus the multiple questions. I guess I am learning by brute force in this case. I do know this is a mobile platform and its capabilities and API should be honored, but I am also trying to reuse segments that can work equally well if they are imported unchanged. In any case, your point is well taken so thanks for bringing it up. To clarify my last question, by stalls or quits, I mean that I am watching the app execute in the DDMS console, and although I am catching exceptions around that particular code segment, the execution stops, no exception is thrown and nothing occurs thereafter. I am not sure if the execution of certain methods imported directly from J2SE cause the VM to have issues - I will examine it closer and see what the story is there. I will limit my questions to more substantial issues as they arise. Thanks again. On Jul 14, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 3:42 PM, kypriakos demet...@ece.neu.edu wrote: When the app reaches the createNewFile() method it quits OK, then I have no idea what quits means in this context. I am going to guess you mean it had an unhandled exception. If so, use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace associated with the exception. How would I go about creating/finding an SD card image for the emulator? There's a field for that when you create your AVD in the AVD Manager. --- You are asking an awful lot of questions. In the grand scheme of things, that is what this list is for. But I suspect you will have better luck if you either spend more time with the Android documentation: http://developer.android.com or pick up a book: http://wiki.andmob.org/books Now, I wrote some of those books, but I really don't care what book you get, so long as you get more Android knowledge in bulk form, rather than asking a whole bunch of questions that take time for us to answer. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
One last thing - extending my question from the previous email - may be this is what I should have asked to begin with and left it at that: Since I can compile my complete imported app as an Android project it makes sense that the classes and methods I used in the past (even the System.out that we already spoke off) should be operational under Android. Correct? If not, is there documentation that you may know off that rules against such methods - for example if my problem now is the File.createNewFile() and for some reason does not work well under Android, is that documented somewhere or this should not be the case and pretty much what compiles should work. I hope this makes sense. Again thanks for all the help Mark and apologies for the multiple postings. On Jul 14, 3:51 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 3:42 PM, kypriakos demet...@ece.neu.edu wrote: When the app reaches the createNewFile() method it quits OK, then I have no idea what quits means in this context. I am going to guess you mean it had an unhandled exception. If so, use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine the Java stack trace associated with the exception. How would I go about creating/finding an SD card image for the emulator? There's a field for that when you create your AVD in the AVD Manager. --- You are asking an awful lot of questions. In the grand scheme of things, that is what this list is for. But I suspect you will have better luck if you either spend more time with the Android documentation: http://developer.android.com or pick up a book: http://wiki.andmob.org/books Now, I wrote some of those books, but I really don't care what book you get, so long as you get more Android knowledge in bulk form, rather than asking a whole bunch of questions that take time for us to answer. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: I/O
I know I know - I rudely jumped into asking questions and that is a no no - you want people to help you make your context clear first and the rest will follow (to a certain reasonable extend of course ;) ) ... That's...very strange. Yes it is - but hey, I am sure what I learn from getting to the bottom of this would be something to remember for a while. I've never used createNewFile() in a decade-plus of Java development, so I can't speak specifically on it. If the method exists, there's a 99.9% chance it should work as expected. There are a few no-ops (notably in Thread for stuff that's been deprecated since the Clinton Administration), but the bigger problem tends to be things that are just flat-out missing. For those, you'll get compile errors if you're compiling from scratch, or VerifyErrors if your existing code base is in a JAR you're importing. Ha ha - yes some stuff in there are old. In any case, I appreciate the help Mark, I am finding this list and the Android platform a pleasantly refreshing environment to work in compared to the older devices I have been messing around with. I will post any good-to-know results back to the list once I have them. Demetris -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Emulator
Hi guys --- to put closure to this thread as well - I compile the changes in the Resource perspective in Eclipse, and with the emulator open I re-launch the app either in debug or standard mode and watch it in DDMS. I can see the apk file being loaded in the emulator's file system (I can see the size and it is the new one for sure), however, the changes I made do not show up in the execution panel. Are there cases when I need to shutdown the emulator and restart it? Or would the relaunching of the app ALWAYS guarantees the changes will be executed? Just making sure. Thanks On Jul 14, 2:56 pm, kypriakos demet...@ece.neu.edu wrote: Got it - thanks to both of you. On Jul 14, 2:09 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 14, 2010 at 2:07 PM, kypriakos demet...@ece.neu.edu wrote: Super - but then if you are already running an app how do you stop it to reload new code? The emulator handles that automatically. I noticed that if I move to the Menu the app is still running in the background. Is there a kill process equivalent in Android? It is not needed in most cases. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 Available! -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Re: Emulator
You can?? That's super - where can I find documentation on that? Or is it straight forward? On Jul 12, 3:03 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jul 12, 2010 at 2:59 PM, kypriakos demet...@ece.neu.edu wrote: I am assuming that you cannot perform software reloading on the emulator without restarting it (i.e. OSGi containers). AFAIK, Android does not support OSGi containers. You can reload software on the emulator without restarting it, though. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Application monitoring
The applications I am importing into Android make use of out.println in many places. That was one of the way we could monitor them at runtime. I don't suppose this would be the case with Android - how would I be able to monitor the execution of these apps here? These apps are primarily background services - they run and wait for input from the user to route the messages through the network. What would the best way to debug them be? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Emulator and cellular access
Hi all, I think the Android emulator has the capability to emulate incoming phone calls but I am wondering if there is a capability to place outgoing calls to existing cellular networks through the appropriate hardware interface. Is there any documentation of such a functionality I look into? Thanks -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] Issue?
is this a forum issue? Why are we getting these messages each time we post? Hi. This is the qmail-send program at innophilia.com. I'm afraid I wasn't able to deliver your message to the following addresses. This is a temporary error; I've given up. Sorry it didn't work out. r...@innophilia.com: Sorry, This mailbox is overquota. (#4.4.5) --- Enclosed are the original headers of the message. Subject: [android-beginners] Emulator and cellular access From: kypriakos demet...@ece.neu.edu Date: Wed, 16 Jun 2010 09:46:12 -0700 (PDT) To: Android Beginners android-beginners@googlegroups.com (Body supressed) -- You received this message because you are subscribed to the Google Groups Android Beginners group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
[android-beginners] mailing lists
Hi all, I tried all mailing lists listed in the Android subcription web site and all of them returned back with the error that their email does not exist - I clicked on them and not copy them so there is no typo. Any ideas? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---