[android-developers] Re: Service not able to download network data while in standby
As the others have said, use the AlarmManager. A couple of other things which may be of use to you if your process takes a long time Use the PowerManager to get and aquire a WakeLock - this will stop the phone from going to sleep whilst you're doing stuff. Use the WifiManager to get and aquire a WifiLock - this will keep the wireless connected whilst you're doing stuff. Don't forget to release the WakeLock and WifiLock when you're done. On Dec 14, 5:54 pm, ChisterNordvik cnord...@gmail.com wrote: Hi! I have a service polling data at regular time intervals and this works great except when the phone goes into standby. Then the service never runs the timer thread and it never receives data. How does the SMS/ Email application do this since I get those notifications while in standby? When I did a Windows Mobile application this was just the same, and I had to resort to a third party timer (SDF) to solve this -Christer --~--~-~--~~~---~--~~ 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: Using WifiManager or WifiConfiguration.Status
It works fine for me I assume you're using the permission uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission On Mar 19, 10:53 am, wafa wafa_ga...@hotmail.com wrote: Hi all, Does anyone have an idea how use those Class(WifiManager or WifiConfiguration.Status) this is my code but doesn't work even if the manifestxml has all the necessary permession WifiManager manager= (WifiManager) getSystemService (Context.WIFI_SERVICE); if( manager.isWifiEnabled()){ ..} else{ . } Thx --~--~-~--~~~---~--~~ 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 make my application to be restarted after the phone is powered-on again?
Thanks for the code in the other thread. Very useful. On Mar 30, 12:39 am, Mark Murphy mmur...@commonsware.com wrote: pperotti wrote: Thanks Mark, I have just read also the response in the last update of your latest book. That was fast! ;-) -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books.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 -~--~~~~--~~--~--~---
[android-developers] Re: Save an mp3 from a remote site
Sure, Something like //Where the file comes from URL sourceURL = new URL(address); URLConnection conn = sourceURL.openConnection(); InputStream inStream = sourceURL.openStream(); // Where the file is going to go FileOutputStream outStream= new FileOutputStream(sdcard/file.mp3); //a read buffer byte[] bytes = new byte[20480]; //read the first chunk int readBytes = file.read(bytes); //read the rest while (readBytes 0){ //Write the buffered chunk to the file outStream.write(bytes, 0, readBytes); readBytes = file.read(bytes); } inStream.close(); outStream.close(); should do it. I've typed that more or less by hand so it's missing error checking etc. On Mar 31, 8:10 am, idev ideveloper...@gmail.com wrote: Hi I am able to stream an mp3 at real time on my android phone. I wanted to know if it is possible to save an mp3 file residing on a remote location to my SD card. Any heads up is greatly appreciated. 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 progress bar before going to next activity
Have a look at the API Demos that are on the emulator Views Progress Bar Dialogs might be a good place to start On Mar 30, 1:03 pm, amx ameyashe...@gmail.com wrote: Hi All, My application involves doing some calculation on the first activity and sending the information to the second activity. So while the calculation is being done , I want to show a activity / progress / busy indicator on the first activity , before going to the second one. Is there any way of doing so, or an sample code that does the same. I was also looking out for the same by calling the calculation method after a delay so that the progress bar is shown first before the calculation is done , but this has also failed. Any suggestion or help will be appreciated from you guys. 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: New app update force closes immediately on startup!
I was under the impression that if you have an app installed without protection and then update to a version with protection you get force- closes. I have no idea if it's been confirmed though, sorry. On Mar 31, 7:43 pm, rcs rsar...@gmail.com wrote: Hello all... This morning, we updated our app on AM; this was our first update since release of Android 1.1. In testing, on the emulator and with the signed .apk installed on our handsets, everything appeared to be working fine; however, we uploaded to AM, selected the new CopyProtection option, and published. Wertago disappeared for about 30 minutes, and as soon as it reappeared, we downloaded, installed, and started. Immediately upon starting, we got a force close and were never able to get the app started at all. We've seen some discussions about similar app behavior experienced by other developers, and there was mention of likely bugs in AM or in the Copy Protection scheme. Has this been confirmed by Google, is there any communication from them about a coming fix, or anything like that? Here's a little detail about what we gather from the logcat output. Our app appears to fail upon attempting to open/create the database; the relevant line is: tmpDatabase = instance.openOrCreateDatabase(SEARCH_DATABASE_NAME, Context.MODE_PRIVATE, null); which throws the sqlite3_open_v2 error. Any information, or even just commiseration, would be appreciated. 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: Save an mp3 from a remote site
Good point, I forgot about the MediaScanner. One thing to note about using ACTION_VIEW is although you get the nice mediaplayer UI it doesn't keep playing when you change Activities e.g. go back to the home screen. On Mar 31, 3:57 pm, Jean-Baptiste Queru j...@android.com wrote: No problem playing an MP3 from the SD card. You should be able to ACTION_VIEW the file:/// URI directly, or invoke the media scanner on it and ACTION_VIEW the resulting content:// URI (added bonus for the second method is that the file will immediately show up in the music player as well). JBQ On Tue, Mar 31, 2009 at 7:08 AM, Streets Of Boston flyingdutc...@gmail.com wrote: This is just copying the file. The question remains if you can play it or not... :=) I have not looked into this at all, but DRM could prevent the mp3 from playing. On Mar 31, 9:55 am, iDeveloper ideveloper...@gmail.com wrote: Thanks a ton. Didn't know android allowed saving to mp3 directly unlike an iphone. On 31-Mar-09, at 5:32 PM, MrChaz wrote: Sure, Something like //Where the file comes from URL sourceURL = new URL(address); URLConnection conn = sourceURL.openConnection(); InputStream inStream = sourceURL.openStream(); // Where the file is going to go FileOutputStream outStream= new FileOutputStream(sdcard/file.mp3); //a read buffer byte[] bytes = new byte[20480]; //read the first chunk int readBytes = file.read(bytes); //read the rest while (readBytes 0){ //Write the buffered chunk to the file outStream.write(bytes, 0, readBytes); readBytes = file.read(bytes); } inStream.close(); outStream.close(); should do it. I've typed that more or less by hand so it's missing error checking etc. On Mar 31, 8:10 am, idev ideveloper...@gmail.com wrote: Hi I am able to stream an mp3 at real time on my android phone. I wanted to know if it is possible to save an mp3 file residing on a remote location to my SD card. Any heads up is greatly appreciated. Thanks.- Hide quoted text - - Show quoted text - -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~-~--~~~---~--~~ 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: Need for backup functionality
I went with plan B and simple copied the database file it lives in data/data/package name/databases/database name if i remember rightly. On Apr 2, 9:23 pm, droozen droozenr...@gmail.com wrote: So I've come to a need to backup data in my application, so a user can safely restore the important data. I had an idea about how to go about this, but relatively it's a lot of work just to test if it would work, so it'd be nice to get a thumbs up or thumbs down to my plan from someone who has tried it, or an alternate way to do it. I was thinking that I could compose an email that the user could send to himself with a link in it like: content://mycontentprovider/databackup/the data, possibly in a delimited format (comma-separated) And when the user would click the link it would pull up my content provider that would take all the data from the link and restore it into my database. Alternate idea: save the database file to another machine or email, but I wouldn't know how to go about doing this. Can I make my application attach the database to an email that could be imported? Is it easy to make the user hook up a USB cord to a computer for them to manually backup and reload the database file? --~--~-~--~~~---~--~~ 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: Passing ArrayList across actvities
Assuming MyList is an object you'll need to make it implement Parcelable and Serializable There are then 2 functions that you'll need to set up this is used to re-create the object at it's destination: public static final Parcelable.CreatorMyList CREATOR = new Parcelable.CreatorMyList() { public MyList createFromParcel(Parcel in) { MyList foo = new MyList(); foo.bar = in.readString(); return foo; } public MyList[] newArray(int size) { return new MyList[size]; } }; and this is used to actually parcel the object in the first place public void writeToParcel(Parcel arg0, int arg1) { arg0.writeString(this.bar); } I'm pretty sure you need to put items into the parcel in the same order that you get them out, but don't quote me on that. On Apr 7, 6:07 am, a...@lg l.prade...@gmail.com wrote: Hi all, I have an ArrayListMyList aList in an activity. I would like to send this data to another activty. Such that, ArrayListMyList aList; Intent intent = new Intent(); intent.setClass(mainactivity.this, newActivity.class); intent.putExtra(MyList, aList ); startActivity(intent); Will this work out..?? On the receiving activity, Intent i = getIntent(); newList = (ArrayListMyList) i.getSerializableExtra(MyList); But this gets me no where ERROR..!!! Please help me..how to approach this problem... My intention is to share this List between activities... --~--~-~--~~~---~--~~ 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: help......i am a Beginners
You need to make sure that there is text in the TextEdits before calling parseDouble because it will throw an exception otherwise. Something like: String heightText = fieldheight.getText().toString(); if( heightText != null !heightText.equals()){ // do stuff here } should work. On Apr 13, 3:11 pm, yoyo zjw...@gmail.com wrote: package com.androidyo.firstbmi; import java.text.DecimalFormat; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class Bmi extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button=(Button)findViewById(R.id.submit); button.setOnClickListener(calcBMI); } private OnClickListener calcBMI = new OnClickListener() { public void onClick(View v) { DecimalFormat nf=new DecimalFormat(0.00); EditText fieldheight=(EditText)findViewById(R.id.height); EditText fieldweight = (EditText)findViewById(R.id.weight); double height = Double.parseDouble(fieldheight.getText().toString ()); height=height/100; double weight = Double.parseDouble(fieldweight.getText().toString ()); TextView result = (TextView)findViewById(R.id.result); TextView fieldsuggest = (TextView)findViewById(R.id.suggest); if(height=0||weight=0) result.setText(input wrong); else { double BMI = weight / (height * height); result.setText(Your BMI is +nf.format(BMI)); if(BMI25){ fieldsuggest.setText(R.string.advice_heavy); }else if(BMI20){ fieldsuggest.setText(R.string.advice_light); }else{ fieldsuggest.setText(R.string.advice_average); } } } }; } MY question: when runing the app .if i input nothing .it will force close how can i fix it??? please give me a hang...i am a beginners.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: Map not Displaying, Just tiles only
Have you added the INTERNET permission? On Apr 13, 6:17 pm, nithin warier nithin.war...@gmail.com wrote: Hi, I tried to display map in emulator. But its showing just tiles only. I am attaching the screenshot and the log message is like this. 04-13 22:30:06.934: INFO/ActivityManager(48): Start proc org.me.map for activity org.me.map/.MapAct: pid=615 uid=10022 gids={3003} 04-13 22:30:06.944: DEBUG/dalvikvm(607): VM cleaning up 04-13 22:30:06.954: DEBUG/dalvikvm(607): LinearAlloc 0x0 used 541500 of 4194304 (12%) 04-13 22:30:06.976: ERROR/dalvikvm(607): pthread_setspecific failed, err=22 04-13 22:30:07.425: INFO/System.out(615): Setting locale to en_US 04-13 22:30:07.466: WARN/Maps_Persistence(615): Couldn't find file: /data/data/org.me.map/files/DATA_Preferences 04-13 22:30:07.545: INFO/jdwp(615): received file descriptor 27 from ADB 04-13 22:30:07.645: WARN/Maps_Persistence(615): Couldn't find file: /data/data/org.me.map/files/DATA_Tiles 04-13 22:30:07.675: WARN/Maps(615): Couldn't restore map info, data == null 04-13 22:30:07.995: INFO/MapActivity(615): Handling network change notification:CONNECTED 04-13 22:30:08.015: ERROR/MapActivity(615): Couldn't get connection factory client 04-13 22:30:08.194: INFO/ActivityManager(48): Displayed activity org.me.map/.MapAct: 1400 ms Please tell whats wrong with this, My source code is very simple, I ididnt try anything special, public class MapAct extends MapActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } } Thanks Nithin nithinwarier.blogspot.com +919739146701 map.bmp 3112KViewDownload --~--~-~--~~~---~--~~ 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: Persistant Variables
Take at look at on onSaveInstanceState() You can use that to save things into the bundle that is passed to onCreate() On Apr 13, 7:26 pm, Kirk kirk.mora...@gmail.com wrote: I have an activity that responds to the accelerometer. When the device is rotated, a different layout is displayed based on whether the phone is portrait or landscape. I notice, however, that each time the phone is rotated, the onCreate method is called and all of my instance variables are reset. Is there any way to make the values of these variables persists? Thanks, Kirk --~--~-~--~~~---~--~~ 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 validate data being entered into an EditText control?
Could you could create your own KeyListener and pass it into the TextView via setKeyListener()? On Apr 13, 7:02 pm, Videoguy puri_mall...@yahoo.com wrote: Hi I have an EditText control to accept IP address fields. Its xml input attribute allows everything else except IP addresses. How to make the control accept dotted IP quad addresses only? Thanks Videoguy --~--~-~--~~~---~--~~ 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: Persistant Variables
I think that there is a permission for saying that you will handle it and another event that you can hook. But I've not explored those :) On Apr 13, 8:49 pm, Kirk - Actual Metrics kirk.mora...@gmail.com wrote: Thanks that works great. I feel kind of stupid for not figuring that out on my own now. I do think it's silly for onCreate to be called again on rotate; there should be an onOrientationChange event or something. Kirk On Apr 13, 11:31 am, MrChaz mrchazmob...@googlemail.com wrote: Take at look at on onSaveInstanceState() You can use that to save things into the bundle that is passed to onCreate() On Apr 13, 7:26 pm, Kirk kirk.mora...@gmail.com wrote: I have an activity that responds to the accelerometer. When the device is rotated, a different layout is displayed based on whether the phone is portrait or landscape. I notice, however, that each time the phone is rotated, the onCreate method is called and all of my instance variables are reset. Is there any way to make the values of these variables persists? Thanks, Kirk --~--~-~--~~~---~--~~ 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: Early Look Android 1.5 SDK
Great news, It's good to be able to see what's coming before it gets to the consumers but damn, it looks like this is not going to upgrade smoothly. hey ho. On Apr 14, 12:30 am, Xavier Ducrohet x...@android.com wrote: Hello developers! I'm pleased to announce the release of an early look of the Android 1.5 SDK. More information and download link at:http://android-developers.blogspot.com/2009/04/getting-ready-for-andr... Have fun! Xav -- Xavier Ducrohet Android Engineer, 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] Curious debugging problem
I'm getting a force close on a real device but I can't replicate it on the emulator which means I can't find out why it's crashing. For some reason the debugger never attaches when I try and debug on the actual device. I'm running Vista and SDK 1.1 Any and all help welcome :) --~--~-~--~~~---~--~~ 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: Curious debugging problem
Great! I didn't hzve the manifest entry. Thanks On Apr 16, 7:42 pm, Al alcapw...@googlemail.com wrote: Forgot to mention, you should be able to read logcat messages from the device. Inside Eclipse and also from terminal/command prompt: adb -d logcat. It should give you a trace of where the crash happened and why. On Apr 16, 7:41 pm, Al alcapw...@googlemail.com wrote: On Apr 16, 6:13 pm, MrChaz mrchazmob...@googlemail.com wrote: I'm getting a force close on a real device but I can't replicate it on the emulator which means I can't find out why it's crashing. For some reason the debugger never attaches when I try and debug on the actual device. For debugging on a real device, you have to enable it under Settings-Applications and also turn on debugging in the application's manifest. E.g. application . debuggable=true . /application I'm running Vista and SDK 1.1 Any and all help welcome :) --~--~-~--~~~---~--~~ 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] Blank screen when switching activities
Hey, I've got a basic list activity with a few images that when you select one starts a new activity with a SurfaceView (based on the Lunar Lander sample). Some times the screen is just blank, from some debugging I can see that the background .png is being loaded and doDraw() is being called by the activity doesn't display anything for anything from 4 to 20 seconds. Other times the game activity is loaded just fine. I assumed it was some kind of garbage collection problem but I can't see anything in LogCat and the second activity is actually loaded, just not displayed for some reason. 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: How To Programmatically Turn On/Off WIFI?
Add uses-permission android:name=android.permission.CHANGE_WIFI_STATE/ uses-permission uses-permission android:name=android.permission.ACCESS_WIFI_STATE/ uses-permission to the manifest file On Sep 16, 4:36 am, !oEL runzhou...@gmail.com wrote: Hi, Second question of the day, how do I programmatically turn on/off WIFI? Currently I'm having something like this: _iWifi.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE); if (!wm.isWifiEnabled()) { wm.setWifiEnabled(true); } else { wm.setWifiEnabled(false); } } }); Where _iWifi is a button instant (of course...) Now, the problem is that it tells me there is a Security Exception occurred, I guess I have no permission to access this. I'm sure a firmware key is not needed in this case (unlike my previous question regarding reboot action), so what is the proper way of doing this? Please help, thank you in advance :D --~--~-~--~~~---~--~~ 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] Quick Text to Speech example
Saw a couple of posts from people looking for info on the new text to speech library so I had a whirl at getting it running. Seems to work without any kind of permissions or anything - took about 5 minutes, I must say I'm really impressed! I'm sure this probably isn't best practice but it works :) public class Traffic extends Activity implements OnInitListener { TextToSpeech _tts; boolean _ttsActive = false; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public void onPause(){ super.onPause(); try{ // Stop talking when we lose focus if (_tts != null){ _tts.stop(); _ttsActive = false; } }catch(Exception e){} } @Override public void onResume(){ super.onResume(); // Create our text to speech object. _tts = new TextToSpeech(getApplicationContext(), this); } @Override public void onDestroy(){ super.onDestroy(); try{ // We're closing down so kill it with fire. if (_tts != null){ _tts.shutdown(); _tts = null; } powerLock.release(); } catch(Exception e){} } @Override public void onInit(int status) { // If the TTS init is successful set a flag to say we can be used; say hello if (status == TextToSpeech.SUCCESS){ _ttsActive = true; _tts.speak(Hello world. mmm donuts, TextToSpeech.QUEUE_FLUSH, null); } } } --~--~-~--~~~---~--~~ 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: OpenGL 2D Game Framework
Wow, thanks. I look forward to checking this out. On Sep 18, 2:08 pm, rich...@stickycoding.com rich...@stickycoding.com wrote: I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports: # Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration The code is athttp://code.google.com/p/rokon/ Again, I'd very much appreciate advice or help with any bugs you can see, 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: MyLocationOverlay causing crash in 1.6 (Donut)
Well if they will install a non-released version of the OS then that's to be expected. On Sep 25, 10:04 pm, CaptainSpam captains...@gmail.com wrote: Recently, two independent users with 1.6 (Donut) on their phones have informed me that my app crashes after it enters a MapView, just as soon as MyLocationOverlay obtains its first location fix. I have seen it do so with one of them, in fact. However, when I asked for a logcat, what they sent me seems to indicate the crash originated from an uncaught ClassCastException thrown from within MyLocationOverlay itself, not from my code. Worse, I tried running this on the 1.6 emulator and couldn't make it crash (I don't have 1.6 on my actual phone yet), so I am completely lost with this and unsure if it's something odd they were doing on their phones or something I will have to worry about when 1.6 gets rolled out to more people. One user has tried uninstalling/reinstalling the app numerous times, as well as disabling Dalvik-Cache, all to no avail. This app works perfectly on both 1.1 and 1.5 phones. I also tried recompiling the app explicitly using the 1.6 SDK, and it still crashed (as per the user I talked to). Is there anything I would need to consider with regards to MyLocationOverlay when upgrading to 1.6? Thanks in advance! -- Nicholas Killewald What follows is the logcat I received from one user (apologies for any formatting problems). I would provide a code snippet, but since the exception didn't come from my code, I'm not sure what I would need to paste. 09-22 11:38:16.106 I/ActivityManager( 158): Displayed activity net.exclaimindustries.geohashdroid/.MainMap: 2846 ms (total 2846 ms) 09-22 11:38:16.767 D/libgps ( 158): PDSM_PD_EVENT_BEGIN 09-22 11:38:16.767 D/GpsLocationProvider( 158): Acquiring wakelock 09-22 11:38:16.866 D/libgps ( 158): PDSM_PD_EVENT_COMM_BEGIN 09-22 11:38:16.876 D/libgps ( 158): calling sAGpsStatusCallback GPS_REQUEST_AGPS_DATA_CONN 09-22 11:38:16.916 D/libgps ( 158): qct_agps_data_conn_open: epc.tmobile.com 09-22 11:38:16.916 D/libgps ( 158): DeferredActionThread calling send_pdsm_atl_post_event PDSM_ATL_EVENT_OPEN_SUCCESS epc.tmobile.com 09-22 11:38:17.501 D/libgps ( 158): PDSM_PD_EVENT_COMM_CONNECTED 09-22 11:38:17.926 D/libgps ( 158): PDSM_PD_EVENT_GPS_BEGIN 09-22 11:38:18.336 D/libgps ( 158): PDSM_PD_EVENT_COMM_DONE 09-22 11:38:19.088 D/libgps ( 158): calling sAGpsStatusCallback GPS_RELEASE_AGPS_DATA_CONN 09-22 11:38:19.088 D/libgps ( 158): qct_agps_data_conn_closed 09-22 11:38:19.216 D/dalvikvm( 730): GC(0) freed 8209 objects / 611880 bytes in 109ms 09-22 11:38:19.966 D/NetworkLocationProvider( 158): getLocation(): falling back to cell 09-22 11:38:20.126 I/ActivityManager( 158): Start proc com.google.android.apps.maps:LocationFriendService for service com.google.android.apps.maps/ com.google.googlenav.friend.android.LocationFriendService: pid=750 uid=10025 gids={3003} 09-22 11:38:20.366 I/Maps.MyLocationOverlay( 730): Running deferred on first fix: net.exclaimindustries.geohashdroid.MainMap $initiallocationadjus...@439ec528 09-22 11:38:20.566 I/ActivityManager( 158): Process com.android.mms (pid 614) has died. 09-22 11:38:20.576 D/AndroidRuntime( 730): Shutting down VM 09-22 11:38:20.576 W/dalvikvm( 730): threadid=3: thread exiting with uncaught exception (group=0x4001e210) 09-22 11:38:20.576 E/AndroidRuntime( 730): Uncaught handler: thread main exiting due to uncaught exception 09-22 11:38:20.636 E/AndroidRuntime( 730): java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable 09-22 11:38:20.636 E/AndroidRuntime( 730): at com.google.android.maps.MyLocationOverlay.getLocationDot (MyLocationOverlay.java:180) 09-22 11:38:20.636 E/AndroidRuntime( 730): at com.google.android.maps.MyLocationOverlay.drawMyLocation (MyLocationOverlay.java:561) 09-22 11:38:20.636 E/AndroidRuntime( 730): at com.google.android.maps.MyLocationOverlay.draw(MyLocationOverlay.java: 511) 09-22 11:38:20.636 E/AndroidRuntime( 730): at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45) 09-22 11:38:20.636 E/AndroidRuntime( 730): at com.google.android.maps.MapView.onDraw(MapView.java:476) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.View.draw (View.java:6274) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.ViewGroup.drawChild(ViewGroup.java:1526) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.ViewGroup.drawChild(ViewGroup.java:1524) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1256) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.view.View.draw (View.java:6277) 09-22 11:38:20.636 E/AndroidRuntime( 730): at android.widget.FrameLayout.draw(FrameLayout.java:352) 09-22 11:38:20.636 E/AndroidRuntime(
[android-developers] Re: Is it possible to upgrade HTC Magic G2 from 1.5-Cupcake to 1.6-Donut ?
At some point, when 1.6 is finished, the update will be pushed to your phone and it will ask you if you want to update. Otherwise I think you can either flash your phone or apply the update manually. On Sep 29, 1:09 pm, Kasmoori Bindu bindukasmo...@gmail.com wrote: Hi, I am currently using HTC Magic G2 H/W with Android 1.5 Cupcake; I am planning to upgrade it to 1.6 Donut. Is it possible? if so, what is the procedure to upgrade. I need this information urgently. Could anyone please respond. Thanks Regards, Bindu --~--~-~--~~~---~--~~ 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 Game Framework ?
Rokon looks pretty good and sounds pretty much like what you're looking for. You'll never be able to avoid writing the game loop but at least Rokon removes a whole bunch of the engine code. On Oct 5, 10:57 pm, vetch oldpete...@gmail.com wrote: I do not know if Rokon is good or great. I looked through his code - for me it looks like early alpha stage. Besides, it has licensing issues, so I prefer to writing my own, that I really understand. I hope Google knows how badly Android needs embedded game framework. On 5 Paź, 23:43, Dan Sherman impact...@gmail.com wrote: But its a community effort... The guy from Rokon was on here looking for help on his (very well designed) game engine, could be very neat if it got some power behind it. Look at the iphone (as hopefully a decent example), theres not much there in terms of game frameworks. Someone ported cocos2d which ended up doing quite well. XNA is a bad example, as it was built for something that only does games, and has been since ported to other places. Google doesn't build games... - Dan On Mon, Oct 5, 2009 at 5:34 PM, vetch oldpete...@gmail.com wrote: very funny :) but I think, you did not understand my point. I think about game engine framework embedded in SDK. Google done great job with UI framework, hardware interfaces and others, so I think, creating another high level framework for games, should not be a problem for them. On 5 Paź, 23:25, Dan Sherman impact...@gmail.com wrote: http://lmgtfy.com/?q=android+game+framework On Mon, Oct 5, 2009 at 5:17 PM, vetch oldpete...@gmail.com wrote: Me, and I think, many other developers, always tried to write some game. Problem with a game, is a complexity of technic stuff. Complexity, means learning. Learning is great, but takes time. I think, Android needs a game framework. Something like SDL or more, XNA from Microsoft. Of course, we can use Canvas to draw, but it is slow. We can use OpenGL, but after two days of learning I still do not know how to draw f** background. Of course, I will do that. Some day :) But state and flags-ful OGL interface is really hard to understand if you go from wonderful world of objective thinking. I just want to focus on creating art, not wondering how to create tools for that. I'm worrying, really worring about Android and games. M$ has XNA, porting it to Zune with Tegra. After that, XNA will come to WinMo. If you ever used C# and XNA, you know, how simple and great it is. What does it mean ? Thousands of games for Microsoft Mobile Junk and still no great games for Android. Worst. Many Android developers will go to WinMo for XNA. Many games will be easily ported from Xbox Arcade too. And we will be wasting time, wondering, how to get 25fps from Canvas or OpenGL. Without sound. Now, I think, is the time to do something with that. Android really needs something like XNA, to allow us producing games without all that technic stuff like OpenGL, game loops with managing threads, times, buffers, right pixel format settings and others. What you think about official game framework for Android ? Is Google working on something like 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 -~--~~~~--~~--~--~---
[android-developers] Splintering of the Market
Having just received an e-mail from the Google about up-coming changes to the market I was wondering what other people thought of it. The bit that I don't like the sound of is: First, we have added the ability to target applications by carrier in all countries. For example, if you are showing your app in the United States, you can now choose among Sprint, T-Mobile, and Verizon Wireless. The deliberate splintering of the market by allowing carriers to essentially have own market with their own exclusive apps is a terrible idea in my opinion. It's going to make this confusing and annoying for users who see their friends using software on an identical phone and operating system but are unable to use it themselves. --~--~-~--~~~---~--~~ 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: paid apps
It seems that a lot of US cards don't allow foreign currency purchases so if you application isn't in dollars they can't buy it. On Oct 16, 1:08 am, Andrei gml...@gmail.com wrote: For paid apps on average there is like 15 - 20% declined credit card rate, why is it so high? The message is: The authorization of the customer's credit card failed --~--~-~--~~~---~--~~ 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: Google: please change your release process
That's almost worse than being apparently incompetent. Assuming the rumours around Droid are right it's going to be packing openGL ES 2 which is not 100% compatible with 1.0 and who knows what other changes there will be with the different graphics chip in there. Personally I feel like there are too many differing devices and vendor specific sub-versions at this point On Oct 26, 9:30 pm, wimbet wim...@gmail.com wrote: If Google likes your app, you can get early access to the Android 2.0 code. http://androidandme.com/2009/10/news/google-hand-picks-developers-for... --~--~-~--~~~---~--~~ 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: Google: please change your release process
That's a slippy slope to start on JP, not long until we're building for vendor specific custom OS's and then versions of those OS's. Say what you will about Apple but having a super tight target platform makes everyones life so much easier. Heck, just look at the dominance of consoles. roll on SenseUI build MotoBlur build Vanilla build On Oct 26, 11:54 pm, JP joachim.pfeif...@gmail.com wrote: Thinking about this more I suppose I'll issue Verizon-only releases, and solicit the input from users to find out if and how 2.0 on Moto breaks the apps. Geez we're getting pushed into pretty shitty practices here, or perhaps that's the acceptable standard now. On Oct 26, 4:38 pm, momo regist...@gmail.com wrote: I can't agree more. Release beta SDKs for each of your releases for developers or any developers who already has an application in the Market. As changes are being implemented, update the beta SDKs to new versions. This way developers are GIVEN MORE TIME to verify that their apps work. Sigh sometimes I feel the Android team is run very poorly. On Oct 26, 4:22 pm, JP joachim.pfeif...@gmail.com wrote: If this is true... insulting to those that conduct open source development truly open source. Makes me consider to change the licensing of the stuffs I've released on Apache 2.0 back to GPL. On Oct 26, 2:30 pm, wimbet wim...@gmail.com wrote: If Google likes your app, you can get early access to the Android 2.0 code. http://androidandme.com/2009/10/news/google-hand-picks-developers-for... --~--~-~--~~~---~--~~ 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 2.0
Yeah it would but given it's their job to support the community and the community is demanding more maybe they should start to look at their practices. On Oct 26, 11:41 pm, Marco Nelissen marc...@android.com wrote: On Mon, Oct 26, 2009 at 4:29 PM, Frank arro...@gmail.com wrote: Why is the SDK for all android releases always so late on arrival? Developers usually have barely 1-2 weeks to prepare before the release is dropped into consumer's hands. With Android 2.0 coming out soon on the Droid, set to be announced in October 28th and then possibly releasing in November, the developers are once again VERY late in the game. I know it takes a lot of work in getting an SDK with all the documentation out. Yes, it does. But maybe release a beta SDK just for developers first? As changes are implemented, newer beta SDKs are provided? At Wouldn't that be even *more* work? least now developers are given MORE time to optimize and verify that their apps still work on the new version release. --~--~-~--~~~---~--~~ 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: Multitouch support in Android 2.0
Thanks for the info, Wouldn't this Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. need to be ID of 0? Or am I mis-understanding the purpose of the UP action? On Oct 27, 4:45 pm, Dianne Hackborn hack...@android.com wrote: It's basically just some new APIs on MotionEvent: http://developer.android.com/reference/android/view/MotionEvent.html http://developer.android.com/reference/android/view/MotionEvent.htmlHmmm and I'm not sure why, but in the doc all of those new APIs are in gray, so they should be easy to see. :) Or here is the API diff report: http://developer.android.com/sdk/api_diff/5/changes.html http://developer.android.com/sdk/api_diff/5/changes.htmlI see that I didn't get around to writing documentation in MotionEvent on the way multi-touch works; sorry about that. Basically there are new actions that tell you when additional fingers go down and up, and each MotionEvent you receive allows you to query for the number of pointers in the event as well as the x, y, size, and pressure of each of those points (and the historical data for all those points as well if you want to collect all data since the last motion event you received). So it should be pretty straight-forward. The main thing to watch out for is the difference between the index in the current event for a pointer's data vs. the pointer ID for that pointer: http://developer.android.com/reference/android/view/MotionEvent.html#... http://developer.android.com/reference/android/view/MotionEvent.html#...The pointer ID allows you to keep track of the individual fingers across multiple motion events. For example, if the user touches finger 1, then finger 2, then releases 1, then touches 1 again, you would see: Finger 1 down: MotionEvent ACTION_DOWN with one pointer, whose ID is 0. Finger 2 down: MotionEvent ACTION_POINTER_2_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 1 down: MotionEvent ACTION_POINTER_1_DOWN with two pointers, whose IDs are 0 and 1. Finger 1 up: MotionEvent ACTION_POINTER_1_UP with one pointer, whose ID is 1. Finger 2 up: MotionEvent ACTION_UP with one pointer, whose ID is 1. (And inspite of what the update documentation says, the API allows for an arbitrary number of fingers, not just 3. I just happened to define convenience constants for the first 3 finger down/up actions, but given their weird naming as seen above and the finger ID mask is actually 255, it is perhaps best just to ignore those constants. :p) On Tue, Oct 27, 2009 at 9:29 AM, Streets Of Boston flyingdutc...@gmail.comwrote: Kind-a burried inside the blog-post on developer.android.com (http:// developer.android.com/sdk/android-2.0-highlights.html), i saw that multi-touch is now supported: Android virtual keyboard •An improved keyboard layout to makes it easier to hit the correct characters and improve typing speed. •The ***framework's multi-touch support*** ensures that key presses aren't missed while typing rapidly with two fingers. •A smarter dictionary learns from word usage and automatically includes contact names as suggestions. I'm really curious how multi-touch is supported in the API. -- 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] Re: Google: please change your release process
Sorry if I confused Mark, I was speculating on a gloomy possible future not suggesting something that we needed to do. Just riffing on the idea of having to create vendor builds if they end up running exclusive new (or keep old) versions of Android On Oct 27, 2:12 pm, Mark Murphy mmur...@commonsware.com wrote: That's a slippy slope to start on JP, not long until we're building for vendor specific custom OS's and then versions of those OS's. You don't need to do that. roll on It is unclear what deodorant delivery mechanisms have to do with Android. SenseUI build Apps do not need a dedicated build for HTC Sense. MotoBlur build Apps do not need a dedicated build for MOTOBLUR. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.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 -~--~~~~--~~--~--~---
[android-developers] Re: Android 2.0
For what it's worth, I believe the biggest causes of apps breaking on the newer devices are them having trouble with the new screen densities / sizes, and them using private APIs. We got the screen support out earlier in 1.6 and have been trying to beat that drum to get people to start to address that, since that is one of the biggest impacts on them. It's also a tedious and boring task - not your fault obviously. That doesn't mean it'll get done any quicker though ;) There are certainly some specific kinds of apps where running against specific hardware is much more useful (open gl and camera are the two main ones that I would think about), but as far as dealing with different platform versions, the platform is the platform, and whether you run it in the emulator or on one device or another it behaves the same. Are you allowed to say anything about Droid's openGl version? From looking at all the leaks (or PR if you ask me) it seems to be a 2.0 device like the 3gs or pre but there is nothing in the documentation --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: OpenGL ES 2.0?
There's been no word on any hardware that supports 2.0 yet On Oct 28, 6:47 pm, gigadude e.a.hutch...@gmail.com wrote: Is there a timeline for GLES 2.0 support (hopefully in the NDK as well)? Thanks for any info! --~--~-~--~~~---~--~~ 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: 3D Developers - Motorola Droid OpenGL ES Specs are in
Thanks for that, Assuming Anandtech is right about the 3gs that chip is actually better. I'm guessing they'll open 2.0 later - they did hint at another sdk by years end. On Oct 29, 3:35 am, Robert Green rbgrn@gmail.com wrote: I just got my hands on this phone. Here's my summary: 1) It's really fast. Runs all my games at max framerates. 2) The screen is 16:9 and will probably mess with your layouts and games and stuff. 3) It has a PowerVR SGX530. That's right around iPhone 3GS's GPU speed. Wow!! I believe the hardware supports OpenGL ES 2.0 but since Android doesn't, there's no way to use it right now. I did, however, dump all of the GL extensions and put them alongside the G1 and Emulator extension lists into this handy-dandy article -http://www.rbgrn.net/content/345-hands-on-motorola-droid-opengl-es-specs --~--~-~--~~~---~--~~ 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 be paid by the market?
The money is sent straight to my bank account so I guess that's a wire transfer. On Oct 28, 10:02 pm, shadow_of__soul shadow.of.sou...@gmail.com wrote: Hi, i'm interested to develop games for the android platform, but i have a question that i haven't been able to answer. i'm from argentina, if i pay the $25 fee, i'm able to publish my app in the store, but how i'm paid the revenue if i publish a paid app? wire transfer? check? also, there is any other requirement to publish paid app's in the store? Regards, Shadow. --~--~-~--~~~---~--~~ 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: Screen Sizes with 1.5, 1.6 and 2.0
It seems like the links in the reference are broken 1.6 lets you specify which screen sizes you support and what to do in each case, so you'll be ok compiling against that. I'd still download the 2.0 and create an emulator image running that at the droid screen- resolution. By default android will just upscale your application, I think. The manifest attributes are here: http://developer.android.com/guide/topics/manifest/supports-screens-element.html On Nov 13, 2:49 pm, Evan Ruff evan.r...@gmail.com wrote: Hey guys, I've got a quick question about screen size support. Currently, I've got an application that is rockin' along just fine on 1.5 and 1.6. Today the client called and says they want to run on Droid. While I've downloaded the 2.0 SDK, I'm a little wary of compiling against it. Will it break 1.5 and 1.6 compatilbility? How will the medium phones (G1, MyTouch) know to use those layouts? I imagine this is a pretty rudimentary question so if it's in a doc somewhere, can someone point me in the right direction? Thanks! E -- 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 there a list of standard Intent specifications?
I'm looking into getting my application to show up when the user tries to 'share' a picture via the Gallery application I can't, however, find any information about how exactly to go about this. I get that I need to declare an intent filter for the SHARE action, what I can't seem to find is how the Gallery wants to send out the selected image. http://android-developers.blogspot.com/2009/11/integrating-application-with-intents.html documentation is key indeed. -- 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 there a list of standard Intent specifications?
That's the one I'm trying to use: intent-filter android:icon=@drawable/icon android:label=@string/ app_name action android:name=android.intent.action.SEND/action category android:name=android.intent.category.ALTERNATIVE/ category category android:name=android.intent.category.SELECTED_ALTERNATIVE/ category /intent-filter On Nov 14, 9:30 pm, Mark Murphy mmur...@commonsware.com wrote: MrChaz wrote: I'm looking into getting my application to show up when the user tries to 'share' a picture via the Gallery application I can't, however, find any information about how exactly to go about this. I'd try supporting ACTION_SEND and see if that gets you in there. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 1.0 In Print! -- 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 there a list of standard Intent specifications?
Thanks mark, I really didn't want to have to crawl around code to find how it's sending the picture i.e. as a content uri and how it's storing it (EXTRA_STREAM) still, it works now. Thanks again. On Nov 15, 12:42 pm, Mark Murphy mmur...@commonsware.com wrote: MrChaz wrote: That's the one I'm trying to use: intent-filter android:icon=@drawable/icon android:label=@string/ app_name action android:name=android.intent.action.SEND/action category android:name=android.intent.category.ALTERNATIVE/ category category android:name=android.intent.category.SELECTED_ALTERNATIVE/ category /intent-filter Well, I can tell you that the mail program uses: intent-filter android:label=@string/app_name action android:name=android.intent.action.SEND / data android:mimeType=text/plain / data android:mimeType=image/* / data android:mimeType=video/* / category android:name=android.intent.category.DEFAULT / /intent-filter And the MMS client uses: intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=image/* / /intent-filter intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=video/* / /intent-filter intent-filter action android:name=android.intent.action.SEND / category android:name=android.intent.category.DEFAULT / data android:mimeType=text/plain / /intent-filter The categories you are using are for option menus and AFAIK are not relevant for the scenario you are trying. So, I'd model after the ones from the Android source code. BTW, to find this, you can use Google Code Search: http://www.google.com/codesearch and search on: package:android android.intent.action.SEND (though that will also bring up a bunch of SENDTO entries as well) -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year -- 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: fwd: get the file path from a URI instance
If I remember rightly, the gallery returns you a content uri so you'll want to do something like: getContentResolver ().openInputStream(uri) On Nov 17, 5:53 am, Abhi abhishek.r.sha...@gmail.com wrote: Hi Dianne, I am trying to do the following. I have an Image viewer where in the user picks an Image from within the gallery. The uri to that selected Image is available to me. Now, I want to use this URI information and send it as a file over a socket using FileInputStream. Is this a valid syntax to perform the above action? FileInputStream fis = new FileInputStream(uri.getPath()); // Here uri is the URI of the selected Image byte[] buffer = new byte[fis.available()]; fis.read(buffer); ObjectOutputStream oos = new ObjectOutputStream (socket.getOutputStream()); oos.writeObject(buffer); Please help me to move forward. Thanks, Abhi -- 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: Displaying Text such as score in an OpenGL game
It's not that bad, you can just copy the LabelMaker and NumericSprite classes and then call them in the same way that example does in the render. At least that's all I'm doing for my little 2D effort. On Nov 17, 2:10 am, Kevin S. dada...@gmail.com wrote: I have a the beginnings of an Open GL game running, and have gotten to the point where it would be nice to have the FPS displayed. Since I will probably want to be able to put score or other info up anyway, I started searching for how to do that. I found the SpriteTest example, http://code.google.com/p/apps-for-android/source/browse/trunk/Samples... It looks nice, but really complex. Is there an easier way? -Kevin -- 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: ATTENTION ANDROID TEAM: Take back control of Android.
Marks right, generally things work well. Although there do appear to be some differences between handsets in terms of their openGL support - seems like droid has some issues with png formats (at least from what I've seen on message boards) On Jan 17, 2:35 pm, Mark Murphy mmur...@commonsware.com wrote: It might eventually be possible to introduce a compatibility mode so older applications could run in the latest versions of Android, but I suspect that is a ways off since it is likely memory intensive. On the whole, older applications run quite delightfully in newer versions of Android. Some small percentage of apps will need to be modified for any given Android release (e.g., those apps using contacts may need a revamp to deal with the new contacts API introduced with Android 2.0). And applications may need updates to take full advantage of newer capabilities (e.g., improved multiple screen resolution support introduced in Android 1.6). -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.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
[android-developers] Re: OpenGL Fillrate Issues
Am I right in thinking that the Galaxy likes a depth of 16? I guess this might also be a good to place to ask how I'd find out the type of phone the game or whatever is running on so that I can start accounting for this stuff? On Jan 26, 1:00 am, Ralf Schneider li...@gestaltgeber.com wrote: I have just started playing around with OpenGL ES on the Nexus One. But this thread might be intresting for your problem: http://groups.google.com/group/android-developers/browse_thread/threa... The most important part might be this: It seems that DEPTH_SIZE of 24 is optimum on the Droid. I was kind thrown back a bit when I picked an EGLConfig with DEPTH_SIZE of 0 or another value (16, etc.) and rendering of a simple cube was at 40FPS. With an EGLConfig that has a DEPTH_SIZE of 24 the cube was rendering at 60FPS. Regards, Ralf -- 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: OpenGL Fillrate Issues
@Kevin You might want to look at the rokon engine a good basis for doing a 2D game as it takes care of pretty much all the rendering work. @Mario I was hoping to avoid using the build number as that is a temporary fix only. @Ralf The accepted work around for the touch slow down issue is to put a Thread.sleep() in the event handler to stop it getting spammed with events. A delay for 16ms seems to work well for most people. On Jan 27, 1:00 am, Kevin Duffey andjar...@gmail.com wrote: Is there any good resources on tile based games.. like how to construct the game loop, keep it time based, update frames every 16ms or so while calling your physics, collision detection, movement, and redrawing routines in that time? I would love to develop some side scroller/top down tile based games with sprites, and yet I can't seem to find a good place to start. I saw this one google IO presentation, forget the guys name, that said on each iteration you pass the time delta and always keep it time based (as opposed to frame based I assume) and that while some basic puzzle games can get away with using a canvas (GLSurfaceView??), most games would require open GL to some extent. As well, I am interesting in knowing how to play background music and yet still play multiple sound FX on time with no delay so that when something collides, a sound plays at that exact moment, not a 1/2 second later. Is there any good resources on this? I don't need to make a perfect game my first time out.. just something to play with. I am also curious with regards to the 24MB ram limit per app, how you make larger levels without any potential delay in the game play. As the game scrolls one way or another (especially a top down with a large map), how do you avoid the GC while loading in new tiles for the map? One thought I had was the game goes online to get a map, storing it on the SD card, so as to avoid using precious on-board user/app ram. I've read from various posts from some of you about how you try to load everything in first, don't create any objects during the game loop, etc, but it seems games on the iPhone are quite impressive with smooth framerates, and I am aware that we're a bit limited as of yet on Android, especially with regards to the NDK layer being able to update video/audio buffers (or maybe I have that wrong?). As well, how important will a JIT play into games being better perofmant when we finally get a JIT (and anyone know when that might be by chance?). Along the same lines, can someone correct me regarding the info I think I have pulled from various posts about video/audio buffers/hardware access in the NDK layer? Do most of these opengl/better games require NDK C code to work well? Or are most of these games using pure Java code? I am thinking like Robert Green's game, and the air plane landing game (which seems like there are 5 or more on the market now of almost identical game..someone lifted the original code I guess?). Are they using NDK and thus I gotta get into that lower level to make a viable game... or is it possible to do a decent side scroll/top scroller game without going to that level. In a nutshell, I don't have the talent to build high end games like Assassins Creed, NBA hoops, etc form iPhone. I am not that skilled. However, I would love to learn, but think starting with a basic side scroller game with tiles and animted sprites is a great place to start. So, any references/urls/tutorials anyone can point to with some details on the whole game loop, how to scroll/draw tiles, update animations of sprites so they look fluid as they move, and how to mix music/sounds in there? Thank you. Loving this and other game posts btw. On Tue, Jan 26, 2010 at 4:20 PM, Mario Zechner badlogicga...@gmail.comwrote: I'm not Robert but I can at least confirm that a depth buffer with 24 bit is optimal for the Droid. I can also confimg that the GLSufraceView choses that depth by default when you don't set your own EGLConfigChoser. As a side note: from robert's and my experience achieving 60fps on the droid is near impossible for any sufficiently complex game. I don't know what the N1.sports as a gpu but I suspect it to be near the PowerVR in the droid,. Combined with the high res native resolution the results should be pretty similar for both the droid and the n1. That being said, there shouldn't be any problems with touch events on devices running android = 2.0 as they fixed the event flood problem in that version. I couldn't see any problem in my projects that make heavy use of the touch screen on my droid. There seems to be a small memory leak in the onTouch method if you don't call event.recycle before exiting the onTouch method. Hth On 27 Jan., 00:27, Ralf Schneider li...@gestaltgeber.com wrote. : Thanks Robert! These are good news. Since you are testing on a Droid. Can you confirm a 24 bit depth buffer is best for the
[android-developers] Re: OpenGL Fillrate Issues
@Mario Could you do me a favour and paste in the strings you're checking when using android.os.Build.Model? I don't have access to any phones other than the G1. It would be willing to bet that the couple of comments of missing objects I've had are related to the VBO issue you mention. Maybe the things I've produced just aren't cpu intensive for me to notice the dip in frame-rate. That said I've not kept a close eye on it after I got to where it was smooth to me. On Jan 26, 9:28 pm, Mario Zechner badlogicga...@gmail.com wrote: @robert, i'd be more than willing to contribute to such a best practices/common pitfalls site for opengl and game development on android. I will also send you the code for the racer, boiled down to just rendering the racer itself so you can see and test the effect. In light racer 3d this effect is not noticeable, the same is true for first person games like toon warz. I'll check out light racer 2d. Expect an email soon :) @mrchaz you can detect on which device you are running by checking via the android.os.build.Build.Model String (writing this from the top of my head, just google for android build). I use the SimpleEglConfigChoser and don't react on specific devices apart for blur/dext/samsung behold 2 which seem to share a common bug. They report the VBO extension but throw errors when using any of the VBO related functions. Apart from that I wouldn't open that can of worms, coding up paths for individual devices that is. Also, the Pixelflinger OpebGL software renderer used in the emulator and on cyanogen mods doesn't like deleting VBO buffers and will crash (take that for your site robert :)) I will try to finish translating my android game dev tutorial to english this week (I'm pretty busy with my day to day job and releasing the full version of Newton in the moment). Maybe you, Robert, could share that on your site too. Awesome discussion so far. Keep it up On 26 Jan., 21:41, MrChaz mrchazmob...@googlemail.com wrote: Am I right in thinking that the Galaxy likes a depth of 16? I guess this might also be a good to place to ask how I'd find out the type of phone the game or whatever is running on so that I can start accounting for this stuff? On Jan 26, 1:00 am, Ralf Schneider li...@gestaltgeber.com wrote: I have just started playing around with OpenGL ES on the Nexus One. But this thread might be intresting for your problem: http://groups.google.com/group/android-developers/browse_thread/threa... The most important part might be this: It seems that DEPTH_SIZE of 24 is optimum on the Droid. I was kind thrown back a bit when I picked an EGLConfig with DEPTH_SIZE of 0 or another value (16, etc.) and rendering of a simple cube was at 40FPS. With an EGLConfig that has a DEPTH_SIZE of 24 the cube was rendering at 60FPS. Regards, Ralf -- 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: Using bitmap data to copy pixels to a new bitmap
The getResources() method is defined in the Context class so you'll need access to a context or be calling it from within a child class like an Activity. On Jan 30, 2:26 am, lyon lyonbeck...@gmail.com wrote: In ActionScript development, there are two classes, Bitmap, and BitmapData. Bitmap uses information from BitmapData to create a Bitmap. Is there an equivalent to BitmapData in the android API? I did some digging and BitmapFactory seems to be the closest, however, I'm facing problems with it. I tried Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.buster); As that was what I was seeing in most of the examples I came across, but it is telling me that the method getResources is undefined. I'm not really sure what is causing this as in another tutorial I did, getResources didn't cause any problems. I'm not looking to simply draw a bitmap to the screen, I want to copy a section of the bitmap and place it on a new bitmap. In ActionScript, the method is bitmapData.copyPixels(), and I'm looking for a similar method in the Android API. The closest thing I could find was copyPixelsToBuffer(), but I'm not really sure if that does what I think it does. Any help is greatly appreciated -- 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 achieve ultra smooth OpenGL/ES animation
The easiest way to achieve a smooth rotation is to multiply the rotation amount by the time difference between the current frame and the last frame - that way the amount moved is constant over time. On Feb 1, 5:18 pm, tomei.ninge...@gmail.com tomei.ninge...@gmail.com wrote: Hello Android OpenGL/real-time gurus, I am drawing a pretty simple scene, with one large texture the about size of the screen (two triangles). I notice that the frame-rate is irregular: in most of cases, a frame finishes in 17 ms. However, in about 1 of 10 times, the frame finishes in 33ms. My guess is probably some background services need to run. However, the Linux scheduler is biased towards my FG app, so the BG services are usually starved, until they can't take it anymore and they grab the CPU from my app I am seeing stuttering in the animation. Is this due to the irregular frame rate? Should I delay each frame so that all frames are rendered with 33ms frame time? If so, what's the best technique of achieving this? Is there an API that I can call to guarantee CPU resources for the render thread I really hope Android runs on some sort of real time kernel ... 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 load XML files dynamically
The LayoutInflater has an inflate() method which lets you do this: http://developer.android.com/reference/android/view/LayoutInflater.html On Feb 4, 12:00 pm, Shekhar shekhar...@gmail.com wrote: Hi Folks, I need help on how to load XML file dynamically in the code.I have an activity and for the activity I have 5 xml layout files.I want to load one of the XML file depending on the some logical condition.for e.g switch(i) { case 1: //load XML file 1 break; case 2: //load XML file 2 break; case 3: //load XML file 3 break; } Please help me with some code snippet as i am new to the android Programming. Thanks, Shekhar -- 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: Draw a scalable Rectangle
That should be easily doable with a Surface, Canvas and a Paint object. Draw the bitmap onto the canvas, then draw the rectangle around it and display it on the surface. On Feb 9, 6:43 am, warrior chandu.ku...@gmail.com wrote: Hi All, Can anybody help me to draw a scalable rectangle around a bitmap And such that 1) The rectangle should scale based on the size of my bitmap 2) The colour of my rectangle should change on my input Any help would be 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: Can i use real number? for example 0.5
dp is a way of keeping things consistent over varying screen densities. If you don't want to do that you could specify one of these: px Pixels - corresponds to actual pixels on the screen. in Inches - based on the physical size of the screen. mm Millimeters - based on the physical size of the screen. pt Points - 1/72 of an inch based on the physical size of the screen. dp Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to- pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both dip and dp, though dp is more consistent with sp. sp Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference On Feb 11, 6:37 am, taehun zzang taehun...@gmail.com wrote: I want to use 0.5, but don't work. android:layout_marginTop=0.5dp can I use real number or not? I want to adjust pictures. -- 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: everyone likes compliments :*)
A man walking in a bar On Jul 31, 7:32 pm, greg sep...@eduneer.com wrote: Step 7 of exercise 3 in the Notepad Tutorial at http://developer.android.com/guide/tutorials/notepad/notepad-ex3.html mentions that onPause() and onResume() are also complimentary methods. Sadly, when they ran, I didn't receive any. - Greg --~--~-~--~~~---~--~~ 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: WHY?!Touch the screen opengl change to slow,please help me!
This is a know problem - caused by the system spamming touch events (I think) The work around is to put a Sleep() call into the event handler On Aug 1, 10:54 am, wanzi ! wanzihe...@gmail.com wrote: I run the 1.5API DEMO :SpriteTexture (openggl demo), everything is ok,but when I touch the screen,the application change to slow(rate is 25~30ms/f) ,after I release the screen,the speed recovery(rate is 17~19ms/f)!! I check the code ,there is nothing to do about touch screen. who can tell me why? And how to resolve it?thx!!! --~--~-~--~~~---~--~~ 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: TextView changing from other thread
You can't update a UI component from a thread that isn't the main (UI ) thread. You ought to be able to post() back to the main thread. On Aug 1, 10:02 pm, Illidane illid...@gmail.com wrote: Hi! I'm writing some game using OpenGL and have two views : SurfaceView for OGL and TextView for my score. When I try to update score ( using BoardScore.setText(bla); ) from my activity class all just fine, but when I try to do it from my logic class my app crash. Debugger says something like ViewRoot$CalledFromWrongThreadException (id=830053983760) But I need to update it from logic to know my score. Do you know something about this issue? Thanks for 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: How to keep mobile network alive even if screen is off
Take a look at the PowerManager and the WakeLock Be careful with them though because keeping the cpu awake will drastically reduce battery life. On Dec 10, 11:30 am, Alex Tang tangli1987...@gmail.com wrote: Dear everyone, I want my service keeps network connection alive even if user presses the power button to shutdown the screen. As I have tested, socket will return exceptions and through CONNECTIVITY_ACTION intent, i know EXTRA_NO_CONNECTIVITY is true. So can current Android keep connection not closed when screen is off? -- 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: T-Mobile Carrier Billing
That's probably the best thing to happen to the market, I wonder why they're being quiet about it. I also wish it worked for foreign currencies but progress is progress so I mustn't grumble On Dec 10, 8:00 pm, polyclefsoftware dja...@gmail.com wrote: Apparently they've started rolling it out: http://forums.t-mobile.com/t5/Market-Applications-Help/New-Payment-Op... http://androinica.com/2009/12/10/t-mobile-now-offers-customers-abilit... I see no information for merchants, though. Does anyone know if sales transacted in this way will continue to show up through our Google Checkout interface? When I saw the first story on this feature, I read that the split would be the same 70/30, but I've seen no communication from T-Mobile or Google about the logistics of this before it was launched. Anyone have any additional details for devs? -- 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: Alarms, Receivers and Wakelocks...oh my!
The code I'm using has a static method in the service I'm about to start that creates a wake lock that I then reference from within the started service. I took it from a discussion about WakeLocks in here and it seems to work. private static PowerManager.WakeLock _wakeLock = null; synchronized public static PowerManager.WakeLock getLock(Context context) { if (_wakeLock == null) { //Log.i(DownloadService, Creating wakeLock); PowerManager mgr=(PowerManager)context.getSystemService (Context.POWER_SERVICE); _wakeLock=mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, my worker wake lock); _wakeLock.setReferenceCounted(false); } return(_wakeLock); } On Dec 11, 12:03 am, BK knitt...@blandsite.org wrote: I think I may have found an issue within the My understanding is that to properly hold a device awake after an alarm is triggered you have to aquire a WakeLock in the onReceive() event, call a Service, then perform the work in the Service, releasing the lock within the Service when complete. http://groups.google.com/group/android-developers/browse_thread/threa... http://www.mail-archive.com/android-developers@googlegroups.com/msg66... This pattern can also be found in the CommonWare Advanced Android Development book. I tried this, but I found that the AlarmManager, when calling the BroadcastReceiver, runs on a separate PID than the IntentService when started from the BroadcastReceiver's onReceive() event. This makes the static variable on the lock manager. I tried this, and my logs indicate that the PID is definately not the same, and my understanding is that the DalikVM instances act like a standard JVM, whereby objects and variables are no shared between JVMs. Furthermore, since the WakeLock is not serializable, there is really no way to pass the reference to the lock via an extra in the Intent. Has anyone else seen this pattern work or fail? I have an example project (with compiled APK) if you'd like to test it yourself, where shall I post this? I have tested this on the emulator on versions 1.6 and 2.0. -- 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: Forward search queries to one single activity that handles search
As I understand it you only want the intent-filter in the activity that does the searching. The intent filter says the to platform hey I can do this Then in the activities you want to use the search you can startActivityForResult() On Dec 15, 12:11 pm, Stefan Klumpp stefan.klu...@gmail.com wrote: have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity. However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1) it always pauses ACTIVITY_2 first and then goes to onCreate() of ACTIVITY_2. @Override protected void onNewIntent(Intent intent) { Log.i(TAG, onNewIntent()); if (Intent.ACTION_SEARCH.equals(intent.getAction())) { Log.i(TAG, = Intent: ACTION_SEARCH =); Intent myIntent = new Intent(getBaseContext(), Search_Activity.class); myIntent.setAction(Intent.ACTION_SEARCH); myIntent.putExtra(SearchManager.QUERY, intent.getStringExtra (SearchManager.QUERY)); startActivity(myIntent); } } * Why does it recreate my ACTIVITY_2 when it is already there and doesn't go to onNewIntent directly? * Is there another way I can forward search queries directly to ACTIVITY_1? For example via a setting in the Manifest.xml * Is it possible to generally forward all search queries automatically to ACTIVITY_1 without even implementing onNewIntent in all the other activities? Currently I have to put an intent-filter in every single activity to activate my custom search there and forward the query then to the activity that handles search via the onNewIntent (as shown above). activity android:name=.Another_Activity android:theme=@style/MyTheme intent-filter action android:name=android.intent.action.SEARCH / category android:name=android.intent.category.DEFAULT / /intent-filter meta-data android:name=android.app.searchable android:resource=@xml/searchable / /activity -- 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: Forward search queries to one single activity that handles search
Take a look at the SearchManager stuff: http://developer.android.com/reference/android/app/SearchManager.html From what I can see you only want one activity that responds to the search, the others need to be able to initiate (I think) what would be a 'local search' When you start a search the system it always going to create an instance of those classes which have the filter so they can process they search intent. On Dec 15, 2:38 pm, Stefan Klumpp stefan.klu...@gmail.com wrote: Your assumption is partly right. I want all activities to accept search queries (via the search button on the phone), although I want only one single activity to handle the search (via a web server) and display the results. The problem is now, to make all activities accept search queries. Therefor I have to add the intent filter to all activities, otherwise pressing the search button will only show up the default Google Search, but not my custom search. But having the intent filter in each activity causes to create a new instance (at least onCreate() is called) of that activity, whenever I enter a String and start the search. And that is what I'd like to avoid. My goal is to have all activities accept search input (meaning pressing the search button opens up the search box), but then as soon as the search gets started it should be handled by the one single search activity. I hope that helps to better understand my problem. On Dec 15, 1:50 pm, MrChaz mrchazmob...@googlemail.com wrote: As I understand it you only want the intent-filter in the activity that does the searching. The intent filter says the to platform hey I can do this Then in the activities you want to use the search you can startActivityForResult() On Dec 15, 12:11 pm, Stefan Klumpp stefan.klu...@gmail.com wrote: have an activity handling search (ACTIVITY_1), which works perfectly when I use the search (via SEARCH button on the phone) within/from this activity. However, when I use search from another activity (ACTIVITY_2..x) by implementing onNewIntent and forward the query string to my Search_Activity.class (ACTIVITY_1) it always pauses ACTIVITY_2 first and then goes to onCreate() of ACTIVITY_2. @Override protected void onNewIntent(Intent intent) { Log.i(TAG, onNewIntent()); if (Intent.ACTION_SEARCH.equals(intent.getAction())) { Log.i(TAG, = Intent: ACTION_SEARCH =); Intent myIntent = new Intent(getBaseContext(), Search_Activity.class); myIntent.setAction(Intent.ACTION_SEARCH); myIntent.putExtra(SearchManager.QUERY, intent.getStringExtra (SearchManager.QUERY)); startActivity(myIntent); } } * Why does it recreate my ACTIVITY_2 when it is already there and doesn't go to onNewIntent directly? * Is there another way I can forward search queries directly to ACTIVITY_1? For example via a setting in the Manifest.xml * Is it possible to generally forward all search queries automatically to ACTIVITY_1 without even implementing onNewIntent in all the other activities? Currently I have to put an intent-filter in every single activity to activate my custom search there and forward the query then to the activity that handles search via the onNewIntent (as shown above). activity android:name=.Another_Activity android:theme=@style/MyTheme intent-filter action android:name=android.intent.action.SEARCH / category android:name=android.intent.category.DEFAULT / /intent-filter meta-data android:name=android.app.searchable android:resource=@xml/searchable / /activity -- 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: When call mWifiManager.isWifiEnabled , it crash. thanks in advance.
Have you added the permission to read the wifi state? Can you post the exception that is thrown? On Dec 17, 7:13 am, zz zt1082 zt1...@gmail.com wrote: When I call mWifiManager.isWifiEnabled() , program is crash. my Code is: - import android.app.Activity; import android.net.wifi.ScanResult; import android.net.wifi.WifiManager; import android.os.Bundle; import android.util.Log; public class HelloWIFI extends Activity { /** Called when the activity is first created. */ private WifiManager mWifiManager; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mWifiManager = (WifiManager)this.getSystemService(this.WIFI_SERVICE); Log.i(INFO, WifiState = + mWifiManager.getWifiState()); if (mWifiManager.isWifiEnabled()) { Log.i(INFO, WIFI is enable); } else { Log.w(Warning, WIFI is NOT enable); } mWifiManager.setWifiEnabled(true); mWifiManager.startScan(); for (ScanResult result:mWifiManager.getScanResults()) { Log.i(INFO, ScanResult: + result.toString()); } } } -- 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 2.1 one sale, WHERE is the SDK!
From the QA Jason Chen: Q: Why was it necessary for Google to design the phone? Why couldn’t it just be an HTC phone running the new flavor of Android? And will these new features becoming to Droid? A: It’s inaccurate to say Google designed the phone (points to HTC CEO). [Google] is just merchandising it online. Everybody will get 2.1 when it’s open source, within a couple of days To me that implies the SDK will be coming in a couple of days. On Jan 5, 8:10 pm, pcm2a reeeye...@gmail.com wrote: These phones are on sale with 2.1 Os on them right now. My friend just ordered two with overnight shipping. How is it even remotely acceptable that people will have 2.1 in their hands before developers even get to touch the SDK? I already have users using the Nexis-Droid 2.1 rom saying that my highly used widget doesn't work. How am I supposed to test this out in advance without hacking our phone all up? All this does is frustrate users when apps don't work and further degrades the market with 1 stars because developers don't have a chance to update their code. Thanks 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: Nexus 2.1 one sale, WHERE is the SDK!
Thanks for replying Dianne, it's nice to see an official face in one of these threads. I have to say though that with the best will in the world chances are things are still going to break somewhere, although admittedly minor ones. The other thing, which is more important imo, is engaging with the community which is supporting the platform. Putting the people who put the work in at the back of the queue isn't a good idea. On Jan 5, 10:12 pm, Dianne Hackborn hack...@android.com wrote: On Tue, Jan 5, 2010 at 1:56 PM, Wayne Wenthin wa...@fuligin.com wrote: This is true. But the phones are being overnighted to people starting today. They have been Dogfooding it for a few weeks. Why are the Developers the last to see it? If this breaks apps, which it is certain to do, they are just further infuriating the Developers that are trying to make this a great platform. If they continue I may just break down and buy a Mac. At least with Apple you know where you stand... Generally under the foot of Jobs but at least you know it. While I will not argue that we need to be better about getting SDKs out earlier, for developers the changes in 2.1 are really not that significant. Pretty much all of the stuff (little that it was) that could impact existing applications is already in 2.0.1. 2.1 adds some new APIs for things like Live Wallpapers, but a little delay in being able to use those won't harm anyone. If it helps, 2.0.1 is actually a branch off of the 2.1 development with various fixes from 2.0 that we desired for a maintenance release for Droid, and the new APIs hidden because they weren't quite ready to be supported yet. Almost all of the work from 2.0.1 to 2.1 was related to new features appearing on Nexus One. -- 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] Re: I want to make a Toast to prompt again and again on screen after every 5minutes.
If you want to notify the user of something from the service you'll want to use the NotificationManger to create and show a Notification On Jan 7, 6:28 am, Manoj linkex.ma...@gmail.com wrote: Hi, Please help me out on the issue as I want to make a Toast to promt again and again on screen by a service running in background. Please suggest me the way how to make this done. manoj chauhan -- 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 get full-sized image back from Camera using MediaStore.IMAGE_CAPTURE ?
As far as I know it's bugged and you can't get full resolution images via the intent. I ended up just creating my own camera activity. On Jan 8, 5:26 pm, Ray Benjamin ray.benja...@gmail.com wrote: Hi, I managed to figure out how to get the camara application to give me an image, but it is rather tiny, only 18k. Has anyone figured out a reliable way to get a full-sized image returned if you are using a MediaStore.IMAGE_CAPTURE intent? Thanks, Ray -- 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: HTC Hero (and others) and 100% Awake Time
Maybe your app running it coincidently causing a problem with something in the SenseUI widgets - they do fancy stuff with messages etc don't they? On Jan 9, 3:32 am, Doug dougforp...@gmail.com wrote: Hello, I have an app that works on any version of Android from 1.5 up - this makes it compatible with the HTC Hero. Problem is, the Hero stays awake 100% of the time when its running. For some strange reason (and this has only been reported to me by Hero users, although other devices could be having the same problem) the Hero will just *not* go to sleep when my app is running. The Settings - About Phone - Status - Awake Time always shows the same value as Up Time when my app is running. The definition of this value seems to be What percentage of the uptime has the phone NOT been in deep-sleep. I've done a decent amount of searching on this problem. I see plenty of evidence that its a known issue with many apps (even some of HTC's own components) and that its been at least partially addressed by a firmware update late last year, but there doesn't appear to be any documentation as to what actually causes the problem. So I spent a considerable amount of time analyzing my app and reworking large chunks of code that just might have been causing problems. No luck. A bit about the app: * It is set up to run on phone boot * It registers its own ContentProvider * It has receivers for Phone status (calls), Data connectivity, Bluetooth availability, incoming SMS messages, and the apps own broadcasts * It has a service component that is started with the startService (Intent) call. The service shuts itself down when it's completed its work * It uses both Handler messages, and Broadcast Intents to communicate events of interest. * The service will spawn one or two worker threads to do its bidding, when the workers are done they will stop. * The app sets alarms to be woken up periodically (default once per hour) so it can connect to a server to check for updated data. * Because the background worker threads use HTTP to connect to servers, they are protected by WakeLocks (a wake-lock is acquired when the task begins, and is released when the task completes) * There is not a single sleep anywhere in the code (I've read elsewhere that sleeping is disapproved of) * I have logging from logcat showing that the background threads, service and WakeLocks are correctly releasing themselves and stopping * Spare Parts shows that the Partial Wake usage of my app is actually very low (sometimes doesn't even register on the list) From a previous post by Diane: When no wake locks are held, the CPU will not run at all, and time has effectively stopped for most scheduling (that is scheduling based on SystemClock.uptimeMillis(), which is what most things like Handler and Java timeouts use). So, given that my app isn't holding any WakeLocks, I don't understand what could be causing the phone to remain awake (screen off) when my app is not doing anything. Unless there is a WakeLock being held somewhere... that the mere startup of my app causes to be 'acquired'. If anyone has any ideas - feel free to voice them. If anyone can comment on whether they have encountered (and resolved) this problem I'd be grateful to hear from you too. If anyone has any ideas as to whether an app (or system component) can keep the phone awake without it being visible to Spare Parts you'd be my hero (pun intended) Doug -- 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: subclasses vs constructors
A constructor is what is called when you create a new instance of a class i.e. new Integer() calls the constructor of the Integer class. A subclass is a class which extends another class. You do this so that you can share functionality without duplicating code On Jan 15, 7:40 am, Duey Oxburger cg-art...@hotmail.com wrote: Hey Guys, Could someone explain the difference between a subclass and a constructor?... Thx, D -- 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: Sprites VS 3D ?
2D is certainly easier because you're leaving out a whole dimension when working with movement, camera and collision. I should think it's probably less expensive in terms of memory too because you won't have as complex i.e. large vertex array - although I'm guessing a bit. On Jan 15, 9:36 pm, Duey Oxburger cg-art...@hotmail.com wrote: Lads, What is more memory expensive Sprite or 3D rendering?... Which is 'easier' to work with?... Thx, D -- 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] Performance comparison NDK vs SDK
Does anyone have any numbers showing the difference in performance between the NDK and SDK? I'm curious how much difference it makes in terms of fps / number or polys on the screen that kind of thing -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Performance comparison NDK vs SDK
I was hoping that someone had tried a little test app with a simple scene. I think I've pretty much reached the limits in terms of get sprites on the screen at an acceptable frame rate (at least on G1 type hardware). It seems, at least for what I'm doing, the limit is about 100 sprites but for my next project I'd like a bit more. Maybe I'll just stop making games for 'old' hardware and concentrate on the Droid and N1. I can't say I like the idea of ignoring half the market :( On Apr 6, 3:37 pm, Ralf Schneider li...@gestaltgeber.com wrote: You will probably not get a clear anwser from anyone. The questions is far more complex than it looks like. It is no problem to put the same number of polys out in OpenGL be it with the NDK or SDK. After all it's just same OpenGL calls. The time to render the polys (in a batch) exeeds the time of the function call overhead by orders of magnitude. So it is usually completely neglectable. But as soon as an application gets more complex and performs some serious calculations(AI, Scene Graph Management, Culling, Image processing, Number crunching, etc.) the native version will usually be much faster. And there is another thing: Beside the fundamental problem that there currently is no JIT Compilation. The current dalvikvm with its compiler seems to be very basic, without doing any optimizations - even not the most basic ones! There is this (very good) video: Google I/O 2009 - Writing Real-Time Games for Android http://www.youtube.com/watch?v=U4Bk5rmIpic After I have seen it, it was clear for me I will definitely use C++ with the NDK. For example: He is talking about the overhead of function calls Don't use function calls. ... So yeah we are back - before 1970 and start talking about the cost of structured programming and the performance advantage of using only global vars and gotos. The garbage collection is a real problem for games. So you will spend a lot of your time thinking how you can avoid it. Even formatting a string will create new objects. So there are tips like: don't show the FPS! Seriously, if you know C++ it is probably easier to manage you memory with new and delete than to tweak your architecture to reduce/avoid garbage collections. It seems like if you want to program a non trivial real time game, you are loosing all the advantages of Java. Don't use Getters and Setters, Don't use function calls. Avoid any Abstraction, etc. SERIOUSLY? But back to your question: The performance advantage of NDK vs SDK can be anything from 0-1%. It all depends. 2010/4/6 MrChaz mrchazmob...@googlemail.com Does anyone have any numbers showing the difference in performance between the NDK and SDK? I'm curious how much difference it makes in terms of fps / number or polys on the screen that kind of thing -- 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%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- 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: Performance comparison NDK vs SDK
100 is a low estimate but it's around that point that the frame-rate seems to get into the sub 30's. I'm already doing pretty much everything you've mentioned except using VBOs - most sprites are rendered via the draw_texture extension. Unfortunately pretty much all the sprites have some transparency so I'm using ARGB_ for the texture atlas's. On Apr 6, 10:28 pm, Ralf Schneider li...@gestaltgeber.com wrote: If your performance problem is only related to putting sprites on the screen, don't expect an improvement by witching to the NDK. I don't know how you are currently doint it, but these are some general remarks: Use OpenGL ES to draw the sprites. Limit your textures to 256x256. 512x512 seems to be slower on some devices. Use texture atlases for smaller sprites - To avoid state changes in OpenGL Use VBOs Avoid textures with alpha channels on slower devices. Don't scale or rotate your sprites on slower devices. Slower devices often have a fast path for simple blitt operations. = Check if point sprites are available on the device. If yes, use them. Use 16 Bit (565) textures. Watch the video I have posted in the previous post. The speaker has some valuable tips for performance improvements. Anyway, 100 Sprites is not very much if you are already using OpenGL... So may be you are right and the only solution is to target high end devices for your next project. 2010/4/6 MrChaz mrchazmob...@googlemail.com I was hoping that someone had tried a little test app with a simple scene. I think I've pretty much reached the limits in terms of get sprites on the screen at an acceptable frame rate (at least on G1 type hardware). It seems, at least for what I'm doing, the limit is about 100 sprites but for my next project I'd like a bit more. Maybe I'll just stop making games for 'old' hardware and concentrate on the Droid and N1. I can't say I like the idea of ignoring half the 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] Re: Not using a WakeLock so why does the device stay awake?
iirc, that flag means the system gets a wake lock for the life of the activity for you. On Apr 13, 9:52 am, westmeadboy westmead...@yahoo.co.uk wrote: I have a service which, when started, does some stuff (like downloading files) typically taking about 2-3 minutes. If I start this service and then immediately use the power button to switch off the screen, then I would expect the phone, at some point, to fall asleep. But it never seems to fall asleep while the service is still doing its stuff. At least, not on my Nexus One. I'm not using a wake lock (though I do use WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON in the activity that monitors the service progress). So is it true that I don't need to use a wake lock? -- 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 To unsubscribe, reply using remove me as the subject.
[android-developers] Re: Rendering scaled bitmap with high fps
That's an awfully large texture. Seeing as loading the texture is a one time penalty then openGL really ought to be faster in the long run On Apr 16, 2:42 am, Frederic frede...@mayot.net wrote: I'm in the following situation: I have a large bitmap (~1280x1024) that I'd like to display on screen, scaled down in a view that fits the phone's screen (~480x320). This bitmap is frequently updated (couple of tiles per frame at 15 FPS). I first wanted to implement the rendering with a SurfaceView but figured out that all the scaling would be done in software due to limitations in the Android SDK. The second solution would be to load and render textures in an OpenGL context. Would that accelerate the resizing? If yes, isn't the cost of loading textures going to offset what I'll win on the scaling side? Any toughts? Thanks a lot, Frederic -- 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 athttp://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: can i run .exe in android and what is opengl o/p format?
No, you'll need an .apk file which is the installer for android applications. Nearly all phones support openGL ES1 The newer ones (N1, Droid etc) support openGL ES2 via the ndk On Apr 20, 10:25 am, mmkr manutd...@gmail.com wrote: Hi all, I'm new to opengl. Is it possible to run the output file of opengl program implemented on desktop ( ie.. .exe file ) in android. Another doubt is what is format of opengl output in android, i mean for windows it is .exe, so what in android. 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 athttp://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: Device Seeding Program for Top Android Market Developers
You just need a 2pin to 3pin converter and the charger will work just fine in the UK :D On Apr 30, 4:15 pm, feilfly feil...@gmail.com wrote: finally, I received it. But the charger is EU standard not UK standard :-( On Apr 30, 3:09 pm, Ottavio Vanini ottavio.van...@gmail.com wrote: Hi all, I just received mine @ Marino (Rome) Italy Many Thanks 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 athttp://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 athttp://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: Android Market Licensing: Now Available!
Great stuff, I'll certainly be implementing this as soon as I can. Thanks :) On Jul 27, 6:55 pm, Trevor Johns trevorjo...@google.com wrote: Android fans, For those of you who haven't already heard through our blog, we've just launched the Android Market licensing service: http://android-developers.blogspot.com/2010/07/licensing-service-for-... From the above blog post: This simple and free service provides a secure mechanism to manage access to all Android Market paid applications targeting Android 1.5 or higher. At run time, with the inclusion of a set of libraries provided by us, your application can query the Android Market licensing server to determine the license status of your users. It returns information on whether your users are authorized to use the app based on stored sales records. Developer documentation is available here: http://developer.android.com/guide/publishing/licensing.html Happy coding! -- Trevor Johns Google Developer Programs, Androidhttp://developer.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
[android-developers] Re: Weird problem with ListView
At a guess I'd say it's caused by the listview recycling views. There's a long talk here about ListView: http://code.google.com/events/io/2010/sessions/world-of-listview-android.html On Sep 29, 2:51 am, John Gaby jg...@gabysoft.com wrote: I have a ListView which presents a table of items. The table is supposed to look like: http://gabytest.com/images/good.png but if I scroll around a bit, I sometimes see: http://gabytest.com/images/bug.png Now this only seems to happen when I run the program on an actual device (Motorola Droid with Android 2.2). I have never seen this happen on the emulator. Has anyone ever seen anything like this? Does anyone have any suggestions about what I might look for? 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: Payment on updates?
I have a feeling the download notification says 'authorizing' or some such when you download an update for a paid add. They may think they're being charged again. On Sep 29, 10:34 am, Pieter pie...@gamesquare.nl wrote: I received the following comment today: Great little appbut you have to pay for every UPGRADE,SO I WOULD NOT BUY IT. This is the third time I get a comment like this (out of 300+ comments in total for the paid version). What is it that makes a user think they have to repay after an update? Is there a technical reason why any user would need to pay again after we bring out an update? -- 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: deleting an app from the market?
Un-publish the old one? On Apr 29, 2:36 pm, gsmd gsm...@gmail.com wrote: This question has been left w/o an answer before. My case: the new version has it's package name changed (domain name switch) so I obviously can't upgrade. Created a new app under the same name and uploaded the new version under it. Published it. Now, how do I delete the obsolete one? Should I file a support request somewhere? --~--~-~--~~~---~--~~ 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] ListView display problem
I have a list activity which is doing something very strange when you select items. It doesn't seem to be de-selecting old items if you click on a different one. if you use the trackball it seems to select every other item and then swap the selection as you move up and down. I'm not doing anything special just getListView().setChoiceMode(ListView.CHOICE_MODE_NONE); setListAdapter(new LevelAdapter(this)); getListView.setOnItemClickListener(this); the LevelAdapter inflates a view from XML but I don't see why that would be causing issues. --~--~-~--~~~---~--~~ 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: Debugger doesn't start on G1
Do you have android:debuggable=true set? It's an option in the manifest, that sorted my issues out On May 3, 5:36 pm, Prasanna prasannagau...@gmail.com wrote: Whenever I try to run debugger for my applications, it gets stuck on Waiting for Debugger. It works fine on a ADP1 phone. Leaving it for a while ends up restarting the phone. I even reset the phone to factory mode and the problem persists. --~--~-~--~~~---~--~~ 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: onDraw() help needed....!
You're overwriting the previous line each time you touch so the application can only draw one line. As far as I know each onDraw() call clears the screen and, therefore, your previous strokes. Take a look at the Path class, this provides an easy way of chaining together multiple points into one long line. On May 5, 7:43 am, Sukitha Udugamasooriya suk...@gmail.com wrote: Hi all, I'm relatively new to Android. I want to draw strokes on my screen when the user touches. Next stroke should be drawn from the end point of the previous stroke. This is my code. What happens here is just only the current stroke is drawn. Previous strokes are vanished? What is wrong here? Please help.. package src.test; import android.app.Activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; public class ActDraw extends Activity implements OnTouchListener { float x = 200; float y = 200; float x1 = 10; float y1 = 45; float prvx = 150; float prvy = 150; MyView m; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); m = new MyView(this); m.setOnTouchListener(this); setContentView(m); } public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: { prvx = x; prvy = y; x = event.getX(); y = event.getY(); m.invalidate(); } } return false; } class MyView extends View { Paint p = new Paint(); Bitmap bm; int i; public MyView(Context context) { super(context); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); p.setColor(Color.GREEN); p.setStrokeWidth(4); canvas.drawLine(prvx, prvy, x, y, p); } } } --~--~-~--~~~---~--~~ 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: Playing a .mp3 file using View Intent
it's audio/mp3 not /audio/mp3 On May 5, 11:27 am, Asif k asifk1...@gmail.com wrote: Hi all, I want to play a mp3 file which is stored in the /sdcard/ using ACTION_VIEW intent and I used following code to accomplish that, but I got ActivityNotFound Exception.. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse(file:///sdcard/abc_xyz.mp3); intent.setDataAndType(data,/audio/mp3); try { startActivity(intent); } catch (ActivityNotFoundException e) { e.printStackTrace(); } But I got the following exception, 05-05 15:44:40.563: WARN/System.err(5253): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=file:///sdcard/Main Agar Kahoon.mp3 type=/audio/mp3 } 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1471) 05-05 15:44:40.582: WARN/System.err(5253): at android.app.Instrumentation.execStartActivity(Instrumentation.java: 1441) 05-05 15:44:40.593: WARN/System.err(5253): at android.app.Activity.startActivityForResult(Activity.java:2526) 05-05 15:44:40.602: WARN/System.err(5253): at android.app.Activity.startActivity(Activity.java:2570) 05-05 15:44:40.602: WARN/System.err(5253): at test.mp3file.MusicTest.onCreate(MusicTest.java:25) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1122) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2104) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2157) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Handler.dispatchMessage(Handler.java:88) 05-05 15:44:40.612: WARN/System.err(5253): at android.os.Looper.loop(Looper.java:123) 05-05 15:44:40.612: WARN/System.err(5253): at android.app.ActivityThread.main(ActivityThread.java:3739) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invokeNative(Native Method) 05-05 15:44:40.612: WARN/System.err(5253): at java.lang.reflect.Method.invoke(Method.java:515) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:739) 05-05 15:44:40.612: WARN/System.err(5253): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 05-05 15:44:40.612: WARN/System.err(5253): at dalvik.system.NativeStart.main(Native Method) In fact I used this approach to play file, because I want the internal music application with Gui buttons on the display during playback. Is it possible to call the internal music application when we play with the MediaPlayer object ?? Please help. Thanks in advance. Asif --~--~-~--~~~---~--~~ 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: reset to paid or completely remove the old free apps from Market?
You can't convert a free app to a paid one unfortunately. I ended up renaming the package and then changing the title of the old one on the market. On May 5, 10:42 pm, jman chunyen...@gmail.com wrote: I certainly would like to keep using the old name for the paid version of the software but I did not seem to find a way of resetting it to paid or removing the old free version entirely so that I can upload the brand new software. 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: Installing the USB driver for HTC Magic on Vista
It just appears as a usb drive. You have to ok the dialog on the phone which asks if you want to mount the drive too. On May 9, 5:21 pm, notthegingeron...@googlemail.com notthegingeron...@googlemail.com wrote: Hi Guys, Does anyone know how to install the usb driver for the HTC magic? Whenever I plug in the phone and select to mount is as a mass storage device, it gets mounted, but no New Hardware wizzard appears. I've enabled USB debugging in the settings, please help :) Cheers, Chris --~--~-~--~~~---~--~~ 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: sound effect using SoundPool
Apologies for necro-posting but I thought I might as well post the fix I found for the non-looping sounds in the code TJerkW posted. Essentially setLoop() takes the Id of the instance of the sound that is being played not the Id of the loaded sound. So it should look something like this: public int playLoop(int resid) { int soundId=soundPoolMap.get(resid); int instanceId = soundPool.play(soundId, volume, volume, 1, 0, 1f); soundPool.setLoop(instanceId, -1); return instanceId; } I'm returning the Id so that I can stop it later when I want to. --~--~-~--~~~---~--~~ 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: Sprite imaging for 2D game programming
Take a look at the Canvas method drawBitmap() http://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap(android.graphics.Bitmap,%20android.graphics.Rect,%20android.graphics.Rect,%20android.graphics.Paint) with that one you can specify the bitmap (the sprite sheet), the subset of the bitmap you want to display (the current frame) and the destination on the screen. To make it animate you'll want to keep track of the amount of time you've displayed the current frame, you can do this by updating a counter by the amount of time that passes between each update call e.g. when you update model position etc. When it exceeds whatever you've decided to be your frame-rate you change the current frame and reset the timer. I'll see if I can make some of my code a little more readable and post it up later if you're still stuck. On May 17, 4:23 pm, g1port.com gmt...@gmail.com wrote: Hi guys, For a 2D game programming, I'm trying to learn about loading an image file for all states of a game character (simply a walking soldier lets say) and simply animate it. I think this classic method is called as sprite imaging that you load whole image of all states of the character that you want to animate. Is there anyone that can provide some sample code about this or at least can you tell me which classes to use, how to refer some 'part of' whole image file and animate it etc. Your help is much appreciated. Thanks a lot. --~--~-~--~~~---~--~~ 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: Progress bar update help
You can ask a URLConnection for the content length and then read from the content stream in chunks. You can display your progress by setting the max to the content length and then incrementing the progress by your read chunk size. On May 26, 1:21 pm, Sukitha Udugamasooriya suk...@gmail.com wrote: Hi, I m implementing a small app which downloads files (avg 1MB files- takes 5 seconds to download). -- I want to show the progress using a ProgressBar. --The user can pause the download if he desires. How can I show the progress? (How can I know the amount that has downloaded at a given moment?) 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: Sensor not being notified when in standby
It is possible but keeping the phone on to receive the events will seriously hurt battery life and should be avoided if at all possible. On May 28, 4:58 pm, Éderson M Ferreira ederso...@gmail.com wrote: Hi, I am listening events from accelerometer sensor and everything is going right. The problem occurs when phone gets in standby mode and I am not being notified by sensors anymore. Does Anyone know if it's possible to get sensor notifications, by implementing a listener, even if phone is in standby? Thanks, Éderson --~--~-~--~~~---~--~~ 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: 2D animation with User interaction
To get the accelerometer readings you'll need to implement a listener, have a look at the SensorManager. As for displaying the images you can do that either in software using a SurfaceView or openGL using a GlSurfaceView. Checking for intersections can be done when you update the positions. The simplest way would to use Rect's based on the image position and use the intersects method. On Jun 5, 6:03 am, sagar.indianic sagar.india...@gmail.com wrote: Hello, I want to develop a simple application which will move an image accelerometer readings change. How can i implement that? is it possible using openGL only?? Another problem is that how can i get notified when two images intersect while animating??? Thanks for the 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: How to persist my canvas between calls to invalidate()
I'd probably try writing each point onto a in-memory bitmap and then displaying that instead. On Jun 7, 8:18 am, RS letscod...@gmail.com wrote: Hi, I am trying to render a customized view which draws points on the canvas whenever they arrive from a remote device. Whenever a new value is obtained - it gets passed into my customized view which draws it on the canvas - ( The canvas should still show my previous points). Now whenever i call invalidate() in my onDraw() method it clears all my previous points. The application is supposed to work with a stream of data and as such there are large number of points which are generated and as such we dont want to store the points in an array and reproduce them on the canvas- rather just get the new point draw it on the canvas (the previous points should stay). Does anyone know how to go about keeping all previous canvas objects intact while performing invalidate? 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: Passing Arguments to service
Add it to the Intent that you're using to start the service. -- 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: Adding buttons to a notification
From a poke around here: http://developer.android.com/guide/topics/ui/notifiers/notifications.html#CustomExpandedView it looks like you need to call setOnClickPendingIntent() on the RemoteViews passing the id of the button and a pending intent to handle the click. -- 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: Google Nexus S - Please provide as DEV phone, asap :-)
Aah, assumptions. Do you know if it'll be released as an ADP 4? -- 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: Converting Touch Inputs to Vectors
You might want to look at the GestureDetector ( http://developer.android.com/reference/android/view/GestureDetector.html) as it's designed to do pretty much this exact task iirc. -- 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: Does Android's GPS location provider do a built-in optimization?
1) You're using the GPS and the CPU so it's going to drain the battery like any other task. The system deals with talking GPS etc all you're doing is registering a *listener *which receives the information when updates happen. -- 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: Change Texture
onDrawFrame() will be called repeatedly and in there should be a piece of code like glBindTexture(GL10.GL_TEXTURE_2D, textures_ids.get(0)); that's the bit that is selecting the texture to be drawn, all you'll need is an if statement or something to make it use the other one. -- 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: Help me on AsyncTask
If it's crashing then take a look at the exception that's logged it'll give you a line number. -- 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 not decode high resolution picture
An image that large is likely too big to be loaded into memory. There's not much you can do about that other than making it smaller or breaking it into a number or smaller images. -- 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: Trying to get my head around multi screen densities.
afaik The system should scale the images for 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: 3G data is paused when phone goes to idle/sleep
Using a WakeLock keeps the system awake and will keep a 3G data connection alive. -- 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: Performance issue with mapview when using large number of items
You could try and merge over-lapping icons or detect when people are scrolling and add/remove icons appropriately. -- 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