[android-beginners] Animating a single list item from a listView
Is it possible to animate a single list item from a ListView? If so how? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: using onBind in a service with Intent actions
I got this working by putting the intent code in onServiceDisconnected On Oct 26, 11:21 pm, jax jackma...@gmail.com wrote: I am trying to make it so that when a user exits an activity or flips the screen it will continue the last session. I am binding to a service. If the user presses a particular button with an intent action of Constants.NEW_GAME it will create a whole new session destroying the previous session. Below is my onBind method, the problem is that when I run this, startNewGame() runs as expected but for some reason when the activity is loaded there is no data. When I comment out intent.setAction the data is visible, but, the game resets itself when I flip the phone screen out! What is going on here? THIS DOES NOT WORK @Override public IBinder onBind(Intent intent) { Log.i(TAG,Binding to QuestionsService successful); if(intent.getAction().equals(Constants.NEW_GAME)) { //We need to create a whole new game which will end the previouse game startNewGame(); intent.setAction(Constants.CONTINUE_GAME); } return mBinder; } THIS DOES WORK (but the game resets when the user flips the screen) @Override public IBinder onBind(Intent intent) { Log.i(TAG,Binding to QuestionsService successful); if(intent.getAction().equals(Constants.NEW_GAME)) { //We need to create a whole new game which will end the previouse game startNewGame(); // intent.setAction(Constants.CONTINUE_GAME); } return mBinder; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] using onBind in a service with Intent actions
I am trying to make it so that when a user exits an activity or flips the screen it will continue the last session. I am binding to a service. If the user presses a particular button with an intent action of Constants.NEW_GAME it will create a whole new session destroying the previous session. Below is my onBind method, the problem is that when I run this, startNewGame() runs as expected but for some reason when the activity is loaded there is no data. When I comment out intent.setAction the data is visible, but, the game resets itself when I flip the phone screen out! What is going on here? THIS DOES NOT WORK @Override public IBinder onBind(Intent intent) { Log.i(TAG,Binding to QuestionsService successful); if(intent.getAction().equals(Constants.NEW_GAME)) { //We need to create a whole new game which will end the previouse game startNewGame(); intent.setAction(Constants.CONTINUE_GAME); } return mBinder; } THIS DOES WORK (but the game resets when the user flips the screen) @Override public IBinder onBind(Intent intent) { Log.i(TAG,Binding to QuestionsService successful); if(intent.getAction().equals(Constants.NEW_GAME)) { //We need to create a whole new game which will end the previouse game startNewGame(); // intent.setAction(Constants.CONTINUE_GAME); } return mBinder; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Selling applications from outside the approved countries
I don't live in the approved countries supported by the Android Market...so what are my options? 1. Am I totally locked out of the android market? 2. Can anyone from any country sell on slideme.com? 3. Are there any other app stores? 4. If I sell from my website how will I control piracy? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to import an existing project into Eclipse?
File -- Import -- Existing Projects into Workspace Click browse and find the API demo directory On Oct 25, 7:53 pm, Freeman Zhang pcman.zh...@gmail.com wrote: HI I wanna import some codes sample to the Eclipse to learn the API usage. But, when I choose import from the menu, I found there's no Android project in it. How can I import an existing project into the Eclipse? Thanks a lot. Regards, Freeman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: removing the dictionary from the ime
Solved. Set the Input type to Visible password On Oct 23, 8:44 pm, jax jackma...@gmail.com wrote: Is is possible to remove the automatic dictionary from the ime when in a particular text field? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: disable soft keyboard from auto-completion
Solved. Set the Input type to Visible password On Oct 23, 12:37 pm, jax jackma...@gmail.com wrote: No...that didn't work. It still showed the spelling and underlines etc. I need to get hold of each character as it is typed. With the soft-keyboard it does not check the onKey until you have clicked Done On Oct 23, 12:33 pm, jax jackma...@gmail.com wrote: found it Input-type in the xml preferences On Oct 23, 12:31 pm, jax jackma...@gmail.com wrote: Hi I have a TextView that I do not want to have auto-completion on when the user opens the soft keyboard. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Trying to turn off candidates view in EditText with on-screen keyboard
hey, I just had this problem also Change the input type to Visible Password it works On Oct 23, 12:05 pm, Bamsen bamse...@gmail.com wrote: Hi, My first (and very simple) application uses an EditText box to input information that is not English words. When I do this i get the candidates view (which I normally love :) with suggestions for known words. I do not want to pollute my word list by saving what I typed so I want to turn off candidates view for this text box. I have searched the documentation and WEB but could not find the answer. I have tried two methods: 1. Set the XML property input type to various values. With this I can't find one that lets me input 'raw' text without a candidates view. 2. Use InputMethodService static InputMethodService mInputService; mInputService=new InputMethodService(); mInputService.setCandidatesViewShown(false); Whenever i try the last line my app 'has stopped unexpectedly' I would prefer to understand the second method, but would be happy for the first one to work, for now. :) Any and all help is greatly appreciated. -- Morten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Screen flip vs back button
Hi, I need to know the difference between flipping your phones keyboard out and pressing the back button. I was under the impression that flipping went to onStop then onStart (skipping onDestroy) but this does not seem to be the case. Basicaly, if the user pressed the back button I want to run a restart () method but if the user flipps the screen out I don't want to do anything. How would I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] removing the dictionary from the ime
Is is possible to remove the automatic dictionary from the ime when in a particular text field? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Regular expressions help
I am trying to strip all whitespace from each line in a EditText View. The expression I am using is this String result = Pattern.compile(^\\s+|\\s+$, Pattern.MULTILINE).matcher(input).replaceAll(); This works for the following input hello hello hello hi This will produce: hello hello hello hi but hello hello hello hi will produce: hello hellohello hi Notice the new line (\n). This is causing the problem. What I want is: hello hello hello hi Any ideas about how to fix this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Regular expressions help
ok thanks, as I understand \s matches all whitespace characters as there are some extra unicode whitespace characters in other languages (not part of ASCII). Maybe it is not worth worrying about these characters though. I will try you solution above. On Oct 23, 11:40 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: hi, i think it has to do with the multiline flag. that causes it to eat the newline (read the javadocs). i don't see any neat way to do it, other than treating whitespace and newlines separately. for example, something lime / String s1 = hello\n hello\n\n hello\n hi\n; Pattern p = Pattern.compile(^[ \t]+|[ \t]+$|\n$, Pattern.MULTILINE); Matcher m = p.matcher(s1); s1 = m.replaceAll();/ On 10/23/09 9:16 AM, jax wrote: I am trying to strip all whitespace from each line in a EditText View. The expression I am using is this String result = Pattern.compile(^\\s+|\\s+$, Pattern.MULTILINE).matcher(input).replaceAll(); This works for the following input hello hello hello hi This will produce: hello hello hello hi but hello hello hello hi will produce: hello hellohello hi Notice the new line (\n). This is causing the problem. What I want is: hello hello hello hi Any ideas about how to fix this? -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Android experts: a template for the life cycle
Hi, below I have a template of the main life cycle of an android program. I am now at the stage that I need to start thinking about where the best place to do things are. Can someone with a good knowledge of best practices in Android development please copy an paste the following comments in their respective place in the template. Also if you can think of other things that should be done put them in also. This would be a great help, cheers. //open a database db.open() //close a database db.close() //getDefaultSharedPreferences //Bind to a service //Unbind from a service //open Text to Speech library tts. //closeText to Speech library tts mTts.shutdown(). //Create event listeners for Views //Register a broadcast receiver //unregister a receiver //save activity state //restore activity state public class Template extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //set the layout //get the views } @Override protected void onStart() { super.onStart(); } @Override protected void onResume() { super.onResume(); } @Override protected void onRestart() { super.onRestart(); } @Override protected void onPause() { super.onPause(); } @Override protected void onStop() { super.onStop(); } @Override protected void onDestroy() { super.onDestroy(); } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Poor Documentation
Yes - as a beginner it is especially frustrating. Actually some of the documentation is missing especially on the XML attributes for shapes etc. I think what the documentation needs is an example of how you might use it like the PHP docs have. So at the bottom of each class there will be a demo of how to use the basic features. For me this just makes the whole process of learning and getting your head around the concepts that much easier. I would also like to see a seperate XML section devoted to using XML in android. -jack On Oct 22, 5:09 pm, Sean Hodges seanhodge...@googlemail.com wrote: On Thu, Oct 22, 2009 at 10:00 AM, gmseed gms...@gmail.com wrote: Take the Sensor page, which lists the public methods: float getMaximumRange() String getName() float getPower() float getResolution() int getType() String getVendor() int getVersion() Not a single comment as to what these do. Readers must be expected to be mind readers. From the developer docs: public float getMaximumRange () Since: API Level 3 Returns * maximum range of the sensor in the sensor's unit. public String getName () Since: API Level 3 Returns * name string of the sensor. public float getPower () Since: API Level 3 Returns * the power in mA used by this sensor while in use public float getResolution () Since: API Level 3 Returns * resolution of the sensor in the sensor's unit. public int getType () Since: API Level 3 Returns * generic type of this sensor. public String getVendor () Since: API Level 3 Returns * vendor string of this sensor. public int getVersion () Since: API Level 3 Returns * version of the sensor's module. The comments might be terse, but I think the general info is available there. As a class representing abstracted hardware, I'm not entirely sure how much much info it can provide in itself. Perhaps you are looking for a tutorial on the sensor framework, rather than the reference docs? Then take SensorListener, which provides a few comments on the accelermoeter, magnetic and orientation sensors but no mention of the other sensors. When I run an application with onSensorChanged (int sensor, float[] values) it outputs 6 values and not 3 as the documentation would suggest. I do agree that the documentation does not often follow the latest API, some documentation becomes out of date. I suspect the extra 3 values were added to support new devices on the market, and the docs have not been updated to reflect that. There's no good excuse for it; but flagging the omissions up in the Android bug tracker will hopefully get the issue raised and resolved for future developers... I gather from reading previous posts that this documentation issue is not new and has been around since the start of Android. Clearly then somebody at Google has a strange idea as to what documenting an API means. The Android system is amazing but really let down by its developer documentation. I've always found the Android documentation to be fairly good, it's far from perfect but a lot better than many commercial/OSS projects I've come across in the past. Having said that, I'll admit that I might have just spent far too much time sifting through GTK/Python/C++ reference docs, and have developed a slightly skewed perspective :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] disable soft keyboard from auto-completion
Hi I have a TextView that I do not want to have auto-completion on when the user opens the soft keyboard. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: disable soft keyboard from auto-completion
found it Input-type in the xml preferences On Oct 23, 12:31 pm, jax jackma...@gmail.com wrote: Hi I have a TextView that I do not want to have auto-completion on when the user opens the soft keyboard. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: disable soft keyboard from auto-completion
No...that didn't work. It still showed the spelling and underlines etc. I need to get hold of each character as it is typed. With the soft-keyboard it does not check the onKey until you have clicked Done On Oct 23, 12:33 pm, jax jackma...@gmail.com wrote: found it Input-type in the xml preferences On Oct 23, 12:31 pm, jax jackma...@gmail.com wrote: Hi I have a TextView that I do not want to have auto-completion on when the user opens the soft keyboard. Is this possible? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: When I run getSize() on my text view it returns 0
Sorry Mark...I mean getWidth() here is the sample that I am following from API demo. (target is a TextView) final View target = findViewById(R.id.target); final View targetParent = (View) target.getParent(); Animation a = new TranslateAnimation(0.0f, targetParent.getWidth() - target.getWidth() - targetParent.getPaddingLeft() - targetParent.getPaddingRight(), 0.0f, 0.0f); a.setDuration(1000); a.setStartOffset(300); a.setRepeatMode(Animation.RESTART); a.setRepeatCount(Animation.INFINITE); a.setInterpolator(AnimationUtils.loadInterpolator (this,android.R.anim.bounce_interpolator)); target.startAnimation(a); On Oct 22, 12:58 am, Mark Murphy mmur...@commonsware.com wrote: jax wrote: When I run getSize() on my text view it returns 0? TextView does not have a getSize() method. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] wait for an animation to end before continuing the program
I need to wait for an animation to end before continuing the program. How would I do that? I noticed that I can get a hanndle on hasEnded() but if I run this is a do while loop the application will halt. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] bounce not working for my layout
From the API demo i tried the bounce animation final View target = findViewById(R.id.target); final View targetParent = (View) target.getParent(); Animation a = new TranslateAnimation(0.0f, targetParent.getWidth() - target.getWidth() - targetParent.getPaddingLeft() - targetParent.getPaddingRight(), 0.0f, 0.0f); a.setDuration(1000); a.setStartOffset(300); a.setRepeatMode(Animation.RESTART); a.setRepeatCount(Animation.INFINITE); The problem is that this does not work with my layout. I finally got working but had to hard code a value for: targetParent.getWidth() - target.getWidth() - targetParent.getPaddingLeft() - targetParent.getPaddingRight() I don't like hard coding this in but it is the only way I could get it to work. My View is inside a LinearLayout and I put a padding of 10dip. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Using Preferences to Select a value in a spinner
I have an List Id from a database stored in my Shared preferences. I have made a spinner with a SimpleCursorAdaptor that selects all my Lists from the database and allows you to select them from the spinner. My problem is that I can't figure out how to set the selected item to be my preferred list from my preferences. All the methods I can see seem to use position instead of the _id value from the DB. Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: What does Related Methods mean in Documentation
where exactly? for example: http://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html#attr_android:centerX Where is this link? On Oct 20, 1:06 am, Mark Murphy mmur...@commonsware.com wrote: jax wrote: What does Related Methods mean in the Reference section of the developers site. For example I was looking how to define XML drawables an came across: ... android:gradientRadius Since: API Level Related Methods ... It does now show me how to use this attribute or what values it accepts. Related Methods refer to methods that are related to the attribute you are looking at. Click the link of the method(s) beneath the Related Methods heading. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Good documentation of shapes, styles and themes
Does anyone know of a site with good documentation of android XML attributes for things like shapes, styles and themes? The official site is incomplete and clumsy. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] R class outside of activity
I have made a regular class that needs to use string from the R class. I have imported the R class into the activity and am able to access all the variables. My Question is, how do you convert them to string, For example: If I access R.string.myString it will return as an int not a String --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R class outside of activity
ok thanks I modified to class to accept a Context On Oct 18, 5:06 pm, RichardC richard.crit...@googlemail.com wrote: The need to pass the context around is because your strings (and all resources) may be different for localization, layout, screen size etc. So accessing a string (resource) without an application context does not make sence. -- RichardC On Oct 18, 11:04 am, RichardC richard.crit...@googlemail.com wrote: Try this:http://developer.android.com/guide/topics/resources/index.html -- RichardC On Oct 18, 10:48 am, jax jackma...@gmail.com wrote: I have made a regular class that needs to use string from the R class. I have imported the R class into the activity and am able to access all the variables. My Question is, how do you convert them to string, For example: If I access R.string.myString it will return as an int not a String --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Refractoring XML in eclipse
Hi, the development environment in eclipse is quite good but I the XML support seems a little limited. For example, I can't refractor properly. For example, if I rename a string in my resources it doesn't change throughout the project like java code would do. Does anyone have any tips or tricks when dealing with the XML side of things. Mainly, renaming XML files and changing names of strings, arrays etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Controlling who and when can access for a Service and Waiting for Android Threads to finish
A couple of questions 1. I have a service that needs to restrict access to it's methods at certain times. What is the best way to implement this. My activity binds to the service initially. 2. I am using the TTS (Text to Speech) library but I have noticed that is takes a little while to load and appears to do so in another Thread. I need my activity to wait until this is fully loaded, how do I do that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE:
Hi Clave If you press the Caps Lock key to the left of the keyboard near the 'A' key IT WILL STOP YOU WRITING LIKE THIS. On Oct 18, 5:06 pm, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: well ... i don't want to write the code for you, but what you are asking for is possible. if you aren't using the eclipse plugin, do that. it gives an okay GUI editor for layouts ... so you can try things out quickly and see what looks correct. some things to watch out for are setting weights, setting gravity, and setting layout widths. On 10/18/09 2:39 AM, Clave Yard wrote: Yes. You are right. android:orientation=horizontal is helping a lot. But i want to keep three controls(image, button and text) on Top in a single line. And one slider control in the second line, below of that three controls. For ex: If you see built-in Volume control, there will be Volume speaker icon and volume text one line, and below you can see the volume slider. Same like that i wanted to do. --- On *Sun, 10/18/09, Jeffrey Blattman /jeffrey.blatt...@gmail.com/* wrote: From: Jeffrey Blattman jeffrey.blatt...@gmail.com Subject: [android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE: To: android-beginners@googlegroups.com Date: Sunday, October 18, 2009, 9:03 AM are you using a listview or no? i'll assume no ... yes, to get three views positioned horizontally across the page, you would use a LinearLayout and specify android:orientation=horizontal. On 10/18/09 2:00 AM, Clave Yard wrote: Do you mean, using layout we can't achieve this? Is there any sample provided by Android team to do such thing, creating custom controls? --- On *Sun, 10/18/09, Jeffrey Blattman /jeffrey.blatt...@gmail.com/* wrote: From: Jeffrey Blattman jeffrey.blatt...@gmail.com Subject: [android-beginners] Re: MULTIPLE CONTROLS IN SINGLE LINE: To: android-beginners@googlegroups.com Date: Sunday, October 18, 2009, 8:48 AM i assume you mean you want your list view's rows to be complex. in summary, 1. create a custom adapter 2. in the adapter's getView(), inflate your custom view and populate it as you wish On 10/18/09 1:03 AM, Clave Yard wrote: ALL, CAN SOME ONE TELL ME HOW TO MAKE THREE CONTROLS IN A SINGLE LINE USING LAYOUT? I WANT TO SHOW AN IMABE, A BUTTON AND TEXT LABEL IN A SINGLE LINE. I TRIED THAT ON LAYOUT IN ECLIPSE. BUT IT ACCEPTS ONLY ONE CONTROL FOR ONE LINE, IF ADD NEXT CONTROL IT GOES TO NEXT LINE(ROW). I WANT TO MAKE THREE CONTROLS TO BE IN SINGLE LINE. HOW DO I ACHIEVE THIS? APPRECIATE YOUR HELP ON THIS. -- -- -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Using the android logo in a paid app
Is it OK to use the Android logo in a paid application? If not is it OK to use a modified version of the logo? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Why do I need requery() when I already have notifyDataSetChanged()
ok thanks On Oct 17, 6:58 pm, Mark Murphy mmur...@commonsware.com wrote: jax wrote: I had an adapter that was no updating properly when I called myAdapter.notifyDataSetChanged() This causes much headache an finally I tried cursor.requery(); //This is the cursor on which myAdapter is connected to myAdapter.notifyDataSetChanged(); My Question is - Why do I need to run requery()? I thought that notifyDataSetChanged() would automatically update the cursor for us! notifyDataSetChanged() tells those monitoring the adapter that the adapter changed. If you manually call that yourself, you must manually update the adapter first. In the case of a CursorAdapter, simply calling requery() on the Cursor will automatically trigger notifyDataSetChanged() on the CursorAdapter, so you do not need your second statement. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in Germany, 18-22 January 2010:http://bignerdranch.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Why do I need requery() when I already have notifyDataSetChanged()
I had an adapter that was no updating properly when I called myAdapter.notifyDataSetChanged() This causes much headache an finally I tried cursor.requery(); //This is the cursor on which myAdapter is connected to myAdapter.notifyDataSetChanged(); My Question is - Why do I need to run requery()? I thought that notifyDataSetChanged() would automatically update the cursor for us! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Problem with Cursor Adapter not updating
I have a CursorAdapter attached to a ListView I then delete a row from the database by using a context menu and call notifyDataSetChanged() on the adapter. The problem is that the ListView does not update until I quit the activity and re-enter. What am I doing wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] difference between CharSequence and strings
what is the difference between CharSequence[] and a String[]? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Cannot select a row in SimpleCursorAdapter with custom layout
When I use the following layout in a SimpleCursorAdapter I cannot select any rows. In face the setOnItemClickListener methods does not even run at all. ?xml version=1.0 encoding=utf-8? LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content android:padding=4dp xmlns:android=http:// schemas.android.com/apk/res/android android:focusable=false LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content android:padding=2dp android:focusable=false android:clickable=false TextView android:textSize=18sp android:layout_width=wrap_content android:layout_height=wrap_content android:text=name android:id=@+id/ row_item_name android:focusable=false /TextView TextView android:textSize=12sp android:layout_width=wrap_content android:layout_height=wrap_content android:text=Check to mark as known android:id=@+id/row_item_extra_info android:focusable=false /TextView /LinearLayout LinearLayout android:orientation=vertical android:gravity=right android:layout_gravity=right android:layout_width=fill_parent android:layout_height=wrap_content android:padding=2dp android:focusable=true android:clickable=true CheckBox android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/row_item_checkbox android:focusable=false android:clickable=true /CheckBox /LinearLayout /LinearLayout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java sometimes doen not refresh itself in eclipse
how to you run a clean? On Oct 14, 6:41 pm, Smelly Eddie ollit...@gmail.com wrote: I may be mistaken, but if you run a clean on the project it should regenerate all the generated java files, namely R. On Oct 13, 11:57 pm, jax jackma...@gmail.com wrote: I have notices that R.java sometimes noes not refresh when I edit (and save) an XML file. The only way I have been able to get around this is to attempt to run the project, this seems to fix it. This is however kind of annoying, does anyone know a better way around this problem? An eclipse shortcut key etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Intent is not sending extras data when using getIntent()
Solved, had to use getLongExtra instead of getIntExtra On Oct 14, 6:53 pm, jax jackma...@gmail.com wrote: I am having a problem with an intent. I open an activity using the following on a ListView. public static final String LIST_ID = com.example.myprogram.ListId; //onClick listener localListView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView? adapter, View view, int position, long id) { //open the list localClickIntent = new Intent(ListManagement.this, ListStatistics.class); localClickIntent.putExtra(ListManagement.LIST_ID, id); startActivity(localClickIntent); } }); I then retrieve that LIST_ID in ListStatistics like this Intent receivedIntent = getIntent(); listId = receivedIntent.getIntExtra(ListManagement.LIST_ID, 1); The problem is that the listId is always the default (1), and inspecting the extras on receivedIntent in eclipse shows not extras data. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: R.java sometimes doen not refresh itself in eclipse
Brilliant I Build Automatically was unchecked. On Oct 15, 5:07 am, Xavier Ducrohet x...@android.com wrote: Did you uncheck Project Build Automatically? Launching the project forces a compile so that may be what is happening. Xav On Tue, Oct 13, 2009 at 8:57 PM, jax jackma...@gmail.com wrote: I have notices that R.java sometimes noes not refresh when I edit (and save) an XML file. The only way I have been able to get around this is to attempt to run the project, this seems to fix it. This is however kind of annoying, does anyone know a better way around this problem? An eclipse shortcut key etc. -- Xavier Ducrohet Android SDK Tech Lead Google Inc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Cannot select a row in SimpleCursorAdapter with custom layout
solved Had to set Clickable and Focussable to false for all items including layouts. On Oct 14, 1:29 pm, jax jackma...@gmail.com wrote: When I use the following layout in a SimpleCursorAdapter I cannot select any rows. In face the setOnItemClickListener methods does not even run at all. ?xml version=1.0 encoding=utf-8? LinearLayout android:orientation=horizontal android:layout_width=fill_parent android:layout_height=wrap_content android:padding=4dp xmlns:android=http:// schemas.android.com/apk/res/android android:focusable=false LinearLayout android:orientation=vertical android:layout_width=wrap_content android:layout_height=wrap_content android:padding=2dp android:focusable=false android:clickable=false TextView android:textSize=18sp android:layout_width=wrap_content android:layout_height=wrap_content android:text=name android:id=@+id/ row_item_name android:focusable=false /TextView TextView android:textSize=12sp android:layout_width=wrap_content android:layout_height=wrap_content android:text=Check to mark as known android:id=@+id/row_item_extra_info android:focusable=false /TextView /LinearLayout LinearLayout android:orientation=vertical android:gravity=right android:layout_gravity=right android:layout_width=fill_parent android:layout_height=wrap_content android:padding=2dp android:focusable=true android:clickable=true CheckBox android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/row_item_checkbox android:focusable=false android:clickable=true /CheckBox /LinearLayout /LinearLayout --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] View id names for native android layouts
I have been stuck on this for hours and cant find any information about it. I am trying to use the following layout with a SimpleCursorAdapter android.R.layout.simple_list_item_checked The problem is I don't know what the checkbox field is called in this layout. By experimentation the text field is called android.R.id.text1 I tried android.R.id.checkbox but it did not work. How do I find this information? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] R.java sometimes doen not refresh itself in eclipse
I have notices that R.java sometimes noes not refresh when I edit (and save) an XML file. The only way I have been able to get around this is to attempt to run the project, this seems to fix it. This is however kind of annoying, does anyone know a better way around this problem? An eclipse shortcut key etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Creating my own helper classes
But what if I want to include various xml values with my helper classes. For example, if I create a new View control, how will I include the resource files that the view relies on? On Oct 11, 7:14 pm, jax jackma...@gmail.com wrote: ok thanks paul On Oct 11, 3:01 am, Paul Turchenko paul.turche...@gmail.com wrote: If you're going to use them in different projects, you should definitely use separate java library (not a separate android project). After that, simply include reference to that library to your projects. On Oct 9, 4:25 pm, jax jackma...@gmail.com wrote: I have some methods that I would like to put into a helper library so that I can use them in different projects. How should I do this in eclipse. Make a new android project and put a package in it like com.example.helper OR Make a new Java Project and the package com.example.helper OR just put the new package in the existing project Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Creating my own helper classes
hi jbrohan, I am unclear about what you mean here. Can you give a short example? On Oct 12, 8:07 pm, jbrohan jbro...@gmail.com wrote: Resolve them to a View, and pass the View to the method. On Oct 12, 3:02 am,jaxjackma...@gmail.com wrote: But what if I want to include various xml values with my helper classes. For example, if I create a new View control, how will I include the resource files that the view relies on? On Oct 11, 7:14 pm,jaxjackma...@gmail.com wrote: ok thanks paul On Oct 11, 3:01 am, Paul Turchenko paul.turche...@gmail.com wrote: If you're going to use them in different projects, you should definitely use separate java library (not a separate android project). After that, simply include reference to that library to your projects. On Oct 9, 4:25 pm,jaxjackma...@gmail.com wrote: I have some methods that I would like to put into a helper library so that I can use them in different projects. How should I do this in eclipse. Make a new android project and put a package in it like com.example.helper OR Make a new Java Project and the package com.example.helper OR just put the new package in the existing project Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Creating my own helper classes
ok thanks paul On Oct 11, 3:01 am, Paul Turchenko paul.turche...@gmail.com wrote: If you're going to use them in different projects, you should definitely use separate java library (not a separate android project). After that, simply include reference to that library to your projects. On Oct 9, 4:25 pm, jax jackma...@gmail.com wrote: I have some methods that I would like to put into a helper library so that I can use them in different projects. How should I do this in eclipse. Make a new android project and put a package in it like com.example.helper OR Make a new Java Project and the package com.example.helper OR just put the new package in the existing project Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Calling finish() in response to a Broadcast
I have a Service that will send a GAME_OVER broadcast to a number of my activities. When the activities receive this it should call it's finish() method. How do I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Calling finish() in response to a Broadcast
I worked it out using inner classes and java code receivers as opposed to XML. On Oct 11, 7:19 pm, jax jackma...@gmail.com wrote: I have a Service that will send a GAME_OVER broadcast to a number of my activities. When the activities receive this it should call it's finish() method. How do I do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Using Text to Speech (Pico) in 1.6 SDK
Does anyone know how to use the new Pico Text to Speech library in SDK 1.6. I can't seem to find anything about it. Even in the developer section of the android site. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Using Text to Speech (Pico) in 1.6 SDK
great thanks On Oct 11, 1:43 am, Mark Murphy mmur...@commonsware.com wrote: jax wrote: Does anyone know how to use the new Pico Text to Speech library in SDK 1.6. I can't seem to find anything about it. Even in the developer section of the android site. Try: http://developer.android.com/reference/android/speech/tts/package-sum... and: http://android-developers.blogspot.com/2009/09/introduction-to-text-t... -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Creating my own helper classes
I have some methods that I would like to put into a helper library so that I can use them in different projects. How should I do this in eclipse. Make a new android project and put a package in it like com.example.helper OR Make a new Java Project and the package com.example.helper OR just put the new package in the existing project Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Project Idea....Not sure if its possible!
Yes this is possible. You will need to create web service also where user movement is stored. The book I was reading Professional Android Application Development covers how to make the speed application. The application will need to probe a webservice now and then to attain the locations of other users and also submit it's own location and speed data. So basicall you need: 1. Local Android Application 2. Reliable internet connection on running devices (GPRS is fine as long as it is reliable) 3. A central database somewhere that holds all location and speed data...(Maybe a Java Applet). On Oct 9, 8:04 pm, burrkie keith4presid...@hotmail.com wrote: Hi guys thiss is my first time posting and I really have no clue of the capabilties of Android etc so pease bear with me. Ok basically what I would like to do is create an app using gps, which tracks the direction and speed the user is moving. now the next part is the part im not sure if it is possible. I need the app to either track other users movements or recieve info from other users about their movements(directions and speed). The other users would be using the same app but on seperate devices. The users would be within no more than 30 meters apart. Does anybody know if this would be possible, and how difficult it would be if possible? I'm trying to avoid using wifi but if this is not possible I may have to change my idea a bit and look into it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Project Idea....Not sure if its possible!
Sorry Servlet not Applet :p On Oct 10, 10:17 am, jax jackma...@gmail.com wrote: Yes this is possible. You will need to create web service also where user movement is stored. The book I was reading Professional Android Application Development covers how to make the speed application. The application will need to probe a webservice now and then to attain the locations of other users and also submit it's own location and speed data. So basicall you need: 1. Local Android Application 2. Reliable internet connection on running devices (GPRS is fine as long as it is reliable) 3. A central database somewhere that holds all location and speed data...(Maybe a Java Applet). On Oct 9, 8:04 pm, burrkie keith4presid...@hotmail.com wrote: Hi guys thiss is my first time posting and I really have no clue of the capabilties of Android etc so pease bear with me. Ok basically what I would like to do is create an app using gps, which tracks the direction and speed the user is moving. now the next part is the part im not sure if it is possible. I need the app to either track other users movements or recieve info from other users about their movements(directions and speed). The other users would be using the same app but on seperate devices. The users would be within no more than 30 meters apart. Does anybody know if this would be possible, and how difficult it would be if possible? I'm trying to avoid using wifi but if this is not possible I may have to change my idea a bit and look into it... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Using the SAX parser in a static method
i am trying to parse an XML file using SAX. The problem is that I need to make the method Static because I want to run this method inside the onCreate methods of the DatabaseHelper class (Which is a static inner class). This is not really an android issue but a scope issue. The problem is at this line: XmlListHandler listXmlHandler = new XmlListHandler(); Eclipse shows me this error: No enclosing instance of type SpellDroidDbAdapter is accessible. Must qualify the allocation with an enclosing instance of type SpellDroidDbAdapter (e.g. x.new A() where x is an instance of SpellDroidDbAdapter). /* * Insert a List into the database from an XML file * * @param xmlFile a List XML file */ public static void insertNewListFromXML(File xmlFile) { try { /* Get a SAXParser from the SAXPArserFactory. */ SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); /* Get the XMLReader of the SAXParser we created. */ XMLReader xr = sp.getXMLReader(); /* Create a new ContentHandler and apply it to the XML- Reader*/ XmlListHandler listXmlHandler = new XmlListHandler(); //Set the Handler xr.setContentHandler(listXmlHandler); // Parse the xml-data from our URL. xr.parse(xmlFile.getAbsolutePath()); } catch (Exception e) { /* Display any Error to the GUI. */ Log.e(TAG, List Insertion Error, e); //TODO display a toast to the user of the error } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Creating a Lite and Pro version of an application
thanks Justin, I think I will follow this method. Sorry about not searching the forums properly. I was googling for a while but didn't find anything there. On Oct 6, 4:54 am, Justin Anderson janderson@gmail.com wrote: * what's missing from the market is dependencies. * I wholeheartedly agree... * i often had the idea of publishing an app that is just a service for use by other apps ... but the fact that the user needs to manually download the service first sort of rules that out. *Yes and no. It is a little bit of an annoyance, but the programmer who wishes to use your service could look for it and provide a one-button-push method for them to go to the market and install it. My paid key app does just this. When the user tries to launch it, it simply tries to launch the free version of my app. If the free version doesn't exist an exception is thrown and I display a dialog that more or less says AppSwipe! was not found. Please go to the market and install it now The dialog has a button that says Go to market... and when they click on that it goes to the market and pulls up only the application that needs to be installed. It sounds like a lot of work, but really it isn't all that bad. I programmed that functionality in about 20 minutes. Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Mon, Oct 5, 2009 at 3:21 PM, Jeffrey Blattman jeffrey.blatt...@gmail.com wrote: what's missing from the market is dependencies. i often had the idea of publishing an app that is just a service for use by other apps ... but the fact that the user needs to manually download the service first sort of rules that out. if we had dependencies, you could have an app core and then have a free and paid app check that depend on the core. all the checker activity does it set some bit and then launch the core. yes i know that's a lot of hand waving. On 10/5/09 1:55 PM, Steve Oliver wrote: So a user would need to download both the free app, as well as the paid app (which unlocks features in the free app)? Is there a way where a user could download just the paid app? On Mon, Oct 5, 2009 at 1:34 PM, Justin Anderson janderson@gmail.comwrote: The method is to have a main application and an application that acts a key to unlock functionality in the main app. You can't upload two products with the same package to the android market. Doing it the way I described in the other thread allows the main application to contain all the functionality to run in both lite and paid modes. The mode that the application runs in is determined by whether you have the key installed, which of course would have to have a separate package name because you are not allowed to upload two projects with the same package name. The application that acts as a key never even has to run... it just has to exist. Although, in my case, I have my key program set to just launch my main app and quit. Pulling common stuff out into a separate library would work (kind of) but it would not be as easy as my method. Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Mon, Oct 5, 2009 at 2:19 PM, Steve steveoliv...@gmail.com wrote: I don't think the other thread explained how to do this without creating two package names. You would either have to re-name your package each time you published, or you would need two different projects, wouldn't you? Another approach is to try to pull out as much common functionality as you can into a 3rd Java-only project, with each of your projects (paid and free). The tough part is that you can't move anything that references resources into a Java-only project. On Oct 5, 11:58 am, Justin Anderson janderson@gmail.com wrote: I have already asked the same question, and later the solution on another thread. Just do a quick search for code base and you will find out how to do this. If you have done this already, then you can ignore this, but a lot of duplicate questions can be eliminated simply by searching for an answer before posting a new question... Thanks, Justin -- There are only 10 types of people in the world... Those who know binary and those who don't. -- On Sun, Oct 4, 2009 at 7:48 PM, jax jackma...@gmail.com wrote: I want to crete two seperate android applications. 1. A Lite version
[android-beginners] Creating a Lite and Pro version of an application
I want to crete two seperate android applications. 1. A Lite version with limited functionality 2. A upgrade to the lite version (Pro version) with extended functionality (This will cost money) Can someone tell me the best way to approach thisproject setup etc. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---