[android-developers] How do i launch system clock from broadcast receiver?
I am trying to launch system alarm clock on some broadcast receiver. It always force closes. Any idea? Thanks, SGuru -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to download apk file through android application
On Wed, Jul 28, 2010 at 4:13 PM, saikiran n saikiran@gmail.com wrote: Hi Can we download apk file which is in internet using android application I downloaded the pdf using the following program try { URL url = new URL(imageURL); File file = new File(fileName); long startTime = System.currentTimeMillis(); /* Open a connection to that URL. */ URLConnection ucon = url.openConnection(); InputStream is = ucon.getInputStream(); BufferedInputStream bis = new BufferedInputStream(is); ByteArrayBuffer baf = new ByteArrayBuffer(50); int current = 0; while ((current = bis.read()) != -1) { baf.append((byte) current); } /* Convert the Bytes read to a String. */ FileOutputStream fos = context.openFileOutput(fileName, context.MODE_WORLD_WRITEABLE); fos.write(baf.toByteArray()); fos.close(); } catch (IOException e) { Log.d(ImageManager, Error: + e); } Now i used the same program to download apk but When iam trying to install this apk file it is giving some error as follows EOCD not found, not Zip file 'myfile.apk' is not a valid zip file Any help please -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Manually signing the APK file
After calling ant release, I need to sign the APK. How do APK files get signed? Entire file is signed and the detached signature is appended to the end? Is there a specific protocol on APK (zip) files signature that keytool uses and android understands ? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to execute shell script file from android application
IMHO their is no solution for this. Using setprop requires that the APP is signed with the platform cert. And this is good, because otherwise any app would be able to change any system property. Good luck ! Frank On 28 Jul., 16:43, Oscar oscar...@gmail.com wrote: That's the problem, you don't have root permissions but maybe there is a workaround with java, maybe there is a method that you can use for it. look that, it maybe help youhttp://stackoverflow.com/questions/249916/how-do-i-find-the-dns-serve... On Jul 28, 6:43 am, kiran saikiran@gmail.com wrote: Is your code $SETPROP net.if.default rmnet0* need a root access If so from android application may be we don't have root previliges On Jul 28, 3:39 pm, Suchita Sharma suchi.bhard...@gmail.com wrote: Hi all, I am trying to execute a shell script from application using java.lang.Process API. The script file is executing properly as i am able to get logs but the line *$SETPROP net.if.default rmnet0* * * is not getting executed. has anyone able to execute .sh file from application succesfully. Code Snippet: *//* *str={/system/bin/sh,/sdcard/test.sh};* *Process p = Runtime.getRuntime().exec(str);* * * *//* * * test.sh: LOG=/system/bin/log SETPROP=/system/bin/setprop $LOG -t test++Setting up default iface $SETPROP net.if.default rmnet0 $LOG -t test++Setting done - Zitierten Text ausblenden - - Zitierten Text anzeigen - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: My experience with LVL and the precedence it sets
I believe I'm using the default eclipse compiler warning settings and I got a bunch of unused import/instance variable warnings in my workspace when adding the LVL project. Furthermore, all the warnings were doubled up - once for the library project at the top level and once for the library project as a child node of my own project. Since changing the project warning settings was not an option, I solved this by adding @SuppressWarnings annotation at the class level of a couple of the LVL classes. But this is far from ideal as it requires modifying the code (which I will later want to update as new versions are released). Another problem was that when I changed the LVL code (saving the changes), my main project required a Clean before it picked up the changes. It would be nice if library project changes triggered clean to all downstream projects (I think this is how things normally work). This problem might have been caused by me editing files in the top level LVL project rather than the child LVL node. Again (mentioned last month in another thread), this is a problem where the same class can appear twice in the workspace (once for the top level, once for the child level). The easiest solution to this would be to NOT make the LVL child node browsable. So forcing the dev to do everything through the top level project. Also trigger the Cleans accordingly. One final point about the LVL code I wanted to subclass ServerManagerPolicy but had to make a bunch of instance fields protected to do so. Would be great if they were already protected. Also, ResponseData is package private. This prevents devs from implementing their own Policy in their own package. Since I wanted to make only minimal changes the the LVL project, I just included my Policy class in a com.android.vending.licensing package within my main project instead. Still, would prefer to use my own package though... On Jul 29, 3:00 am, Zsolt Vasvari zvasv...@gmail.com wrote: Thanks for your answer, Xavier. $NON-NLS is something specific to Eclipse that we do not use in Android. Our convention for the android source code do not enforce the use of this qualifier. As for importing java.lang.String, those 2 files have been created automatically by aidl (see the files in aidl/) and the tool doesn't care about unneeded imports and automatically put import statements for all the used classes. Ok, fair comment about the java.lang.String import. That said, since you are recommending to use Eclipse as the development environment, I think it would be benefitial for everybody if a few minutes taken before release to make sure it compiles with any possible settings the user may have in their Eclipse project. If that means cleaning up the generated code, I believe that should be undertaken. Otherwise you will end up with aggrevated users. Do you honestly expect the user having to modify their project warning levels to be able to successfully integrate LVL? Perhaphs the answer is yes, but then it should be documented and spelt out how warning levels need to be set for the project. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] logcat is failing
I would like to have a simplified form of aLogcat. So, I am trying to use the logic in http://code.google.com/p/android-random/source/browse/trunk/Logcat/src/org/devtcg/tools/logcat/LogcatProcessor.java. however, when I run the same command: logcatProc = Runtime.getRuntime().exec( new String[] { logcat, -v, time, *:V }); The inputStreamReader always gets 0 lines.There are no errors logged. app uses_permission ReadLogs is specified in the manifest. Why do I get 0 lines all the time? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How do i launch system clock from broadcast receiver?
On Jul 29, 7:28 am, scadaguru scadag...@gmail.com wrote: I am trying to launch system alarm clock on some broadcast receiver. It always force closes. What's the error causing it to close? String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Invoke services based on my permission.
Thanksworking as expected :) ./bhavya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Accessing @hide methods in the Android source code
Is there any way we can access methods annotated with a @hide without changing the Android source code? Can we use reflection to do that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Accessing @hide methods in the Android source code
On Thu, Jul 29, 2010 at 4:01 AM, Kwisatz rui.mtd.ro...@gmail.com wrote: Is there any way we can access methods annotated with a @hide without changing the Android source code? Please do not do this. Anything that is not part of the SDK is subject to change. http://www.androidguys.com/2009/12/14/code-pollution-reaching-past-the-sdk/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Refreshing the option menu items
Dear All, I have created an option menu which also has a sub menu. In the sub menu I have a setting for enabling/disabling images in my application based on the application level flag that i change based on the option being clicked. What I am observing is that when i click on the Menu and change the settings from enable Images to disable Images. its not reflecting. I have put the debug log and what have been seen is the onOptionCreateMenu method is getting called only one time- first time when i click the Menu button. That is the reason the changed sub menu is not getting reflected. My question is that is there a way i can re-create the option menu every time user presses the Menu Button. Thanks in advance. Best Regards Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problems with orientationchange
Hello, I have a tabactivity where my app is running in. One of the tabs needs to have landscape orientation, assume this is activity2, activity1 needs to have portrait-orientation. In activity1 I do have code like: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } And in activity2: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } So when I now want to change from activity1 to activity2. It seems as my app is in a infinite-loop, it tries to start activity2 again and again, but it doesnt appear. I dont get an exception either! Is that some know bug of android or am I doing something wrong. Help a appreciated a lot. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Refreshing the option menu items
Use onPrepareOptionMenu(). On Thu, Jul 29, 2010 at 4:23 AM, Amit amitmishr...@gmail.com wrote: Dear All, I have created an option menu which also has a sub menu. In the sub menu I have a setting for enabling/disabling images in my application based on the application level flag that i change based on the option being clicked. What I am observing is that when i click on the Menu and change the settings from enable Images to disable Images. its not reflecting. I have put the debug log and what have been seen is the onOptionCreateMenu method is getting called only one time- first time when i click the Menu button. That is the reason the changed sub menu is not getting reflected. My question is that is there a way i can re-create the option menu every time user presses the Menu Button. Thanks in advance. Best Regards Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: VideoView and SlidingDrawer problem
Hi, Seems like z order issue. Try this: 1. Add these imports to the Activity: import android.widget.SlidingDrawer; import android.widget.SlidingDrawer.OnDrawerCloseListener; 2. Add a class member variable in the Activity for the SlidingDrawer private SlidingDrawer mSlidingDrawer; 3. In OnCreate of the Activity, initialize the member variable. Also, set the OnDrawerCloseListener @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //. //your other codes this.mSlidingDrawer = (SlidingDrawer)findViewById(R.id.drawer); this.mSlidingDrawer.setOnDrawerCloseListener(this); } 4. Implement OnDrawerCloseListener in the Activity. In the onDrawerClose method, change the z order (bring the drawer to the front) public class MyActivity extends Activity implements OnDrawerCloseListener { //other codes. @Override public void onDrawerClosed() { this.mSlidingDrawer.bringToFront(); } } Hope this helps. Please let me know the result. Regards Sarwar Erfan On Jul 29, 7:17 am, kivy victoriasarabu...@gmail.com wrote: Hi there, I have a bit of a problem with a SlidingDrawer that I created and that should go over my VideoView. When the activity is opened for the first time you can see the slider above the video and when you tap it, it slides open. However, as soon as you close the slider it seems to disappear underneath the VideoView and is not visible anymore. It is still there and when you tap the location where the handle is located the slidingDrawer reappears, but I would rather prefer if it wasn't hiding all the time ;) If anyone knows what I can do about that and help me out, that would be really fantastic because I have been trying for hours now and I have no idea what I should do. I also haven't found a similar issue or a solution for that. Thank you in advance. This here is the xml code for the videoview and the slidingDrawer: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@drawable/shape_background_gradient VideoView android:layout_width=240px android:layout_height=180px android:id =@+id/VideoViewEdit android:layout_centerHorizontal=true /VideoView ScrollView android:layout_width=fill_parent android:layout_height=wrap_content android:layout_below=@id/VideoViewEdit TableLayout android:layout_width=fill_parent android:layout_height=fill_parent android:stretchColumns=0 TableRow android:background=@drawable/shape_track_background android:padding=5px ImageView android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/ic_editor_videotrack android:padding=5px android:layout_gravity=left/ /TableRow TableRow android:background=@drawable/shape_track_background android:padding=5px ImageView android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/ic_editor_audiotrack android:padding=5px android:layout_gravity=left/ /TableRow TableRow android:background=@drawable/shape_track_background android:padding=5px
Re: [android-developers] API 1.5 to API 2.1
Muhammad, I have a step by step guide here: http://kmansoft.wordpress.com/2010/05/05/supporting-devices-multires/ -- Kostya 29.07.2010 1:28, { Devdroid } пишет: On 28 July 2010 09:33, Muhammad Alizaandr...@gmail.com wrote: Hi All, I am working on an application which targets the 1.5 to 2.2 sets, my problem is that I am using different resolution images with drawables-* folders and it is not supported by the API 1.5, suggest me what should I do? Read the manual on developer.android.com - it discuss that case. -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problems with orientationchange
Hi, Good day. Change the orientation (call setRequestedOrientation) inside overridden method of onStart, NOT inside onCreate. (do it in both Activity1 and Activity2) Regards Sarwar Erfan On Jul 29, 2:25 pm, Robert sebastianar...@hotmail.com wrote: Hello, I have a tabactivity where my app is running in. One of the tabs needs to have landscape orientation, assume this is activity2, activity1 needs to have portrait-orientation. In activity1 I do have code like: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } And in activity2: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } So when I now want to change from activity1 to activity2. It seems as my app is in a infinite-loop, it tries to start activity2 again and again, but it doesnt appear. I dont get an exception either! Is that some know bug of android or am I doing something wrong. Help a appreciated a lot. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] read contacts from the phone into our application
Hi, I got one problem when I try to read the contacts on Android phone. If I don't sync my local contacts (local being the contacts stored on my phone) with my gmail contacts, I cannot read any contact from local contacts. However, if I sync my my local contacts with my gmail account, I can read all the contacts. Anyone know how to fix the problem. How to read my local contacts without sync Thanks a lot. Ryan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Refreshing the option menu items
Thanks Mark, I have changed now to onPrepareOptionMenu and also deleting the whole menu group...Its working for me now. Thanks On Jul 29, 1:26 pm, Mark Murphy mmur...@commonsware.com wrote: Use onPrepareOptionMenu(). On Thu, Jul 29, 2010 at 4:23 AM, Amit amitmishr...@gmail.com wrote: Dear All, I have created an option menu which also has a sub menu. In the sub menu I have a setting for enabling/disabling images in my application based on the application level flag that i change based on the option being clicked. What I am observing is that when i click on the Menu and change the settings from enable Images to disable Images. its not reflecting. I have put the debug log and what have been seen is the onOptionCreateMenu method is getting called only one time- first time when i click the Menu button. That is the reason the changed sub menu is not getting reflected. My question is that is there a way i can re-create the option menu every time user presses the Menu Button. Thanks in advance. Best Regards Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problems with orientationchange
Thanks Sarwar for your answer. But when I put this code into the onStart method. The orientation will always be Portrait. When I discard the if-part, I am getting the same problem as mentioned above. I realized now that, when the app enters the onStart the orientation is initally -1(thats why I get the portrait-orientation with the if-part). When the setrequestedorientation is called the orientation is 0 (LANDSCAPE), as I requested. And then it is in this infinite loop and when its now entering the onstart the requestedorientation is 1 (PORTRAIT). Which is really weird to me. Should I do anything in the TabActivity!? Any suggestions are very welcome. Thanks On Jul 29, 10:46 am, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, Good day. Change the orientation (call setRequestedOrientation) inside overridden method of onStart, NOT inside onCreate. (do it in both Activity1 and Activity2) Regards Sarwar Erfan On Jul 29, 2:25 pm, Robert sebastianar...@hotmail.com wrote: Hello, I have a tabactivity where my app is running in. One of the tabs needs to have landscape orientation, assume this is activity2, activity1 needs to have portrait-orientation. In activity1 I do have code like: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } And in activity2: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } So when I now want to change from activity1 to activity2. It seems as my app is in a infinite-loop, it tries to start activity2 again and again, but it doesnt appear. I dont get an exception either! Is that some know bug of android or am I doing something wrong. Help a appreciated a lot. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] One Instrumentation Tests Two Activities In Two Processes?
Does anyone have an idea how to do this? Thanks, -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problems with orientationchange
Hi, The problem is, each time orientation is changed, Activity is destroyed and recreated (that means onCreate is called, later onStart is called). Now, when you change orientation inside onCreate, then orientation is changed, activity is recreated again --- this causes to onCreate to be called again (and again and again ) onCreate is even called before the Activity is shown on the screen. I can think of one way around. Get rid of all orientation changing codes form onCreate and onStart. Then, before starting an activity, change orientation (if required) according to the requirement of the activity to be started. For example: suppose you need LANDSCAPE for Activity2, then (see how the condition of if changed) //--- if(this.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } //Start Activity2 here //--- If you dont want to do as I told above, you need to prevent your activities from being destroyed and recreated when orientation is changed. Fortunately, that is possible. Go to this link: http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges Quote from the page: [QUOTE] In some special cases, you may want to bypass restarting of your activity based on one or more types of configuration changes. This is done with the android:configChanges attribute in its manifest. For any types of configuration changes you say that you handle there, you will receive a call to your current activity's onConfigurationChanged(Configuration) method instead of being restarted. If a configuration change involves any that you do not handle, however, the activity will still be restarted and onConfigurationChanged(Configuration) will not be called. [/QUOTE] Regards Sarwar Erfan On Jul 29, 3:21 pm, Robert sebastianar...@hotmail.com wrote: Thanks Sarwar for your answer. But when I put this code into the onStart method. The orientation will always be Portrait. When I discard the if-part, I am getting the same problem as mentioned above. I realized now that, when the app enters the onStart the orientation is initally -1(thats why I get the portrait-orientation with the if-part). When the setrequestedorientation is called the orientation is 0 (LANDSCAPE), as I requested. And then it is in this infinite loop and when its now entering the onstart the requestedorientation is 1 (PORTRAIT). Which is really weird to me. Should I do anything in the TabActivity!? Any suggestions are very welcome. Thanks On Jul 29, 10:46 am, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, Good day. Change the orientation (call setRequestedOrientation) inside overridden method of onStart, NOT inside onCreate. (do it in both Activity1 and Activity2) Regards Sarwar Erfan On Jul 29, 2:25 pm, Robert sebastianar...@hotmail.com wrote: Hello, I have a tabactivity where my app is running in. One of the tabs needs to have landscape orientation, assume this is activity2, activity1 needs to have portrait-orientation. In activity1 I do have code like: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } And in activity2: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } So when I now want to change from activity1 to activity2. It seems as my app is in a infinite-loop, it tries to start activity2 again and again, but it doesnt appear. I dont get an exception either! Is that some know bug of android or am I doing something wrong. Help a appreciated a lot. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] No plan to support Netbeans?
As title, I'm developing on every Java flavour, from JavaME to BB to Symbian Java to JavaSE to JavaEE etc... I know that Android isn't Java but I will like to develop to android using Netbeans... Is there some hope to see android plugin for netbeans officially mainteined by google? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Accessing @hide methods in the Android source code
Hello Mark. Nice to hear from you. I understand your point. In my particular case, it's almost a desperation move. We invested a lot in our project and at the final stage, we discovered a bug in the Android SDK: http://code.google.com/p/android/issues/detail?id=5988 In comment 12 of that thread, a guy from Google itself suggests that we must implement our own contacts editor. So, the easy and fastest way of doing that is to replicate the Android Contacts application, since it's open source and all. BUT, there are some calls to the hidden methods in the SDK from the Contacts app. I want to replicate them. Not use those methods to some other functionality. I think it's acceptable somehow... no? As I said... we're desperate! :) On Jul 29, 9:04 am, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 29, 2010 at 4:01 AM, Kwisatz rui.mtd.ro...@gmail.com wrote: Is there any way we can access methods annotated with a @hide without changing the Android source code? Please do not do this. Anything that is not part of the SDK is subject to change. http://www.androidguys.com/2009/12/14/code-pollution-reaching-past-th... -- 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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No plan to support Netbeans?
As Alexander Pope so eloquently put it Hope springs eternal... There's always hope, but little chance that anyone official will tell you what may happen in the future. Google usually tells us things just as they happen, not when they might, or when. In the meantime, you might search Google for unofficial support. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] No plan to support Netbeans?
On 29 July 2010 12:34, sblantipodi perini.dav...@dpsoftware.org wrote: I know that Android isn't Java You know, you say? What about checking specs first: http://developer.android.com/guide/basics/what-is-android.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Accessing @hide methods in the Android source code
On Thu, Jul 29, 2010 at 6:35 AM, Kwisatz rui.mtd.ro...@gmail.com wrote: In comment 12 of that thread, a guy from Google itself suggests that we must implement our own contacts editor. So, the easy and fastest way of doing that is to replicate the Android Contacts application, since it's open source and all. I'm skeptical that it is fastest or easiest, when you take long-term maintenance into account. BUT, there are some calls to the hidden methods in the SDK from the Contacts app. I want to replicate them. Not use those methods to some other functionality. I think it's acceptable somehow... no? :: shrug :: That depends on your definition of acceptable. For example, I don't find it acceptable when developers whine wait, we did something people told us not to do, and now it's broken -- Google sux! To answer your original question: yes, reflection works. @hide is used when creating the android.jar you get in the SDK, and so reflection is your way past that, at least within the bounds of normal Java rules regarding reflection. That being said, using reflection to break the SDK contract because you don't want to write a GUI is penny wise, pound foolish IMHO. But, it's your app. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Long press on Home key event
Hi, Is there any way to get the long press on home key event ?? Nithin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Long press on Home key event
On Thu, Jul 29, 2010 at 6:58 AM, Nithin nithin.war...@gmail.com wrote: Is there any way to get the long press on home key event ?? No, sorry. All HOME key events are internal to the OS. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] android 2.2 open swf in browser
You have to use WebSettings to activate the plugins for a WebView. WebSettings settings = webView.getSettings(); settings.setPluginState(PluginState.ON); On Mon, Jul 5, 2010 at 9:15 PM, timeToEat chen.yz2...@gmail.com wrote: I have a swf file on the sdcard and I wrote a html file flash.html with the swf file embeded. The only way to open it now is 1) open the browser 2) type in file:///sdcard/flash.html The swf runs fine. But if use the code list below: Uri uri = Uri.parse(file:///sdcard/flash.html); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); It shows the error: The application has stopped unexpectly. I also tried the following code using WebView: WebView browser = (WebView) findViewById(R.id.list_web); browser.loadUrl(file:///sdcard/flash.html); The Webview showed up, but the area should start the swf is empty. So is there a way to open the html through code? I also think if there is a way to open the android browser using ACTION_VIEW by a simple html then reset the URL to be file:///sdcard/ flash.html through code? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problems with orientationchange
Hi, I have tested the proposed code and it works. I have mentioned details here: http://erfanonline.blogspot.com/2010/07/android-use-different-orientation-for.html You can download sample source from there also. Regards Sarwar Erfan On Jul 29, 4:01 pm, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, The problem is, each time orientation is changed, Activity is destroyed and recreated (that means onCreate is called, later onStart is called). Now, when you change orientation inside onCreate, then orientation is changed, activity is recreated again --- this causes to onCreate to be called again (and again and again ) onCreate is even called before the Activity is shown on the screen. I can think of one way around. Get rid of all orientation changing codes form onCreate and onStart. Then, before starting an activity, change orientation (if required) according to the requirement of the activity to be started. For example: suppose you need LANDSCAPE for Activity2, then (see how the condition of if changed) //--- if(this.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);} //Start Activity2 here //--- If you dont want to do as I told above, you need to prevent your activities from being destroyed and recreated when orientation is changed. Fortunately, that is possible. Go to this link:http://developer.android.com/reference/android/app/Activity.html#Conf... Quote from the page: [QUOTE] In some special cases, you may want to bypass restarting of your activity based on one or more types of configuration changes. This is done with the android:configChanges attribute in its manifest. For any types of configuration changes you say that you handle there, you will receive a call to your current activity's onConfigurationChanged(Configuration) method instead of being restarted. If a configuration change involves any that you do not handle, however, the activity will still be restarted and onConfigurationChanged(Configuration) will not be called. [/QUOTE] Regards Sarwar Erfan On Jul 29, 3:21 pm, Robert sebastianar...@hotmail.com wrote: Thanks Sarwar for your answer. But when I put this code into the onStart method. The orientation will always be Portrait. When I discard the if-part, I am getting the same problem as mentioned above. I realized now that, when the app enters the onStart the orientation is initally -1(thats why I get the portrait-orientation with the if-part). When the setrequestedorientation is called the orientation is 0 (LANDSCAPE), as I requested. And then it is in this infinite loop and when its now entering the onstart the requestedorientation is 1 (PORTRAIT). Which is really weird to me. Should I do anything in the TabActivity!? Any suggestions are very welcome. Thanks On Jul 29, 10:46 am, Sarwar Erfan erfanonl...@gmail.com wrote: Hi, Good day. Change the orientation (call setRequestedOrientation) inside overridden method of onStart, NOT inside onCreate. (do it in both Activity1 and Activity2) Regards Sarwar Erfan On Jul 29, 2:25 pm, Robert sebastianar...@hotmail.com wrote: Hello, I have a tabactivity where my app is running in. One of the tabs needs to have landscape orientation, assume this is activity2, activity1 needs to have portrait-orientation. In activity1 I do have code like: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } And in activity2: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(this.getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } So when I now want to change from activity1 to activity2. It seems as my app is in a infinite-loop, it tries to start activity2 again and again, but it doesnt appear. I dont get an exception either! Is that some know bug of android or am I doing something wrong. Help a appreciated a lot. Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Receiving System Intents with Custom Broadcast Receiver
1) Is INPUT_METHOD_CHANGED the correct intent to receive on to determine if the user is attempting to use the keyboard, and if not, what would be the proper method to use to monitor to see if the user opens up the keyboard, and == onConfigurationChanged(Configuration conf) could give you the event about user open the hard keyboard ex. conf.hardKeyboardHidden On 7月17日, 上午3時37分, Evan Cummings emcummi...@gmail.com wrote: Hello All, I am attempting to listen for system fired Intents, specifically regarding text input, using a class extending BroadcastReceiver. I see there is an Intent called ACTION_INPUT_METHOD_CHANGED (android.intent.action.INPUT_METHOD_CHANGED) which I hope to be able to use to know when the keyboard or text input is attempted by the user. (I assume this intent will work as I can use an InputMethodManager object to handle keyboard related tasks) My java code: package com.BroadcastReception; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class InputMethodChangedReceiver extends BroadcastReceiver { @Override public void onReceive(Context arg0, Intent arg1) { // TODO Auto-generated method stub if (arg1.getAction().equals(android.intent.action.INPUT_METHOD_CHANGED)) { Log.d(this.toString(), Event Fired); } } } My Manifest: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.BroadcastReception android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name receiver android:name=.InputMethodChangedReceiver android:enabled=true intent-filter action android:name=android.intent.action.INPUT_METHOD_CHANGED/ action /intent-filter /receiver /application uses-permission android:name=android.permission.READ_INPUT_STATE/ uses-permission /manifest Using DDMS I never see my logs written, indicating to me that my broadcast receiver is not functioning properly. My question is this: 1) Is INPUT_METHOD_CHANGED the correct intent to receive on to determine if the user is attempting to use the keyboard, and if not, what would be the proper method to use to monitor to see if the user opens up the keyboard, and 2) Am I doing something incorrect in listening for the event, permissions, filters, etc? It would seem to me based on the resources I've looked at it that I'm along the right track, but I must be missing something! I appreciate the help and responses -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Create new process
In order to keep some native code happy, I need to launch an activity in a new process. Does anyone know how to do this? I can set the activity's process attribute in the manifest, but this will cause *all* instances of the activity to appear in the *same* process, which I can't have. I'm willing to use internal APIs for this, and I've found Process.start(), but it's not at all clear how this is supposed to be used. Can anyone shed light on this? -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL signature.asc Description: OpenPGP digital signature
[android-developers] A problem in Tabbar implementation ?
Hi All, I am having a problem in tabbar. As per what I know when i use TabHost each activity is associated with a particular tab i.e. we have a separate activity for showing view of each tab which is fine with me but what i want to know is what if one of my activity on a particular tab decides to launch another activity in that case my tabbar will not be shown rt ? But i want my tabbar and current tab to be shown irrespective of how deep the user is in a particular tab of tabbar. How can I do this ? Please help me with this. Thanks and Regards, Sagar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: i can't send email in UncaughtExceptionHandler for Service
thank you for your reply I added try/catch code but I got no exception and it still doesn't send a email ;( try { _context.startActivity(i); Log.d(LOG_TAG, startActivity() called); } catch (Exception e) { e.printStackTrace(); } below is my logcat log WARN/dalvikvm(582): threadid=3: thread exiting with uncaught exception (group=0x4001b188) DEBUG/ErrorReporter(582): uncaughtException() tThread[main,5,main], except:java.lang.RuntimeException: Unable to create service com.my.service: java.lang.NullPointerException INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.CHOOSER flg=0x1000 cmp=android/ com.android.internal.app.ChooserActivity (has extras) } DEBUG/ErrorReporter(582): startActivity() called ERROR/AndroidRuntime(582): Uncaught handler: thread main exiting due to uncaught exception ERROR/AndroidRuntime(582): java.lang.RuntimeException: Unable to create service com.my.service: java.lang.NullPointerException ERROR/AndroidRuntime(582): at android.app.ActivityThread.handleCreateService(ActivityThread.java: 2790) ERROR/AndroidRuntime(582): at android.app.ActivityThread.access $3200(ActivityThread.java:119) ERROR/AndroidRuntime(582): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1917) ERROR/AndroidRuntime(582): at android.os.Handler.dispatchMessage(Handler.java:99) ERROR/AndroidRuntime(582): at android.os.Looper.loop(Looper.java: 123) ERROR/AndroidRuntime(582): at android.app.ActivityThread.main(ActivityThread.java:4363) ERROR/AndroidRuntime(582): at java.lang.reflect.Method.invokeNative(Native Method) ERROR/AndroidRuntime(582): at java.lang.reflect.Method.invoke(Method.java:521) ERROR/AndroidRuntime(582): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) ERROR/AndroidRuntime(582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) ERROR/AndroidRuntime(582): at dalvik.system.NativeStart.main(Native Method) ERROR/AndroidRuntime(582): Caused by: java.lang.NullPointerException ERROR/AndroidRuntime(582): at com.my.service.onCreate(ISPService.java:230) ERROR/AndroidRuntime(582): at android.app.ActivityThread.handleCreateService(ActivityThread.java: 2780) ERROR/AndroidRuntime(582): ... 10 more INFO/Process(53): Sending signal. PID: 582 SIG: 3 INFO/dalvikvm(582): threadid=7: reacting to signal 3 INFO/dalvikvm(582): Wrote stack trace to '/data/anr/traces.txt' I can't know why. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Create new process
On Thu, Jul 29, 2010 at 7:23 AM, David Given d...@cowlark.com wrote: In order to keep some native code happy, I need to launch an activity in a new process. Does anyone know how to do this? I can set the activity's process attribute in the manifest, but this will cause *all* instances of the activity to appear in the *same* process, which I can't have. You're saying you want to use *several processes* for one app? Not one, not two, but many? In that case, fix the native code. You will run out of RAM. You're not even supposed to use two processes for most apps, let alone more than that. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Long press on Home key event
Thanks Mark.. On Jul 29, 4:00 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 29, 2010 at 6:58 AM, Nithin nithin.war...@gmail.com wrote: Is there any way to get the long press on home key event ?? No, sorry. All HOME key events are internal to the OS. -- 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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is it possible to have a single ui element instance across the application?
Hi All, I have created a custom component and i want it to be singleton in my application and i want all actvities my application to have this custom component which is singleton. how can i achieve this? Please help me in this regard Thanks and Regards, Sagar -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: i can't send email in UncaughtExceptionHandler for Service
Here's your error: java.lang.NullPointerException at com.my.service.onCreate(ISPService.java line:230) Take a look at line 230 of ISPService.java and try and see what could possibly be null. On Jul 29, 12:45 pm, codefish 92soc...@gmail.com wrote: thank you for your reply I added try/catch code but I got no exception and it still doesn't send a email ;( try { _context.startActivity(i); Log.d(LOG_TAG, startActivity() called); } catch (Exception e) { e.printStackTrace(); } below is my logcat log WARN/dalvikvm(582): threadid=3: thread exiting with uncaught exception (group=0x4001b188) DEBUG/ErrorReporter(582): uncaughtException() tThread[main,5,main], except:java.lang.RuntimeException: Unable to create service com.my.service: java.lang.NullPointerException INFO/ActivityManager(53): Starting activity: Intent { act=android.intent.action.CHOOSER flg=0x1000 cmp=android/ com.android.internal.app.ChooserActivity (has extras) } DEBUG/ErrorReporter(582): startActivity() called ERROR/AndroidRuntime(582): Uncaught handler: thread main exiting due to uncaught exception ERROR/AndroidRuntime(582): java.lang.RuntimeException: Unable to create service com.my.service: java.lang.NullPointerException ERROR/AndroidRuntime(582): at android.app.ActivityThread.handleCreateService(ActivityThread.java: 2790) ERROR/AndroidRuntime(582): at android.app.ActivityThread.access $3200(ActivityThread.java:119) ERROR/AndroidRuntime(582): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1917) ERROR/AndroidRuntime(582): at android.os.Handler.dispatchMessage(Handler.java:99) ERROR/AndroidRuntime(582): at android.os.Looper.loop(Looper.java: 123) ERROR/AndroidRuntime(582): at android.app.ActivityThread.main(ActivityThread.java:4363) ERROR/AndroidRuntime(582): at java.lang.reflect.Method.invokeNative(Native Method) ERROR/AndroidRuntime(582): at java.lang.reflect.Method.invoke(Method.java:521) ERROR/AndroidRuntime(582): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) ERROR/AndroidRuntime(582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) ERROR/AndroidRuntime(582): at dalvik.system.NativeStart.main(Native Method) ERROR/AndroidRuntime(582): Caused by: java.lang.NullPointerException ERROR/AndroidRuntime(582): at com.my.service.onCreate(ISPService.java:230) ERROR/AndroidRuntime(582): at android.app.ActivityThread.handleCreateService(ActivityThread.java: 2780) ERROR/AndroidRuntime(582): ... 10 more INFO/Process(53): Sending signal. PID: 582 SIG: 3 INFO/dalvikvm(582): threadid=7: reacting to signal 3 INFO/dalvikvm(582): Wrote stack trace to '/data/anr/traces.txt' I can't know why. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it possible to have a single ui element instance across the application?
On Thu, Jul 29, 2010 at 8:05 AM, sagare sagar.ekb...@gmail.com wrote: I have created a custom component and i want it to be singleton in my application and i want all actvities my application to have this custom component which is singleton. how can i achieve this? Please do not do this. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Jar in Jar
If you put the inner jar in the outer jar, every time you have to access the inner jar you'll first have to extract it. Not cheap. Not simple. On Jul 29, 12:33 am, zohar lerman lirazo...@gmail.com wrote: I dont need to access members of the inner jar from outsize just from my code that in the outer jar. Is it possible or extracting is the only solution? On Jul 28, 7:06 pm, DanH danhi...@ieee.org wrote: You can add a jar to a jar. You just can't (easily) access members in the inner jar without extracting it first. On Jul 28, 9:12 am, zohar lerman lirazo...@gmail.com wrote: Hi, I am creating new Android widget for other users to use. I created JAR file from my project and it is working as expected when other users and this jar to their project. I am trying to enrich the widget and for that i am using other jar. So my JAR include another jar, and only my code can access to that jar. The problem is where user use my jar and it reach to the line where i call to the other jar it crash with verifyError exception (on SDK 1.5 ) and NoClassDefFoundErro (on SDK 2.1) My jar manifest file includes: Class-Path: lib/otherJar.jar any idea? Is it possible to add jar into jar? thanks -Z -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] R.java file of my project is deleted.......how to get it back
hey R.java has deleted autometically...how to get it back -- A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Application is not licensed...
This board doesn't let me answer you. On Jul 29, 1:45 am, Trevor Johns trevorjo...@google.com wrote: It doesn't need to be published, but it does need to be uploaded to Android Market. (It can be in the unpublished or draft state.) This is because Android Market needs a way to look up the RSA key for the application, as well as the list of authorized testers. (Technical note: We return ERROR_NOT_MARKET_MANAGED if we don't recognize the package name. If you really wanted, you could write a custom policy that treated this as a LICENSED response for testing purposes.) -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com On Wed, Jul 28, 2010 at 3:43 PM, sblantipodi perini.dav...@dpsoftware.orgwrote: Do you know if the application must be published to try LVL on the emulator? My application is saved, but never published. On Jul 29, 12:01 am, Trevor Johns trevorjo...@google.com wrote: Check the logcat output, there should be some hints in there to tell you why the license check is failing. -- Trevor Johns On Wed, Jul 28, 2010 at 10:27 AM, sblantipodi perini.dav...@dpsoftware.orgwrote: Hi all, I'm trying the code sample bundled with LVL library... I builted that code into my software changing the public key with the one taken from my developer console. Now when the MainActivity start, code without modification from the initial sample, it tell me that the application is not licensed also if I setted the test response to licensed in my profile settings from developer console... Any idea? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Application is not licensed...
W/ResourceType( 57): No package identifier when getting value for resource number 0x7f060001 I/ActivityManager( 57): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCH ER] flg=0x1020 cmp=packageName/.AndroidMarket } I/ActivityManager( 57): Start proc packageNamefor activity packageName/.AndroidMarket: pid=658 uid=10023 gids={3003} I/jdwp( 658): received file descriptor 20 from ADB D/ddm-heap( 658): Got feature list request I/LicenseChecker( 658): Binding to licensing service. W/ActivityManager( 57): Unable to start service Intent { act=com.android.vending.licensing.ILicensingService }: not fo und E/LicenseChecker( 658): Could not bind to service. D/( 658): unable to unlink '/data/data/packageName/ shared_prefs/com.android.vendi ng.licensing.ServerManagedPolicy.xml.bak': No such file or directory (errno=2) On Jul 29, 1:45 am, Trevor Johns trevorjo...@google.com wrote: It doesn't need to be published, but it does need to be uploaded to Android Market. (It can be in the unpublished or draft state.) This is because Android Market needs a way to look up the RSA key for the application, as well as the list of authorized testers. (Technical note: We return ERROR_NOT_MARKET_MANAGED if we don't recognize the package name. If you really wanted, you could write a custom policy that treated this as a LICENSED response for testing purposes.) -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com On Wed, Jul 28, 2010 at 3:43 PM, sblantipodi perini.dav...@dpsoftware.orgwrote: Do you know if the application must be published to try LVL on the emulator? My application is saved, but never published. On Jul 29, 12:01 am, Trevor Johns trevorjo...@google.com wrote: Check the logcat output, there should be some hints in there to tell you why the license check is failing. -- Trevor Johns On Wed, Jul 28, 2010 at 10:27 AM, sblantipodi perini.dav...@dpsoftware.orgwrote: Hi all, I'm trying the code sample bundled with LVL library... I builted that code into my software changing the public key with the one taken from my developer console. Now when the MainActivity start, code without modification from the initial sample, it tell me that the application is not licensed also if I setted the test response to licensed in my profile settings from developer console... Any idea? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: No plan to support Netbeans?
I'm using NetBeans at work daily for more than three years (creating swing based applications) and I adapted to Eclipse really quickly by mapping 10 most useful keyboard shortcuts in Eclipse. Rest of the IDE functionality seems very similar to me. I think it is useless to support more than one IDE as time spend on redundant work can be invested better to improvements of Eclipse IDE. Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Create new process
On 29/07/10 12:37, Mark Murphy wrote: [...] You're saying you want to use *several processes* for one app? Not one, not two, but many? That is correct. It's an environment for running alien applications; each application goes in a process, but they're all instances of the same activity. Believe me, using multiple processes is the correct solution in this case. Does anyone know how to do this? -- ┌─── dg@cowlark.com ─ http://www.cowlark.com ─ │ │ life←{ ↑1 ⍵∨.^3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ } │ --- Conway's Game Of Life, in one line of APL signature.asc Description: OpenPGP digital signature
[android-developers] How to use internet in htc mobile if net is in my pc
Hi, Can i use internet in my htc mobile by connection to my pc if net is available in my pc. I can do reverse by option of Internet sharing. Thanks, Sohan Badaya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] IOException on geocoder.getFromLocationName
Hello, I am trying to get the geo codes for an address. I am using: Geocoder geocoder = new Geocoder(GeoNoteEditor.this, Locale .getDefault()); ListAddress addressList = null; addressList = geocoder.getFromLocationName(addressString, 1); The problem is that I am getting an IOException sometimes when I call getFromLocationName for the same addressString. This does not happen all the time. When I get the IOException, if I repeat the getFromLocation call, sometimes it works sometimes I get the IOException again. How do I prevent the IOException from happening? Thanks, Prasanna -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] R.java file of my project is deleted.......how to get it back
On Thu, Jul 29, 2010 at 4:19 PM, A N K ! T ankit.awasth...@gmail.com wrote: hey R.java has deleted autometically...how to get it back -- A N K ! T.. Clean the project. Menu [Project] - [Clean...] - Select you project - [OK] Project will rebuild automatically, if not, chek Menu [Project] -[Build Automatically] --- Best Regards Alexey -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] R.java file of my project is deleted.......how to get it back
R.java is generated automagically, you don't need to create or update it, the sdk will do that for you. If you're using eclipse just refresh your imports ctrl+shift+o to reimport the correct one, the one with your package appended to it. ll...@meridja.com A N K ! T ankit.awasth...@gmail.com wrote: hey R.java has deleted autometically...how to get it back -- A N K ! T.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is it possible to have a single ui element instance across the application?
It doesnt seem possible, all code I've looked at from Google applications repeats the common portions of activity display in all layout files. ll...@meridja.com Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 29, 2010 at 8:05 AM, sagare sagar.ekb...@gmail.com wrote: I have created a custom component and i want it to be singleton in my application and i want all actvities my application to have this custom component which is singleton. how can i achieve this? Please do not do this. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: No plan to support Netbeans?
I agree... ll...@meridja.com Tomáš Hubálek tom.huba...@gmail.com wrote: I'm using NetBeans at work daily for more than three years (creating swing based applications) and I adapted to Eclipse really quickly by mapping 10 most useful keyboard shortcuts in Eclipse. Rest of the IDE functionality seems very similar to me. I think it is useless to support more than one IDE as time spend on redundant work can be invested better to improvements of Eclipse IDE. Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Nexus One for developers
Does anyone know when will be possible to buy the Nexus One from the market as a registered developer? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Nexus One for developers
It's already on the market long time ago. You can buy it regardless if you're a developer or not. I.e. http://www.expansys.com/d.aspx?i=193858 Maybe not in local stores in your country, but definitely alternative online markets than the Google N1 website itself. Where are you based? On Jul 29, 9:06 pm, Rafael Martins rafaelwmart...@gmail.com wrote: Does anyone know when will be possible to buy the Nexus One from the market as a registered developer? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is it possible to have a single ui element instance across the application?
HI all, I want this coz i am trying to create a ui element which has to maintain state and there will be only one such ui element accross activities any way? Thanks and Regards, Sagar On Jul 29, 5:58 pm, Llies Meridja ll...@meridja.com wrote: It doesnt seem possible, all code I've looked at from Google applications repeats the common portions of activity display in all layout files. ll...@meridja.com Mark Murphy mmur...@commonsware.com wrote: On Thu, Jul 29, 2010 at 8:05 AM, sagare sagar.ekb...@gmail.com wrote: I have created a custom component and i want it to be singleton in my application and i want all actvities my application to have this custom component which is singleton. how can i achieve this? Please do not do this. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Nexus One for developers
In Brazil. But I'm looking for a Nexus to developers like Android Dev Phone 2 (HTC Magic) in Android Market (I'm a registered developer). It's available to you? Thanks. On 29 jul, 10:16, Mathias Lin m...@mathiaslin.com wrote: It's already on the market long time ago. You can buy it regardless if you're a developer or not. I.e.http://www.expansys.com/d.aspx?i=193858 Maybe not in local stores in your country, but definitely alternative online markets than the Google N1 website itself. Where are you based? On Jul 29, 9:06 pm, Rafael Martins rafaelwmart...@gmail.com wrote: Does anyone know when will be possible to buy the Nexus One from the market as a registered developer? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] TabView and other content in the same activity?
Hi all, I have a problem with TabView. I want my activity's layout look like this: -- | - | | || | | |LINEAR LAYOUT | | | || | | - | | - | | || | | | TABVIEW | | | || | | - | -- In the same layout view, a Linear layout and below that linear layout I want to put a tabview with 2 or 3 tabs. But the problem is; when I put some content before tabhost, or inside tabhost before tabwidget, those content is displayed in background of tabs. How can I create a view like this? Is it possible? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Emulator, forcing portrait mode
I have android:screenOrientation=portrait set for my activity. Creating an AVD with resolution 800x480 and running my activity, the GLSurfaceView is created with dimensions 800x480 (ie. not rotated and width height). I would expect it to be created with dimensions 480x800 and be rotated 90 degrees. Is this a bug in the emulator or am I wrong in my interpretation of android:screenOrientation? Best regards, Viktor Linder -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Application is not licensed...
The strange things is that if I click on the Buy App button from your sample, I got a 404 error... -_- On Jul 29, 1:45 am, Trevor Johns trevorjo...@google.com wrote: It doesn't need to be published, but it does need to be uploaded to Android Market. (It can be in the unpublished or draft state.) This is because Android Market needs a way to look up the RSA key for the application, as well as the list of authorized testers. (Technical note: We return ERROR_NOT_MARKET_MANAGED if we don't recognize the package name. If you really wanted, you could write a custom policy that treated this as a LICENSED response for testing purposes.) -- Trevor Johns Google Developer Programs, Androidhttp://developer.android.com On Wed, Jul 28, 2010 at 3:43 PM, sblantipodi perini.dav...@dpsoftware.orgwrote: Do you know if the application must be published to try LVL on the emulator? My application is saved, but never published. On Jul 29, 12:01 am, Trevor Johns trevorjo...@google.com wrote: Check the logcat output, there should be some hints in there to tell you why the license check is failing. -- Trevor Johns On Wed, Jul 28, 2010 at 10:27 AM, sblantipodi perini.dav...@dpsoftware.orgwrote: Hi all, I'm trying the code sample bundled with LVL library... I builted that code into my software changing the public key with the one taken from my developer console. Now when the MainActivity start, code without modification from the initial sample, it tell me that the application is not licensed also if I setted the test response to licensed in my profile settings from developer console... Any idea? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Nexus One for developers
But I'm looking for a Nexus to developers like Android Dev Phone 2 (HTC Magic) in Android Market (I'm a registered developer). It's available to you? Thanks. There's just Dev Phone 2. So if by dev phone you mostly means lower price than SRP, then sorry - no good news as of now. As for other things - Nexus One is unlocked and you can root it in minutes so there's no big problem using one if you need to test your app on this hardware. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Nexus One for developers
OK. I was asking because I've heard that the Nexus was available for developers and for me there's just ADP2. I wanted to check if this is because I'm brazilian or not. Thanks! On Jul 29, 10:41 am, { Devdroid } webnet.andr...@gmail.com wrote: But I'm looking for a Nexus to developers like Android Dev Phone 2 (HTC Magic) in Android Market (I'm a registered developer). It's available to you? Thanks. There's just Dev Phone 2. So if by dev phone you mostly means lower price than SRP, then sorry - no good news as of now. As for other things - Nexus One is unlocked and you can root it in minutes so there's no big problem using one if you need to test your app on this hardware. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Even with Min SDK version, building app against 2.2 breaks 1.5?
Okay, so I followed the instructions in this thread as far as I'm able to tell but I'm getting a FileNotFoundException whenever the 1.5 emulator tries to access a particular image in the drawable directory. I have two drawable directories: drawable and drawable- hdpi-v4. Any idea why this shouldn't work? More details here: http://stackoverflow.com/questions/3357816/notfoundexception-and-filenotfoundexception-when-running-app-on-android-1-5 Cheers, Mike On Jun 9, 5:02 am, Eric F ericfrie...@gmail.com wrote: Wow this completely explains what happened to me after updating to the 2.2 SDK. The documentation goes into detail about how the current environment picks hdpi or ldpi or what have you, but doesn't explain how previous versions operate at all. From a beginner's mindset, it seems to follow that since 1.5 wasn't dpi aware that it wouldn't read resources out of any folder containing a dpi setting (even mdpi). But this is not the case and it took me trial and error to understand the way it works. It is also not clearly mentioned that the solution is to do a hdpi-v4 and ldpi-v4 directory and an mdpi directory. In fact this was specifically not the solution recommended at Google IO a couple of days ago. So in conclusion, thanks for finally revealing how this works now (and has worked in previous androids) Dianne, and I would gladly write up a documentation patch but I don't think the d.android.com articles are in gerrit right? -Eric On Jun 8, 8:57 pm, Dianne Hackborn hack...@android.com wrote: Um, no, you should use -hdpi-v4 so that v3 of the platform does not see the hdpi resource (which it does not understand) as a possibility. Also as of 2.2 aapt will automatically include the appropriate minimum version for new configurations, so that older platforms do not see them. Though I notice that it uses -v4 for a resource that has ANY density specified, so if you don't have default resources for images you may break on 1.5. That is, you'd want drawable/, drawable-hdpi/, etc; and aapt will turn this in to drawable/ and drawable-hdpi-v4/ for you. If you have drawable-mdpi/ and drawable-hdpi/ you will end up with drawable-mdpi-v4/ and drawable-hdpi-v4, neither of which v3 (1.5) can accept. I should probably leave -mdpi as not having a version config... I think 1.5 can still handle those, though I'll have to check. (Note aapt also adds -v4 for -normal, -large, -small, -long, and -notlong; and -v8 for -car, -desk, -night, and -notnight.) -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Heads up, hold off updating to Java 1.6.0_21 on your dev machine
Looks like a recent change in Java 1.6.0_21 causes a problem with Eclipse (and other programs) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6969236 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Shared library
Hi is there a way to build shared library (written in Java so no NDK touched) that can be linked at runtime? I do not mean things like OpenIntent nor libraries linked at build time, but say separate apk one can get from market and all other apps can use it like it can be done on other platforms? SDK is quite enigmatic on that (so to speak) and tictactoe sample demoes linked-at-compile type of library. Any hints apprecaited -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Showing the writing keypad by default
Dear All, I have created an edit text. Currently the writing keypad is made visible when i click on it. Is there a possibility where I can make the writing keypad visible from starting itself i.e. no need to click on the edit text view. Thanks in advance. Amit -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] What is the best way to handle Images?
Hi All, I wrote a application that load images from facebook and i show in lmageview, using this below code. InputStream object = myDataFromServer; Bitmap bmpImage=BitmapFactory.decodeStream(object); imageView.setImageBitmap(bmpImage); it works fine for me. But the trouble is when i run my application for a longer time, it gives me error, OutofMemoryError, and becuse of this error my application crash. so want to know is there any better way to handling images.please help me. Thanks, Sohan Badaya -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Shared library
Platform library is a choice but I do not think it can be distributed by Market. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] use-library causes java.lang.ClassCastException when both apks loaded in one process
We have two apks A and B which both import one platform library by use- library in AndroidManifest. And they have the same android:process so they run in the same process. When A is finished and B is started, we got ClassCastException which happens like codes below: CustomedView view = (CustomedView)findViewById(R.id.customedView); We logged findViewById(R.id.customedView).getClass() == CustomedView.class out and found it was false. So we believe Android loads the same class twice by different classloader. Does anyone know how to get it right although it seems to be a bug of Android. BTW, we found one solution like below but which seems not to be good one. protected void onPause() { super.onPause(); Logger.d(TAG, kill myself); Process.killProcess(Process.myPid()); } Best Regards James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] finish() at onStop causes ANR
We have two apks A and B. A starts B at onBackPressed. Doing as steps below can make ANR: 1)starts emulator and A; 2)put one finger on A and hold on it; 3)press ESC to do back key action and B is started; 4)release finger on B ANR will happens if we call finish() at onStop. And if we call finish() after startActivity and everything is all right. Below is log when ANR happens: 07-28 07:08:31.586 V/WindowManager( 52): Waiting for key dispatch: 5000 07-28 07:08:36.591 V/WindowManager( 52): Finished waiting @5174450 startTime=5169441 switchTime=0 target=Window{43e68d70 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.First paused=true} mLW=null mLB=null fin=true mCurrentFocus=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.Second paused=false} 07-28 07:08:36.591 W/WindowManager( 52): Key dispatching timed out sending to com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.First 07-28 07:08:36.614 W/WindowManager( 52): Dispatch state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.Second paused=false} @ 1280300903391 lw=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.Second paused=false} lb=android.os.binderpr...@43e6ed18 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.Second paused=false}}} 07-28 07:08:36.614 W/WindowManager( 52): Current state: {{null to Window{43e68d70 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.First paused=true} @ 1280300916617 lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=true mcf=Window{43ce5d28 com.neusoft.test.FakeFinishOnStop/ com.neusoft.test.FakeFinishOnStop.Second paused=false}}} 07-28 07:08:36.632 I/ActivityManager( 52): ANR in process: com.neusoft.test.FakeFinishOnStop (last in com.neusoft.test.FakeFinishOnStop) Is this a bug? James -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] XML issue
Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/permissionButton / !-- buttons -- Button android:id=@+id/savebutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:text=Send android:layout_marginBottom=35dp android:layout_marginLeft=20dp/ Button android:id=@+id/cancelbutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentRight=true android:text=Cancel android:layout_marginBottom=35dp android:layout_marginRight=20dp/ ImageView android:id=@+id/footer android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/bottompic android:scaleType=fitXY android:layout_alignParentBottom=true android:layout_centerInParent=true/ /RelativeLayout And the message is in the last line after /RelativeLayout Any ideias about this? I googled it, tried to take all white spaces etc.. and nothing..
[android-developers] Checking to See if I directory Exsits
I have a string called extStorageDirectory which is set to my SD Card and then /mypics, I can then save a picture in to this directory, but only if the directory exsists. So how do I check to see if the directory exsits, and if it doesn't creates the directory? Thanks in advance ;-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Maps API - controlling size of streets, font?
Out of the box, MapView's presentation of streets and their labels (street names) is rather small-ish. Is there any way to control this? Comparing a MapView-based app against Google's Maps app, the difference is rather obvious, in particular when zooming out. Has anybody found a switch to modify the behavior of the underlying MapView to get closer to where Googls Maps' behavior is? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Checking to See if I directory Exsits
On 29 July 2010 17:16, Justin justinbrett1...@gmail.com wrote: So how do I check to see if the directory exsits, and if it doesn't creates the directory? http://tinyurl.com/2cnd5o3 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Shared library
On 29 July 2010 16:46, James Wang jameswangc...@gmail.com wrote: Platform library is a choice but I do not think it can be distributed by Market. Thanks, that's what I thought. Distribution is not a problem but I expect user won't be able to install such (unless rooted). Damn, all my attempts to keep the app as small as possible gets nuked :( Too bad as it looks I have no choice but to make bloatware... Blah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Calling view from activity’s count down timer
Hello, I have a class ViewforRed which extends View and have declared it in main.xml , I have an main activity and would like to call the ViewforRed from within the countdown timer's onTick. How can I do this. Any pointers or hints are appreciated. ?xml version=1.0 encoding=utf-8? TableLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:layout_margin=5px android:padding=20px TableRow TextView android:id=@+id/TextView01 android:layout_width=wrap_content android:layout_height=wrap_content android:text=DROP CALL android:layout_weight=0.5 android:gravity=center / !-- com.dropcall.ViewforRed android:id=@+id/View123 android:layout_width=100dip android:layout_height=100dip android:layout_alignParentRight=true / -- com.dropcall.ViewforRed android:id=@+id/View123 android:layout_width=75dip android:layout_height=100dip android:layout_alignParentRight=true / /TableRow !-- TableRow Chronometer android:id=@+id/chronometer android:format=@string/chronometer_initial_format android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1 android:paddingBottom=30dip android:paddingTop=30dip android:gravity=center / /TableRow -- TableRow TextView android:text=00:00 android:id=@+id/TextView02 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=1 android:paddingBottom=30dip android:gravity=center /TextView /TableRow TableRow android:gravity=center Button android:text=Start android:id=@+id/btnStart android:layout_width=wrap_content android:layout_height=wrap_content android:padding=20px /Button Button android:text=Stop android:id=@+id/btnStop android:layout_width=wrap_content android:layout_height=wrap_content android:padding=20px /Button /TableRow TableRow TextView android:text= android:id=@+id/TextView01 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center android:paddingBottom=30dip /TextView /TableRow TableRow Button android:text=Mute Phone android:id=@+id/Button01 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center android:paddingBottom=30dip /Button /TableRow TableRow Button android:text=Settings android:id =@+id/btnClick android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=center android:paddingTop=30dip / /TableRow /TableLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Creating the request to a webservice by kSoap2
It's much easy to use SIMPLE Xml Serialization framework instead of KSOAP2. On Jul 22, 10:27 pm, YNC yu.chu...@gmail.com wrote: Finally, I am able to construct the request and got the right response. The request has been constructed by chaining the Element classes each other. As far I understand, there is one more approach - using the class mapping, for example - to create the class which contents all stuff of eb:MessageHeader element and then to map the java class into request's envelope. Could any body show me how to do that. Thanks in advance. On Jun 28, 9:10 pm, YNC yu.chu...@gmail.com wrote: Could anybody help me with creating the request to a web service using the ksoap2 framework. For example, I need to make the following request: SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/ envelope/ xmlns:eb=http://www.ebxml.org/namespaces/messageHeader; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsd=http://www.w3.org/1999/XMLSchema; SOAP-ENV:Header eb:MessageHeader eb:version=1.0 eb:ConversationIdTEST_ID/eb:ConversationId eb:From eb:PartyIdTEST/eb:PartyId /eb:From eb:To eb:PartyIdGateway/eb:PartyId /eb:To eb:Service eb:type=OOOSCreateRQ/eb:Service eb:ActionSCreateRQ/eb:Action /eb:MessageHeader wsse:Security xmlns:wsse=http://schemas.xmlsoap.org/ws/2002/12/ secext xmlns:wsu=http://schemas.xmlsoap.org/ws/2002/12/utility; wsse:UsernameToken wsse:UsernameUsername/wsse:Username wsse:PasswordPassword/wsse:Password OrganizationHost/Organization /wsse:UsernameToken /wsse:Security /SOAP-ENV:Header SOAP-ENV:Body/ /SOAP-ENV:Envelope What the right approach for the name space's description and class mapping? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Market Licensing: Now Available!
With the new LVL we can have only one build for Free trial and for Full version, it's really find your adjectives that we need to upload two identical copyes of the same software with different package name, don't you think? On Jul 28, 6:01 pm, Joseph Earl joseph.w.e...@gmail.com wrote: Not with this system as far as I'm aware - users will have to purchase a new license when changing to a phone running a different OS. You'll have to continue using your own system if you want this kind of functionality. On Jul 28, 12:44 pm, sblantipodi perini.dav...@dpsoftware.org wrote: Hi all... When you bought my software you bought a license, this license can be ported from android to other platform like Symbian, Winmob, bada, JavaME, Blackberry... Every customers who bought my license is registered on our database, (email address and device id), this let me generate a new activation code in case he want to switch the license from android to xx platform. Is there an easy way to update my database when a customer bought my software with the email address and device id of the customer who bought the software or legally activated it? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Text blinking effect TextView
Hi all, Please let me know! How to make text blinking effect in TextView? I am using Android SDK 2.2. Thanks, Best regards, Nguyen, -- Huynh Ngoc Vu Nguyen Add: Duy Xuyên - Quang Nam E-mail: vunguye...@gmail.com Phone: 0935102789 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] XML issue
Eclipse's XML editor sometimes goes crazy if you make a lot of changes. Try deleting these errors from the error window. If they don't reappear, then it's just one of those glitches. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 29.07.2010 19:15 пользователь Pedro Teixeira pedroteixeir...@gmail.com написал: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/permissionButton / !-- buttons -- Button android:id=@+id/savebutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:text=Send android:layout_marginBottom=35dp android:layout_marginLeft=20dp/ Button android:id=@+id/cancelbutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentRight=true android:text=Cancel android:layout_marginBottom=35dp android:layout_marginRight=20dp/ ImageView android:id=@+id/footer android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/bottompic android:scaleType=fitXY android:layout_alignParentBottom=true
[android-developers] Re: XML issue
Cut out chunks until it passes, then add stuff back a little at a time until you get the problem again. On Jul 29, 10:15 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/permissionButton / !-- buttons -- Button android:id=@+id/savebutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:text=Send android:layout_marginBottom=35dp android:layout_marginLeft=20dp/ Button android:id=@+id/cancelbutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentRight=true android:text=Cancel android:layout_marginBottom=35dp android:layout_marginRight=20dp/ ImageView android:id=@+id/footer android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/bottompic
Re: [android-developers] Re: Shared library
Make the library interface be intent-based, and there you have it. Just an .apk without main activity. As added bonuses, it can contain resources and be distributed and upgraded via Market. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 29.07.2010 19:25 пользователь { Devdroid } webnet.andr...@gmail.com написал: On 29 July 2010 16:46, James Wang jameswangc...@gmail.com wrote: Platform library is a choice bu... Thanks, that's what I thought. Distribution is not a problem but I expect user won't be able to install such (unless rooted). Damn, all my attempts to keep the app as small as possible gets nuked :( Too bad as it looks I have no choice but to make bloatware... Blah -- You received this message because you are subscribed to the Google Groups Android Developers ... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: XML issue
RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton Shouldn't you have @+id/email for alignLeft? I noticed that in some other places as well -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of DanH Sent: Thursday, July 29, 2010 12:34 PM To: Android Developers Subject: [android-developers] Re: XML issue Cut out chunks until it passes, then add stuff back a little at a time until you get the problem again. On Jul 29, 10:15 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/permissionButton / !-- buttons -- Button android:id=@+id/savebutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true
[android-developers] Re: Checking to See if I directory Exsits
public static boolean TrackmasterDirectoryCheck(boolean makeDir){ File trackmasterDirectory = new File(Constants.SYSTEM_TRACKMASTER_DIR); if(makeDir!trackmasterDirectory.exists()){ trackmasterDirectory.mkdir(); return true; } else if (trackmasterDirectory.exists()) return true; else return false; } Jeff Visit Trackaroo.com! Trackmaster - Motorsports Lap Timer Dynomaster - Performance Dyno On Jul 29, 8:22 am, { Devdroid } webnet.andr...@gmail.com wrote: On 29 July 2010 17:16, Justin justinbrett1...@gmail.com wrote: So how do I check to see if the directory exsits, and if it doesn't creates the directory? http://tinyurl.com/2cnd5o3 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to pass geopoint location to Google turn-by-turn navigation
http://groups.google.com/group/android-developers/browse_thread/thread/83d2803f799c6f5f Jeff Visit Trackaroo.com! Trackmaster - Motorsports Lap Timer Dynomaster - Performance Dyno On Jul 28, 7:12 am, Ethan V. Mateja ethan.mat...@gmail.com wrote: I am trying to pass location data from my application to the Google Navigation API (No, not the browser). I can pass data to the dialer, and call a phone number successfully, but now wish to use the turn-by-turn navigation as an additional function. I have searched tirelessly through Android documentation, Google Maps API Documentation, and the web without luck. Can anyone point me in the right direction or hint how I can pass the service my data? Thanks in advance for reading my question! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Emulate android preference category look and feel
hello, i like title bar style in android preference category. In my activity (no preferenceactivity) i want to use same style, how i can do? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: XML issue
Thank you for your replies. @Toomy: I added the + in all the missing places and still didn't solved. @Kostya: I actually don't have any errors to erase, eclipse allows me to run it. I debugged it and this is the error I get: android.view.InflateException: Binary XML file line #19: Error inflating class java.lang.reflect.Constructor My 19 line is simply: android:id=@+id/header Doesn't make any sense to me... On Jul 29, 2010, at 5:39 PM, Tommy wrote: RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton Shouldn't you have @+id/email for alignLeft? I noticed that in some other places as well -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of DanH Sent: Thursday, July 29, 2010 12:34 PM To: Android Developers Subject: [android-developers] Re: XML issue Cut out chunks until it passes, then add stuff back a little at a time until you get the problem again. On Jul 29, 10:15 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp
RE: [android-developers] Re: XML issue
Hm thats weirdYou don't happen to have any other controls in your app with the same ID (@+id/header) do you? From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Pedro Teixeira Sent: Thursday, July 29, 2010 1:19 PM To: android-developers@googlegroups.com Subject: Re: [android-developers] Re: XML issue Thank you for your replies. @Toomy: I added the + in all the missing places and still didn't solved. @Kostya: I actually don't have any errors to erase, eclipse allows me to run it. I debugged it and this is the error I get: android.view.InflateException: Binary XML file line #19: Error inflating class java.lang.reflect.Constructor My 19 line is simply: android:id=@+id/header Doesn't make any sense to me... On Jul 29, 2010, at 5:39 PM, Tommy wrote: RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton Shouldn't you have @+id/email for alignLeft? I noticed that in some other places as well -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of DanH Sent: Thursday, July 29, 2010 12:34 PM To: Android Developers Subject: [android-developers] Re: XML issue Cut out chunks until it passes, then add stuff back a little at a time until you get the problem again. On Jul 29, 10:15 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible
Re: [android-developers] Re: XML issue
Have you tried cleaning the project? -- Kostya Vasilyev -- http://kmansoft.wordpress.com 29.07.2010 21:22 пользователь Pedro Teixeira pedroteixeir...@gmail.com написал: Thank you for your replies. @Toomy: I added the + in all the missing places and still didn't solved. @Kostya: I actually don't have any errors to erase, eclipse allows me to run it. I debugged it and this is the error I get: android.view.InflateException: Binary XML file line #19: Error inflating class java.lang.reflect.Constructor My 19 line is simply: android:id=@+id/header Doesn't make any sense to me... On Jul 29, 2010, at 5:39 PM, Tommy wrote: RadioButton android:text=Facebook ... Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers g... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] disable picture snapshot after calling Camera.takePicture()
Hey everyone, I'm trying to determine if it's possible to disable the snapshot that is displayed after you call Camera.takePicture(). I've scoured the camera documentation, and can't find a way to disable it. The problem I'm facing is that I am displaying the camera preview at fullscreen, and the snapshot that gets displayed is often not the same aspect ratio as the screen, resulting in a distorted and ugly looking snapshot. Any ideas? Thanks, Noah -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Split line of text into few lines
Hi, I'm wondering how can I split single line text into few lines. I need it for game. I want to make it in canvas. It will be notification popup, but sometimes text is too long (I draw text canvas.drawText()), and I need to split it and draw in few lines in rows. Anyone knows a good solution? I saw methods mPaint.measureText() or TextUtils.split(), but it isn't so good in my case. Is there other method? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Split line of text into few lines
Store the original in a string then break the original string down into three parts using string.substring() ? -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Grzegorz Ae Sent: Thursday, July 29, 2010 1:53 PM To: Android Developers Subject: [android-developers] Split line of text into few lines Hi, I'm wondering how can I split single line text into few lines. I need it for game. I want to make it in canvas. It will be notification popup, but sometimes text is too long (I draw text canvas.drawText()), and I need to split it and draw in few lines in rows. Anyone knows a good solution? I saw methods mPaint.measureText() or TextUtils.split(), but it isn't so good in my case. Is there other method? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Split line of text into few lines
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If your concern is to split the line at a word boundary, you may want to look at java.text.BreakIterator. On 07/29/2010 10:52 AM, Grzegorz Ae wrote: Hi, I'm wondering how can I split single line text into few lines. I need it for game. I want to make it in canvas. It will be notification popup, but sometimes text is too long (I draw text canvas.drawText()), and I need to split it and draw in few lines in rows. Anyone knows a good solution? I saw methods mPaint.measureText() or TextUtils.split(), but it isn't so good in my case. Is there other method? -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkxRwiQACgkQ9RoMZyVa61cRgACfQFx9g1jqpVszX9e4pNQp5RRs f2AAoKc1J8SPgPjnmXa6WDg/s19cHZAQ =Y5Hv -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 android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Is it possible to have a single ui element instance across the application?
On Thu, Jul 29, 2010 at 8:27 AM, sagare sagar.ekb...@gmail.com wrote: I want this coz i am trying to create a ui element which has to maintain state and there will be only one such ui element accross activities any way? You could ... a) save the state of the control in static data, then with each activity you have the control in, repopulate it in onCreate() with the static data b) pass the required state data via intents each time you open a new activity or return from one. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Split line of text into few lines
Depends a lot on whether you just want to split by character count, or rather by line width, given a specific font. On Jul 29, 12:52 pm, Grzegorz Ae grzegorz.m...@gmail.com wrote: Hi, I'm wondering how can I split single line text into few lines. I need it for game. I want to make it in canvas. It will be notification popup, but sometimes text is too long (I draw text canvas.drawText()), and I need to split it and draw in few lines in rows. Anyone knows a good solution? I saw methods mPaint.measureText() or TextUtils.split(), but it isn't so good in my case. Is there other method? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: config.properties
Gotcha - I think some of these Jars contain classes that allow the paths to resources to be fed to them in which case I can control that by first generating them using the appropriate methods under Android. For the rest I will rewrite or replace. Thanks. On Jul 29, 1:37 am, Mark Murphy mmur...@commonsware.com wrote: Rewrite or replace the 3rd party JAR. JARs that make assumptions about file locations are doomed on Android or any other non-traditional OS. On Thu, Jul 29, 2010 at 1:09 AM, kypriakos demet...@ece.neu.edu wrote: Hi all, in one of the 3rd party jars ( already compiled under Android) there is a config.properties file that classes from the jar need to use. Smartly enough, the Android plugin packages this properties file at the right directoy path starting from the root directory. However, at runtime this file is not found ... I looked around and it seems that a while back Issue 173 was tracking this. Any new solutions to this issue? -- 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 Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] IOException on geocoder.getFromLocationName
On Thu, Jul 29, 2010 at 7:49 AM, Prasanna Perera prasanna.per...@gmail.comwrote: How do I prevent the IOException from happening? Step 1: Read the documentation to determine when this exception gets thrown: http://developer.android.com/reference/android/location/Geocoder.html#getFromLocationName(java.lang.String, int) http://developer.android.com/reference/android/location/Geocoder.html#getFromLocationName(java.lang.String, int) Throws IOExceptionhttp://developer.android.com/reference/java/io/IOException.htmlif the network is unavailable or any other I/O problem occurs Step 2: Realize that you have no control over the network (which is probably what's going wrong) or the function in general and cannot stop this exception from being thrown. Step 3: Stop trying to avoid the exception and instead write code to handle it gracefully. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: XML issue
You generally shouldn't use @+ except on the android:id attribute. The usage of @+ is very poorly understood, from what I've seen. But it's not clear that this has anything to do with the problem at hand. On Jul 29, 10:15 am, Pedro Teixeira pedroteixeir...@gmail.com wrote: Hello there, I've been going on and on with my XML file and I can't seem to find any problem... The file doesn't show any problem in the code but there's the red box on the right which reads: Multiple annotations found at this line: - The processing instruction target matching [xX][mM][lL] is not allowed. - No grammar constraints (DTD or XML schema) detected for the document. Here is the XML code: ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:background=@color/black android:padding=6dp ImageView android:id=@+id/header android:layout_width=wrap_content android:layout_height=wrap_content android:src=@drawable/send android:scaleType=fitXY android:layout_alignParentTop=true android:layout_centerInParent=true/ ImageView android:id=@+id/picpreview android:layout_width=150dp android:layout_height=150dp android:scaleType=fitXY android:src=@drawable/polaroid android:layout_below=@id/header android:layout_marginLeft=15dp android:layout_marginTop=15dp/ RadioButton android:text=Email android:id=@+id/email android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_below=@id/header android:layout_marginLeft=2dp android:layout_alignTop=@id/picpreview /RadioButton RadioButton android:text=Facebook android:id=@+id/facebook android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/email android:layout_below=@+id/email /RadioButton RadioButton android:text=Other android:id=@+id/other android:layout_height=wrap_content android:layout_toRightOf=@+id/picpreview android:layout_width=wrap_content android:layout_alignLeft=@id/facebook android:layout_below=@+id/facebook /RadioButton !-- botao facebook -- com.codecarpet.fbconnect.FBLoginButton android:id=@+id/login android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/picpreview / TextView android:id=@+id/label android:textColor=@color/black android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=30dp android:layout_below=@id/login / Button android:id=@+id/permissionButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/get_permission android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/label / Button android:id=@+id/feedButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/publish_to_feed android:visibility=invisible android:paddingRight=30dp android:paddingLeft=30dp android:layout_margin=30dp android:layout_below=@id/permissionButton / !-- buttons -- Button android:id=@+id/savebutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentLeft=true android:text=Send android:layout_marginBottom=35dp android:layout_marginLeft=20dp/ Button android:id=@+id/cancelbutton android:layout_width=130dp android:layout_height=wrap_content android:layout_alignParentBottom=true android:layout_alignParentRight=true android:text=Cancel android:layout_marginBottom=35dp android:layout_marginRight=20dp/ ImageView android:id=@+id/footer
[android-developers] Re: Possible to gather application logs at runtime?
The log collector app looks really interesting. I presume the logcat utility is part of the standard system image and should be available on most Android devices? Also, how big is the default logcat buffer, or how do I find out? On Jul 19, 3:03 pm, joebowbeer joe.bowb...@gmail.com wrote: The Log API writes to a small circular buffer that is shared by all apps. If you want to capture more information, consider a different route, such as java.util.logging, which by default writes to Android's Log, but additional handlers (such as file handlers) can be configured. However, beware of Issue 6929: http://code.google.com/p/android/issues/detail?id=6929 On Jul 19, 6:59 am, Jin Chiu live2drea...@gmail.com wrote: To facilitate diagnostics while the app has been deployed, does Android provide any API to facilitateruntimelogging? It would be ideal if the app could retrieve all the messages it wrote to the LoggingSystem via the Log API functions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] finish() at onStop causes ANR
On Thu, Jul 29, 2010 at 10:09 AM, James Wang jameswangc...@gmail.comwrote: A starts B at onBackPressed. ANR will happens if we call finish() at onStop. You're starting an activity in response to the button that's supposed to kill activities? And you're calling finish() in a life cycle method that's usually part of the destroy process anyway? Why? Why would do this? Is this a bug? Probably, but with your code, not Android. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Speech recognition without connecting to google?
I have been trying this exact same thing. The application I am creating only have a few simple commands and doing the recognition locally on the phone would produce much quicker results. I downloaded the VoiceDailer application from http://android.git.kernel.org/, but the code uses a Recognizer Class that I don't know where to get. If anybody knows where to get this class or as John said, know of any other method to do speech recognition without a data connection, please share your knowledge. Thanks Chris On Jul 23, 7:42 pm, RespeckKnuckles (John Licato) respeckknuckl...@gmail.com wrote: Hello, I am developing on an android 2.1 build. I am trying to usespeechrecognitionin my application but the whole process of connecting to google each time gets very annoying. I have noticed that the voice dialing does not seem to connect to google (I've tried it in an area with no reception or wifi and it worked). Is there a way to dospeechrecognitionusing whatever local methods voice dialing uses? (Or any other methods that don't require the constant disconnecting / reconnecting to google). John Licato -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: XML issue
When eclipse misbehaves I normally restart... ll...@meridja.com Kostya Vasilyev kmans...@gmail.com wrote: Have you tried cleaning the project? -- Kostya Vasilyev -- http://kmansoft.wordpress.com 29.07.2010 21:22 пользователь Pedro Teixeira pedroteixeir...@gmail.com написал: Thank you for your replies. @Toomy: I added the + in all the missing places and still didn't solved. @Kostya: I actually don't have any errors to erase, eclipse allows me to run it. I debugged it and this is the error I get: android.view.InflateException: Binary XML file line #19: Error inflating class java.lang.reflect.Constructor My 19 line is simply: android:id=@+id/header Doesn't make any sense to me... On Jul 29, 2010, at 5:39 PM, Tommy wrote: RadioButton android:text=Facebook ... Pedro Teixeira www.pedroteixeira.org -- You received this message because you are subscribed to the Google Groups Android Developers g... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en