[android-developers] Re: which is a true Android phone?
The G1s, as far as I know, got an Over-The-Air upgrade to v1.5 when it came out. The only thing that the older hardware precludes you from is testing your app on the newer hardware. The SDK is the same (unless somebody simply did not update their Android version on the phone). On Aug 14, 2:23 am, -v- vishal.changr...@gmail.com wrote: Hi, I am planning to a buy an android phone to test my app for ADC II. But the ones sold by google is a lil too expensive for me so I am thinking of buying one off of Craigslist...but am confused which one to buy... some of them say - Non Android OS..what does that mean? Does it mean my app may not run on it? Also I see there are some HTC G1 for sale..I am presuming that these are an year old...can I use them and upgrade them to latest android? how is the adroid SDK 1.5 related to the Actual Android OS version? Please help. Thanks in advance. -v- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Animation Problem
I'm not sure about the coordinates thing, but if you are trying to use rotateAnimation to rotate something such that it looks like it is spinning in-place, then 0,0 are not the coordinates you want. The coordinates are a 'pivot point'; you could think of them as the 'middle' of the rotation. If you want an object to rotate or spin without moving up/down/left/ right, then what you actually want is: RotateAnimation spin = new RotateAnimation(0.0f, 360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); This gives the middle of the image as the 'pivot' so it doesn't move in an arc. Hope this helps! On Aug 11, 1:59 am, HVT vikramhiman...@gmail.com wrote: Hello All, I'm new to Android and trying to develop an app that has loads of animation. Its a small game. Currently i have a object (image) moving around the canvas. I used animation to animate it around the screen. But the problem here is i dont have the XY coordinates of that object while its animating. I want to get the coordinates of the bitmap whenever i want during the animation. I think if there was some way where i can read the presentation layer probably i could get the cordinates of the object. Please help me guys i'm stuck here now for like a week. My another problem is with rotate animation, i some how dont seem to understand its functionality. I have played with it for a couple of days but no luck, i'm still new to it and dont get anything. The object makes big arcs even if the x,y values are 0,0 and the object jumps around when i try to give it random values. Any help would be highly appreciated. Thanks in advance. HVT --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Can I use the picture of Dev Phone 1 in my app? (copyright question)
I was pointed to http://www.android.com/branding.html when I had questions about some different legal issues. I checked and there isn't anything there regarding the G1 hardware... I guess because T-Mobile or somebody else probably owns the hardware licensing? I doubt anybody is really going to get after you about using a 3D model skinned like a G1, but if you're really worried about it, maybe one of the T-mobile guys who read Android Developers will get back to you on it :) On Aug 11, 3:09 am, hzakimoto hzakim...@gmail.com wrote: Say, if I want the G1 (3D OpenGL model skinned like G1) to be the main character in my game. Will I get into copyright problem? Well this sounds silly I presume. Since the picture of G1 or ADP1 can be found anywhere. And there should be no reason at all to prohibit developer from using the G1 picture. But better safe than sorry so I asked here. I know this type of question should be answered consult a lawyer. But well I don't expect a decisive answer here. Just want to hear your ideas for this type of things. Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: AirplaneMode notifications
Hi Mark, I'm pretty unfamiliar with detecting actual Airplane mode settings, but I do have a potential work-around for you in case you can't get it working the way you're trying to (which, by the way, definitely seems like the -right- way to do it). I've been checking for network connections using code like: ConnectivityManager cm = (ConnectivityManager)getSystemService (Context.CONNECTIVITY_SERVICE); if (cm.getNetworkInfo(cm.TYPE_MOBILE).isConnected()){ //stuff } else if(cm.getNetworkInfo(cm.TYPE_WIFI).isConnected()){ //different stuff } This seems to work fine in my case, but with the application I am working on I actually care whether the user is connected over 3G/2G or Wifi. In your case, you probably just want to get the airplane mode detection working, but I thought I'd mention this in case you end up stuck. Hope it helps! On Aug 10, 10:43 am, Mark Nuetzmann mark.nuetzm...@gmail.com wrote: Hi, I am trying to determine if the device is in airplanemode when my activity starts. I did not see a setting that exposed this but did see a way to set up a broadcast receiver to be notified. After coding the receiver I never see my code getting loaded or called when I put the device into and out or Airplane mode. Here is the code I am using and the setting I placed in my app manifest. If someone could take a look at let me know what I am doing incorrectly I would really appreciate it. thanks. !-- Broadcast Receiver that will process be notified of changes in AirplaneMode -- receiver android:name=com.myapplication.AirplaneModeBroadcastReceiver intent-filter action android:name=android.intent.action.AIRPLANE_MODE_CHANGED / /intent-filter /receiver package com.myapplication; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class AirplaneModeBroadcastReceiver extends BroadcastReceiver { private static final String TAG = AirplaneMode; @Override public void onReceive(Context ctx, Intent intent) { Log.d(TAG, onReceive); // Do something... } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Changing background
I would recommend looking into using AsyncTask to do this (http:// developer.android.com/reference/android/os/AsyncTask.html). You can check against your mp.isPlaying() in the doInBackground portion, use a sleep for some appropriate amount of time if it is still playing (else finish the task), and in onProgressUpdate you can change your color. You can use publishProgress(i); from your doInBackground to pass the iterated color value to your onProgressUpdate to achieve to same color switch functionality you originally wanted. AsyncTask takes a bit to learn, but you'll be glad to have it later! On Aug 9, 11:54 am, androidom saviodom...@yahoo.com wrote: Hi there, I am trying to set the background dynamically as I play music. 1) I am able to set the background using the setBackground (Color.GREEN) method. 2) Then I play a MP3 file (audio) using the MediaPlayer. 3) when I call myPlayer().isPlaying(), I would like to keep changing the background color continiously till the music stops. I tried this way, setContentView(R.layout.main); //startStreamingAudio(); tv = new TextView(this); tv.setBackgroundColor(Color.GREEN); tv.setTextColor(Color.WHITE); tv.setText(Do you hear me!); setContentView(tv); mp = MediaPlayer.create(getApplicationContext(), R.raw.organ_1); mp.start(); while(mp.isPlaying()){ i += 20; tv.setBackgroundColor(Color.rgb(i, 100, 100)); setContentView(tv); } It changes only at the end of the sound file. Can someone help me find the right way towards this ? thanks Di --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Close Application
It really depends on the structure of your app, but one trick you might employ is to launch your various activities with startActivityForResult(intent, ID); and then override onActivityResult to watch for a return value from the activity you launched. You can then make decisions about whether you should call finish() in the original activity, or whether the user just wanted to go back to that original activity without closing the entire app. Again, without knowing the structure of your app or more details, I can't be sure that this is actually going to be helpful to you. If it isn't though, feel free to post some specifics! :) On Aug 10, 2:36 am, Blackmarket pascal.se...@gmail.com wrote: Hi, i want to add an exit button to the menu, but didn't see an easy way to close an application or acces all activities of an application and finish them. Is there an easy approach avaible? Regards, Pascal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Library Reference Error in Eclipse - OpenIntents FileManager
Bump - any thoughts on this? On Aug 6, 12:48 pm, jhoffman keshis...@gmail.com wrote: One other thing I forgot to mention, I checked a few of the strategies posted on Android-Developers in similar threads, but unfortunately none of them have worked for me :( Solutions tried so far were: Restarting Eclipse Performing a 'Clean' Performing a 'Fix Project Properties' Performing a 'Refresh' Messing with the project properties manually (not 100% sure I did this one right) On Aug 6, 12:40 pm, Josh Hoffman keshis...@gmail.com wrote: Hello everyone, thanks for reading! I'm having an issue calling methods from the OpenIntents FileManager class. What I am trying to do is set up my app to open up files of a specific format based on receiving an intent from a program like the OI FileManager. I have set up the intents/filters such that the OI app will launch my app on the emulator, but I instantly crash with: 08-06 19:18:12.362: ERROR/dalvikvm(960): Could not find method org.openintents.filemanager.util.FileUtils.getFile, referenced from method edwardslab.util.MobileMetagenomics.onCreate I have successfully referenced other parts of the OI FileManager project without crash issues, i.e. Intent intent = new Intent(FileManagerIntents.ACTION_PICK_FILE); to do the reverse of what I am working on now (launch the OI file manager from within my own app). Am I missing something here? It seems like Eclipse doesn't know that I want to use a few of the Public Static methods from the OI class; but I'm confused as to why it has no trouble with one of the packages from the OI project while a different one works totally fine. Thank you very much for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Flipping / Rotating TextView (or layout) upside-down
After all was said and done, that last issue appeared to be a matter of RelativeLayout and RotateAnimation not playing as nicely together as I thought. The 'visual' buttons were in a different place than the 'actual' buttons were. I switched to a LinearLayout setup, and things behaved a lot better for me. On Jul 24, 11:27 am, Josh Hoffman keshis...@gmail.com wrote: Hello, I'm trying to find a way to rotate a View, or (more conveniently) an entire layout, upside down and have it stay that way. I found the rotation and animation classes in the SDK, and these come close to what I want, but at the end of the animation I want my Layout to stay rotated; repeating the animation or just flipping back right- side-up doesn't help me with my app unfortunately. The only thing I can think of so far would be to find the source code for the rotate class, and override it such that the ...and then flip it back around to be right-side-up code never happens. I'm not sure exactly where I'd find the original rotate code for reference if I were to do something that extensive however. I've found references online to the full android source - is that basically what I'd be looking at downloading to be able to attempt something like this? Am I missing a simple option on the rotation that would let it just stay put after I rotate it? Any help would be very much appreciated! Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: left handed user
Agreed! The orientation issues were a problem for me in an app I recently developed :( It ends up working out okay, but if there were support for either orientation, I think I could've made the app a bit cooler... On Jul 29, 2:26 pm, Sophie shkass...@gmail.com wrote: Hi developers, As I'm just an Android user, I might be illegally here. But I just found out that being left handed, I have a slight problem with my recently purchased HTC Magic. I have searched Market already, butcouldnotfindanything to help me. My problem is this: as I am left handed, I like to turn the phone to landscape orientation with the buttons to the left (turning it clockwise). As you will probably all know, this won't work. To get landscape you have to turn the phone counter clockwise. Would it be possible for one of you to develop something to enable left handed people to turn the phone to landscape like they would intuitively do, that is clockwise? 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: Library Reference Error in Eclipse - OpenIntents FileManager
One other thing I forgot to mention, I checked a few of the strategies posted on Android-Developers in similar threads, but unfortunately none of them have worked for me :( Solutions tried so far were: Restarting Eclipse Performing a 'Clean' Performing a 'Fix Project Properties' Performing a 'Refresh' Messing with the project properties manually (not 100% sure I did this one right) On Aug 6, 12:40 pm, Josh Hoffman keshis...@gmail.com wrote: Hello everyone, thanks for reading! I'm having an issue calling methods from the OpenIntents FileManager class. What I am trying to do is set up my app to open up files of a specific format based on receiving an intent from a program like the OI FileManager. I have set up the intents/filters such that the OI app will launch my app on the emulator, but I instantly crash with: 08-06 19:18:12.362: ERROR/dalvikvm(960): Could not find method org.openintents.filemanager.util.FileUtils.getFile, referenced from method edwardslab.util.MobileMetagenomics.onCreate I have successfully referenced other parts of the OI FileManager project without crash issues, i.e. Intent intent = new Intent(FileManagerIntents.ACTION_PICK_FILE); to do the reverse of what I am working on now (launch the OI file manager from within my own app). Am I missing something here? It seems like Eclipse doesn't know that I want to use a few of the Public Static methods from the OI class; but I'm confused as to why it has no trouble with one of the packages from the OI project while a different one works totally fine. Thank you very much for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Flipping / Rotating TextView (or layout) upside-down
Romain, the solution you gave me works perfectly for rotating the layout upside-down. Unfortunately, I now have another problem! After the layout has been rotated, the Views no longer respond to clicks and long clicks. Inside of the RelativeLayout I am rotating, I have a textView that I allow the user to edit when they perform a long press. Is there any way for me to still allow for this functionality, while presenting the textView upside-down? If not, I guess I can just add an additional right-side-up button to replace the onLongClickListener when in the upside-down view mode, but this strikes me as something that probably should work. I feel like I may be missing something simple again. Thanks in advance for any tips! On Jul 26, 3:51 pm, Romain Guy romain...@google.com wrote: All you have to do is set the fillAfter property of the animation to true. On Fri, Jul 24, 2009 at 11:27 AM, Josh Hoffmankeshis...@gmail.com wrote: Hello, I'm trying to find a way torotateaView, or (more conveniently) an entire layout, upside down and have it stay that way. I found the rotation and animation classes in the SDK, and these come close to what I want, but at the end of the animation I want my Layout to stay rotated; repeating the animation or just flipping back right- side-up doesn't help me with my app unfortunately. The only thing I can think of so far would be to find the source code for therotateclass, and override it such that the ...and then flip it back around to be right-side-up code never happens. I'm not sure exactly where I'd find the originalrotatecode for reference if I were to do something that extensive however. I've found references online to the full android source - is that basically what I'd be looking at downloading to be able to attempt something like this? Am I missing a simple option on the rotation that would let it just stay put after Irotateit? Any help would be very much appreciated! Thank you! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Flipping / Rotating TextView (or layout) upside-down
Yeah my apologies on the double-post... I wasn't aware of the moderation on new posters when I tried to post. I thought maybe the internet ate my first post. Really sorry to double post, but thank you both very much for your help, I'll try those approaches now! On Jul 27, 2:49 am, Jeff Sharkey jshar...@android.com wrote: Ugh double-post. I just responded in the other thread with an alternative approach that doesn't require animations. j On Sun, Jul 26, 2009 at 3:51 PM, Romain Guyromain...@google.com wrote: All you have to do is set the fillAfter property of the animation to true. On Fri, Jul 24, 2009 at 11:27 AM, Josh Hoffmankeshis...@gmail.com wrote: Hello, I'm trying to find a way to rotate a View, or (more conveniently) an entire layout,upside downand have it stay that way. I found the rotation and animation classes in the SDK, and these come close to what I want, but at the end of the animation I want my Layout to stay rotated; repeating the animation or just flipping back right- side-up doesn't help me with my app unfortunately. The only thing I can think of so far would be to find the source code for the rotate class, and override it such that the ...and then flip it back around to be right-side-up code never happens. I'm not sure exactly where I'd find the original rotate code for reference if I were to do something that extensive however. I've found references online to the full android source - is that basically what I'd be looking at downloading to be able to attempt something like this? Am I missing a simple option on the rotation that would let it just stay put after I rotate it? Any help would be very much appreciated! Thank you! -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- Jeff Sharkey jshar...@android.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 -~--~~~~--~~--~--~---