[android-developers] Sqllite database join query
Hi, I already use getContentResolver().query(uri, null, null, null, null) to do a query. What if I have two databases, and I want to do one query on two databases and get one data set back? 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] GLSurfaceView transparent bg within a ViewGroup
I am able to get a GLSurfaceView to have a transparent background with mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0); mGLSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT); when I set the Activity's window background to transparent and the GLSurfaceView is the contentView of the Activity. But, let's say my GLSurfaceview is parented by a ViewGroup and I want GLSurfaceView bg to be transparent to see the Viewgroup's background - I am not able to do so with the code above. Is this a limitation or am I missing something? -George -- 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: drawable-hdpi not appearing in eclipse emulator
In fairness, Cameron, the docs don't actually say that android:anyDensity=false causes resources to be pulled from mdpi. The documentation for that attribute is buried in the middle of the Support for Multiple Screens page, and mostly talks about pixel density math. The confusion is compounded by the fact that, as Dianne says, the system is able to pull some resources from other directories anyway. I know it caused me some hair-pulling when I first started into serious multiple-density support; adding a sentence like the system will pull resources from the mdpi folder to the docs could be of real benefit. String On May 12, 4:40 am, Dianne Hackborn hack...@android.com wrote: Again, if you want to support multiple densities DON'T SAY YOU DON'T SUPPORT THEM. Seriously! :) The first thing to do is get rid of android:anyDensity=false so the system doesn't try to make your app think it is running in mdpi. If you still have problems after that, then we can talk about that. But until you stop telling the system to do this to you, I don't see much of a problem that it is in fact doing it. On Tue, May 11, 2010 at 1:45 PM, Cameron.M.Johnson cameron.m.john...@gmail.com wrote: This is from the Android Dev Guide http://developer.android.com/guide/ practices/screens_support.html Pre-scaling of resources (such as image assets) For example, if the current screen's density is high, the platform loads resources that are tagged with the qualifier hdpi and uses them without scaling. If no such resources are available, the platform uses the default resources instead, scaling them from the baseline density (medium) to high. This is what I based my question off of. Here it says as long as I have the hdpi qualifier, it will automatically choose images from that folder for a high density screen. Is this not correct or am I missing something? I could always hard code statements to check the current screens density and preload the PNG graphics that correspond to it. I am just curious if this actually works. The upscaling of the graphics work, but not the automatic qualifier choosing. Cam On May 11, 1:28 pm, Dianne Hackborn hack...@android.com wrote: You told it you don't support densities with android:anyDensity=false. Thus it will run your app as if it is the original density, mdpi. In some cases the framework may be able to actually load the correct density resource and seamlessly use it while you still think you are running in mdpi... but not always, and really, if you are coding your app to support multiple densities, you shouldn't tell Android that you don't support densities. :) On Tue, May 11, 2010 at 12:01 PM, Cameron.M.Johnson cameron.m.john...@gmail.com wrote: Hi there, So I have this game running on Android 1.6, and I put the different density images in their respective folders res/drawable-hdpi/image.png res/drawable-mdpi/image.png res/drawable-ldpi/image.png I made each image a different color so I can tell if it is loading the right image. When I test my program on different density screens it only chooses the mdpi images. It scales them to match the correct dpi but doesn't choose the right folder. It just defaults to mdpi. In the manifest I have, android:normalScreens=true android:anyDensity=false Anyone have a similar problem? I'm sure it is something simple that I am overlooking but I can't figure it out. From what I read on the Android Support Multiple Screens guide is that you should just have to put the different density images in their correct folders and Android will do the rest. -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252Bu nsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group athttp://
[android-developers] Re: Which device is best for testing development?
Is it possible to use devices from Samsung or HTC? There seem to be many sites that provide easy ways to change the firmware version to 2.1 (though not reliably). On May 9, 9:16 am, TreKing treking...@gmail.com wrote: On Fri, May 7, 2010 at 1:14 AM, kevin0228ca kevin022...@gmail.com wrote: which phone is good for testing? or is emulator good enough? For development, the emulator should be good enough to make an app, though you'll definitely want to test it on devices. It's great to have a Droid or other popular / powerful phone, but don't forget that many many people are still on older devices and older platform versions. So one could argue that the best device is the oldest, crappiest, slowest phone that is still in active use (G1 FTW!) so you can code your game as efficiently as possible and have it run on old hardware. Then you can pretty much assume it will run brilliantly on any more powerful phone after that. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- 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] I got an error when I was compiling the hero ROM.Need some helps.
make:***[out/host/linux-x86/obj/EXECUTABLES/etc1tool_intermediates/ etc1tool.o] error 1 Anyone got the same error?Please gave me an advice.Thank you very much -- 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 created programmatical ly - emptyView doesn’t pop up
I've created custom ListView programmatically, and set view to pop up when ListAdapter is empty. But when data adapter is empty, nothing shows on the screen, what can be wrong? here is constructor's code: public PlayerList(Context context, Activity activity) { super(context); mParent = activity; setOnItemClickListener( new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id) { ... } }; ListPlayerInfo players; players = getPlayerList(); // here size of players == 0 setAdapter(new PlayersAdapter(this.getContext(), R.id.player_name, players)); LayoutInflater vi = (LayoutInflater)mParent.getSystemService(Context.LAYOUT_INFLATER_SERVICE); emptyView = vi.inflate(R.layout.empty_view, null); // emptyView is View, and member of PlayerList this.setEmptyView(emptyView); } -- 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] Search for Midi Package
I want to port this application/applet to Android http://mathsrv.ku-eichstaett.de/MGF/homes/grothmann/java/Eartrainer/index.html Besides the interface issue there is the problem of generating sound. In JSE I do that with javax using basically the following code: Synthesizer synth=MidiSystem.getSynthesizer(); synth.open(); MidiChannel[] channels=synth.getChannels(); MidiChannel channel=channels[0]; channel.programChange(0); channel.noteOn(note,50); Thread.sleep(dur); channel.noteOff(50); synth.close(); The variable note determines the frequency of the sound. I found the ToneGenerator in Android, which seems to be a telephone class, not suited for music. With much work, I could setup a Midi stream to be used for the MediaPlayer. But isn't there an easier solution, or a package I could use? Yours, R.G. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem in the Notepadv3 tutorial code...
I've been working through the Notepad tutorial ( http://developer.android.com/guide/tutorials/notepad/index.html ) and it's been helpful. I'm aware that the second version has a bug, that is fixed in the third stage. However, the third stage (Notepadv3) still has a problem: Choose Add Note, then change the orientation. The note editing activity crashes when the orientation changes, in ActivityThread.performPauseActivity() with a NullPointerException. I'm not quite familiar enough with this platform to figure out what the issue is. I thought it had something to do with saving the row, but I thought I fixed that and it still bombs out. It's easy to reproduce the problem in the debugger. Can anyone explain what causes the crash? This might be a very good thing to get fixed; I presume a fair number of developers are going to look at that code and assume it's the way to do it... Thanks for any help y'all can provide! -- 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] Problème wcf android
2010/5/5 mia lamia.hann...@gmail.com: Bonjour Je veux appeller un service wcf (.net) depuis une application android. j'ai réussi à établir la connexion avec le service (après plusieurs ... Sorry, the language for this group is English. Please translate your post. -- Douglas Drumond -- 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] Location Device and Information Usage
Hi, I have a few questions regarding the usage of localization in android applications: Are there any interfaces available to find out when an application uses location information? Is it possible to know if the application is using coarse or fine grained location information? Is it possible to detect which type of localization is being provided, i.e. gps vs. wifi? And if the answer to any of the above question is yes, how? 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] HTC Incredible - images not showing up in Gallery
Hello, I'm making an alternative camera App. As you might expect my App involves taking pictures and saving them to the sdcard. On most phones (and the Emulator) everything works fine, pictures appear in the built-in Gallery App straight away. However on the HTC incredible images only appear when the user restarts the device. (I'm talking about an HTC Incredible phone with an sdcard, I know some of them shipped with internal storage only, but this is not the issue I'm talking about) The code I'm currently trying goes like this: public static boolean savePicture(Bitmap bitmap, int quality, String label, Context context) { ContentResolver resolver = context.getContentResolver(); // Save the name and description of an image in a ContentValues map. ContentValues values = new ContentValues(3); values.put(MediaStore.MediaColumns.MIME_TYPE, image/jpeg); values.put(MediaStore.MediaColumns.TITLE, label + .jpg); // Add a new record without the bitmap Uri uri = resolver.insert(Media.EXTERNAL_CONTENT_URI, values); // Get a handle to the file for that record, and save the data into it. try { OutputStream outStream = resolver.openOutputStream(uri); bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outStream); outStream.close(); context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri)); } catch (Exception e) { return false; } return true; } I've also tried MediaScannerConnection.scanFIle() with no luck. I wonder is the problem is due to the HTC incredible being originally designed to operate with internal storage only, maybe the Gallery App has issues with media stored on the sdcard. -- 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] how can i get the android sources
hi: i am finding android sources many days , but only i can get is based on linux , where can i get the sources based on windows, i want lean more about android from sources, Have anybody can help me? -- 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] Scamble a Bitmap image
I am new to android development. I have been asked to write an function to scramble a bitmap image. A user can then enter a password and the image will unscramble. I have managed to write the following code that works but takes way to long to execute due to the setPixels call. I was thinking of an alternate solution of just drawing the original unscrambled image and then making some sort of transparent overlay bitmap with some sort of distortion effect. When the user enters the correct password the overlay fades away. Please help! @Override protected void onDraw(Canvas canvas) { //Some of the variables are global but I left out that code. This successfully runs. int w = bitmap.getWidth(); int h = bitmap.getHeight(); Bitmap scrambled = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_); int[]pixels = new int[w*h]; bitmap.getPixels(pixels, 0, w, 0, 0, w, h); int color = 0; Random random = new Random(); Paint paint = new Paint(); for (int i = 0; i pixels.length; i++) { pixels[i] = pixels[random.nextInt(pixels.length - 1)]; } scrambled.setPixels(pixels, 0, w, 0, 0, w, h); canvas.drawBitmap(scrambled, 0, 0, paint); } -- 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] Displaying the ProgressDialog from the OpenGL thread.
Hi! Does anyone have expirience with opengl-ui-opengl threading interraction? I'am developing a small opengl application. I'am a little bit confused with separate opengl thread... Currently, my application is logically separated in two parts - the controlling one and the rendering one. The controlling part interracts with user - accepting user input, changing activities, dealing with files and so on. The rendering part - just render everything it should. Ok, so when I need to load new texture to opengl (unfortunatelly its large and I cant reduce its size), I'd like to show a ProgerssDialog dialog. Trying to show it from the open gl thread brings me an exception: Can't create handler inside thread that has not called Looper.prepare(). Because the initiator of loading is in the ui thread (for example - user selected a menu option), I'am opening the dialog, adding the load Runnable to stack on Runnables that will be called in Render.onDrawFrame and passing there a callback that will be executed after texture is loaded. Like this: //ui public class Controller extends Activity { ... protected void loadTexture(InputStream aStream) { final ProgressDialog dialog = new ProgressDialog(this); dialog.setTitle(Please wait...); dialog.setMessage(Loading texture); dialog.show(); _renderer.loadTexture(_stream, new Runnable() { @Override public void run() { dialog.dismiss(); }}); } ... } //gl public class SceneRenderer implements Renderer { @Override public void onDrawFrame(GL10 aGL) { this.runGLRunnables(aGL); } public void loadTexture(final InputStream aStream, final Runnable aCallback) { _glRunnablesStack.push(new GLRunnable() { @Override public void run(GL10 aGL) { SceneRenderer.this.doLoadTexture(aStream); aCallback.run(); };}); } } So the question is: Is there any way to show ProgressDialog from the opengl thread? I need exactly the ProgressDialog. There is a way to show some picture, previously loaded, like a splashscreen using opengl renderer, but I'd like to avoid it. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Your feedback on Samples/Tutorials/Articles
On Mar 18, 6:38 pm, Megha Joshi mjo...@google.com wrote: As many of you might have noticed by now, we have added a new Resourceshttp://developer.android.com/resources/index.htmltab under developer.android.com. It contains samples, tutorials and technical articles. We want your feedback to add more samples and tutorials to it.. Please add/vote topics for new samples and tutorials at the link herehttp://bit.ly/cenfnx. The Notepad tutorial is very useful, but it's missing something. The Notepadv2 version crashes if you hit the back button from the Edit Notes Activity, and the Notepadv3 version corrects this. But, there's still some kind of bug in Notepadv3. If you fire up the Edit Notes Activity and switch orientations (e.g. portrait to landscape), the activity crashes with a NullPointerException in ActivityThead.performPauseActivity(). I'm still new enough to this platform that I'm not quite sure what the problem is, though I'm looking into it. Whatever the issue may be, it's probably not a good idea to leave such a bug in tutorial code that a lot of new developers will be referring to. Might I suggest a Notepadv4? 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] Any body have an idea???
I have been asked to write an function to scramble a bitmap image. A user can then enter a password and the image will unscramble. I have managed to write the following code that works but takes way to long to execute due to the setPixels call. I was thinking of an alternate solution of just drawing the original unscrambled image and then making some sort of transparent overlay bitmap with some sort of distortion effect. When the user enters the correct password the overlay fades away. Please help! @Override protected void onDraw(Canvas canvas) { //Some of the variables are global but I left out that code. This successfully runs. int w = bitmap.getWidth(); int h = bitmap.getHeight(); Bitmap scrambled = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_); int[]pixels = new int[w*h]; bitmap.getPixels(pixels, 0, w, 0, 0, w, h); int color = 0; Random random = new Random(); Paint paint = new Paint(); for (int i = 0; i pixels.length; i++) { pixels[i] = pixels[random.nextInt(pixels.length - 1)]; } scrambled.setPixels(pixels, 0, w, 0, 0, w, h); canvas.drawBitmap(scrambled, 0, 0, paint); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] accessing sqlite db
hi, Im starting with android and have few questions about database access. 1. Every tutorial I ve read (ie Notepad) that uses sqlite creates and opens connection via SQLiteOpenHelper in onCreate callback. but I really have never seen that the connection is closed (androids throws exceptions that there is a leak as connection is never closed). So I assume that onSaveInstanceState is the best bet to close as onCreate opens the connection. but maybe it should be sooner - something like onResume (for open) and onPause (for close). or maybe those tutorials are too trivial and I should create another layer for accessing data in services, so that data could be shared between activities and wouldn't suffer from activity life cycle. the only thing is that the exception is thrown after a while - not immediately after destroying activity D/MyMainActivity :( 305): on Pause. D/MyMainActivity :( 305): on Stop. D/MyMainActivity :( 305): on Destroy. D/dalvikvm( 101): GC freed 408 objects / 18416 bytes in 78ms I/ActivityManager( 55): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=info.kami D/MyMainActivity :( 305): on create. D/MyMainActivity :( 305): on Start. D/MyMainActivity :( 305): on Resume. I/ActivityManager( 55): Displayed activity my.app.android/.MainActivity: 664 ms (total 664 ms) I/ActivityManager( 55): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x1020 cmp=com.android.l D/MyMainActivity :( 305): on Pause. D/MyMainActivity :( 305): on Stop. I/ActivityManager( 55): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1020 cmp=info.kami D/MyMainActivity :( 305): on Restar. D/MyMainActivity :( 305): on Start. D/MyMainActivity :( 305): on Resume. D/dalvikvm( 305): GC freed 5465 objects / 347528 bytes in 95ms E/Database( 305): Leak found E/Database( 305): java.lang.IllegalStateException: mPrograms size 1 E/Database( 305): at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java: 1668) E/Database( 305): at dalvik.system.NativeStart.run(Native Method) E/Database( 305): Caused by: java.lang.IllegalStateException: /data/ data/my.app.android/databases/data SQLiteDatabase created and never closed E/Database( 305): at android.database.sqlite.SQLiteDatabase.init(SQLiteDatabase.java: 1694) E/Database( 305): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java: 738) E/Database( 305): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java: 760) E/Database( 305): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java: 753) E/Database( 305): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java: 473) E/Database( 305): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java: 193) E/Database( 305): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java: 98) E/Database( 305): at my.app.android.dao.SQLiteTemplate.openToReadWrite(SQLiteTemplate.java: 60) E/Database( 305): at my.app.android.dao.SQLiteCallDao.open(SQLiteCallDao.java:54) E/Database( 305): at my.app.android.MainActivity.getDao(MainActivity.java:102) E/Database( 305): at my.app.android.MainActivity.onCreate(MainActivity.java:53) E/Database( 305): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1047) E/Database( 305): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2459) E/Database( 305): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2512) E/Database( 305): at android.app.ActivityThread.access $2200(ActivityThread.java:119) E/Database( 305): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1863) E/Database( 305): at android.os.Handler.dispatchMessage(Handler.java:99) E/Database( 305): at android.os.Looper.loop(Looper.java:123) E/Database( 305): at android.app.ActivityThread.main(ActivityThread.java:4363) E/Database( 305): at java.lang.reflect.Method.invokeNative(Native Method) E/Database( 305): at java.lang.reflect.Method.invoke(Method.java: 521) E/Database( 305): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) E/Database( 305): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/Database( 305): at dalvik.system.NativeStart.main(Native Method) E/Database( 305): Leak found 2. Is it really that important (from performance point of view) to use cursor when possible? usually I map each row in cursor to some type and work on a List of that type. 3. how to avoid fetching (even that db is local) all data from some table when my ListView can show only few results at a time. does api support kind of data scrolling -
[android-developers] Re: Using same sqlite database from multiple Activities and Services
I'm not sure if you guys have looked into reference counting, but that sounds like a possible solution to me. If you use a static reference count in your database helper object, your close method can only close the connection if there's just one reference left. I'm actually still working through this issue myself, but that sounds like it could fix some people's problems. On Apr 29, 7:32 am, Federico Paolinelli fedep...@gmail.com wrote: Just putting a dbstatus flag in the dbhelper class. When open() is called, I check the flag to see if the db is already open, if so I do nothing, otherwise I do the open stuff and then I set the flag. On Thu, Apr 29, 2010 at 2:26 PM, gcstang gcst...@gmail.com wrote: As am I, I'm doing the same with onPause/onResume. Federico how are you checking if yourdatabaseconnection is open? On Apr 28, 3:18 am, Federico Paolinelli fedep...@gmail.com wrote: An sqllitedb (helper) object for each activity (but the open one is only in the active activity). Every time an activity closes or pauses, I call the close() method. However, I am interested in any more elegant and standard solution of this problem. Federico On 27 Apr, 21:49, goosedroid alexrhel...@gmail.com wrote: Frederico, were yousharingthe same SQLiteDatabase instance object between all activities via some singletonhelperclass, or was each Activity instantiating a new SQLiteDatabase object? On Apr 27, 8:58 am, Federico Paolinelli fedep...@gmail.com wrote: On 27 Apr, 13:48, goosedroid alexrhel...@gmail.com wrote: I have been trying to find a discussion on the best way to handle a common sqlitedatabasewhich is shared by multiple Activities (or multiple Activities and Services). This is all in the same application. It seems that if each Activity has: void onCreate() { SQLiteDatabase db = SQLiteDatabase.openDatabase(...) ... } void onDestroy() { db.close(); ... } this would be wasteful, assuming there would be N SQLiteDatabase objects with N activities that needed access to the same db. One could go about making a singleton, but who would be responsible for closing thedatabasewhen the application terminates? Would it be best to extend the android.app.Application class and hook into the onTerminate() to close thedatabase? Taking a look at NotePadv3Solution, I can't find where it closes the database- and that is a pretty straightforward example. -- What I did (which may not be the best solution is to call the db.close() in onPause() method and call the db.open() in any onResume() method of all activities. Be aware that during the activity creation both onCreate() and onResume() methods are called, so you need to check the db is not opened yet. Hope this helps, Federico -- 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 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 -- Federico -- 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
[android-developers] EditTexts and ListViews
I just used multiple EditTexts in a ListView using SimpleAdapter. Problem is, when the user Edits the text how do I get the value. Can I get the reference of the editTexts from the simple Adapter? -- 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 SPP supported by Android BT API?
Hello, I'm a little bit confused about supporting SPP by Android API(from level 5). As I understand it wasn't supported in versions before API level 5 what we can read in discussion below.(First Nick's post) http://groups.google.com/group/android-developers/browse_thread/thread/f6895002803f6a5b/b7278a83a3b4928d?lnk=gstq=bluetooth+spp#b7278a83a3b4928d But it was in October and after that we have APi from 5 to 7 now released. And my question is do all these API's support SPP? As I read in other discussions some phones makes more difficulties than others. Which mobile phone you can recommend? In API reference we can read that: The most common type of Bluetooth socket is RFCOMM, which is the type supported by the Android APIs. RFCOMM is a connection-oriented, streaming transport over Bluetooth. It is also known as the Serial Port Profile (SPP). As I know RFCOMM is not the same as SPP. What is the difference between RFCOMM and SPP and it's configuration in Android API? Thanks, Pobudzio http://d.android.com/reference/android/bluetooth/BluetoothSocket.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] Question about registerReceiver
(1) IntentFilter filter = new IntentFilter(ACTION_A); activity.registerReceiver(mReceiver, filter); filter.addAction(ACTION_B); (2) IntentFilter filter = new IntentFilter(ACTION_A); filter.addAction(ACTION_B); activity.registerReceiver(mReceiver, filter); Do (1) and (2) have the same effect? Is ACTION_B really registered in (1)? I only find an abstract interface for registerReceiver in Android Source Code. So I do not know the detailed register strategy. Thanks for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to Play Mpeg2 Format Video
Hi , i want to play a mpeg2 video on android ..is there any support for mpeg2,or any way to play this format on android. any help is greatly appreciated thanks Arsalan. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problems with span and onclick events
Hi I have a problem, In my app I have a ListView where each item have inside a layaout with elements, one of this elements is a TextView and this text view have sometimes a spannableText (and this span is clickable span that it open a url.) The problems is the items from listview have an itemclick, and when I put the spannableText the itemclick dont work. ¿any solution or work arround? Thanks, flipper83 -- 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] Detect if Screen is locked (Live Wallpaper)
Hello, I'm currently implementing a live wallpaper. This is also visible, when the device is locked. Now I want to show different content, when it is locked but can't find a way to detect this. PowerManager can only change the settings and the wallpaperEngine only gives me a general onVisibiltyChanged() method, which triggers every time you return to the home screen. Dos anybody know a way to detect if the device is locked? 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] Android-NDK, porting openssl
Hello everyone ! I hope you can help me, because I am losing my mind trying to port OpenSSL on Android I got the last release of the external package for android from this repository : http://github.com/android/platform_external_openssl and I tried to generate shared librairies to use them into Eclipse. Here is what I've done and the structure of what I've made : I created a new apps called openssl and added the last release in the jni folder of project in it. So here is the structure : j...@jiss:/android-ndk-r3/apps/openssl$ ls -l Application.mk project/ j...@jiss:/android-ndk-r3/apps/openssl$ cd project/ j...@jiss:/android-ndk-r3/apps/openssl/project$ ls jni/ j...@jiss:/android-ndk-r3/apps/openssl/project$ cd jni/ j...@jiss:/android-ndk-r3/apps/openssl/project/jni$ ls android-config.mk crypto/ include/README.android Android.mk e_os2.h MODULE_LICENSE_BSD_LIKE ssl/ apps/e_os.h NOTICE So here is the structure of what I've made. Then I set up the NDK going to the root of the NDK and typing ./ build/host-setup.sh Then I type make APP=openssl And i get an error, here is what I get : j...@jiss:/android-ndk-r3$ make APP=openssl Android NDK: Building for application 'openssl' Compile thumb : crypto = apps/openssl/project/jni/crypto/cryptlib.c Compile thumb : crypto = apps/openssl/project/jni/crypto/mem.c Compile thumb : crypto = apps/openssl/project/jni/crypto/mem_clr.c Compile thumb : crypto = apps/openssl/project/jni/crypto/mem_dbg.c Compile thumb : crypto = apps/openssl/project/jni/crypto/cversion.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ex_data.c Compile thumb : crypto = apps/openssl/project/jni/crypto/tmdiff.c Compile thumb : crypto = apps/openssl/project/jni/crypto/cpt_err.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ebcdic.c Compile thumb : crypto = apps/openssl/project/jni/crypto/uid.c . . . . Compile thumb : crypto = apps/openssl/project/jni/crypto/dsa/ dsa_vrf.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ripemd/ rmd_dgst.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ripemd/ rmd_one.c Compile thumb : crypto = apps/openssl/project/jni/crypto/evp/ m_ripemd.c Compile thumb : crypto = apps/openssl/project/jni/crypto/bf/ bf_skey.c Compile thumb : crypto = apps/openssl/project/jni/crypto/bf/bf_ecb.c Compile thumb : crypto = apps/openssl/project/jni/crypto/bf/bf_enc.c Compile thumb : crypto = apps/openssl/project/jni/crypto/bf/ bf_cfb64.c Compile thumb : crypto = apps/openssl/project/jni/crypto/bf/ bf_ofb64.c make: *** No rule to make target « out/apps/openssl/armeabi/libdl.so », needed by « out/apps/openssl/armeabi/libcrypto.so ». Stop. j...@jiss:/android-ndk-r3$ I've realized that the problem comes from the Android.mk from the crypto/ folder at the end : ifneq ($(TARGET_SIMULATOR),true) LOCAL_SHARED_LIBRARIES += libdl endif . . . include $(BUILD_SHARED_LIBRARY) And when I try to comment #ifneq ($(TARGET_SIMULATOR),true) # LOCAL_SHARED_LIBRARIES += libdl #endif Here are the errors I get : . . . Compile thumb : crypto = apps/openssl/project/jni/crypto/dsa/ dsa_vrf.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ripemd/ rmd_dgst.c Compile thumb : crypto = apps/openssl/project/jni/crypto/ripemd/ rmd_one.c Compile thumb : crypto = apps/openssl/project/jni/crypto/evp/ m_ripemd.c SharedLibrary : libcrypto.so out/apps/openssl/armeabi/objs/crypto/aes/aes_ecb.o: In function `AES_ecb_encrypt': /android-ndk-r3/apps/openssl/project/jni/crypto/aes/aes_ecb.c:71: undefined reference to `AES_decrypt' /android-ndk-r3/apps/openssl/project/jni/crypto/aes/aes_ecb.c:69: undefined reference to `AES_encrypt' out/apps/openssl/armeabi/objs/crypto/aes/aes_cbc.o: In function `AES_cbc_encrypt': /android-ndk-r3/apps/openssl/project/jni/crypto/aes/aes_cbc.c:95: undefined reference to `AES_decrypt' /android-ndk-r3/apps/openssl/project/jni/crypto/aes/aes_cbc.c:104: undefined reference to `AES_decrypt' . . . . out/apps/openssl/armeabi/objs/crypto/sha/sha512.o: In function `SHA512_Final': /android-ndk-r3/apps/openssl/project/jni/crypto/sha/sha512.c:131: undefined reference to `sha512_block_data_order' /android-ndk-r3/apps/openssl/project/jni/crypto/sha/sha512.c:106: undefined reference to `sha512_block_data_order' collect2: ld returned 1 exit status make: *** [out/apps/openssl/armeabi/libcrypto.so] Error 1 j...@jiss:/android-ndk-r3$ That's all for the error. I would also like to use ECDH, ECDSA and EC, so I tried to add : ecdh/ech_err.c \ ecdh/ech_key.c \ ecdh/ech_lib.c \ ecdh/ech_ossl.c \ engine/tb_ecdh.c to openssl/crypto/Android.mk and commented all the LOCAL_CFLAGS concercing ECDH, ECDSA etc... in the openssl/apps/Android.mk , /openssl/android-config.mk But I got this error : . . . Compile thumb : crypto = apps/openssl/project/jni/crypto/dso/ dso_null.c Compile thumb : crypto =
[android-developers] How to retrieve log levels in Java ?
Hi, How do I retrieve a System property in android Java application ? Example I want to get the value of ro.debuggable. I tried System.getProperty(ro.debuggable) and it is returning null. 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] Hebrew Fonts on Android 2.1
I love my new HTC Incredible, but it is frustrating to not be able to read and respond to emails and Facebook content on a daily basis. It was easy to add Hebrew support on my previous phones (Palm Treo and Blackberry). How difficult is it for Google to provide the hooks to support fonts for one additional language? They will satisfy the needs of most customers who use other languages. Thank you, Ilan, Los Angeles -- 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] How capacitive is capacitive?
This is a strange question... Is the capacitive touch feature of a Motorola Droid (or any other Android-based touchscreen device) able to detect and report a value for the level of capacitance of a given finger touch, or does Android simply report I just received a touch at (x, y)? Thanks in advance for answering my goofy question. :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] mms forwarding
Is it actually impossible 2 fwd using the motorola droid? Don't tell me I bought a $300 phone that can't do what my kids $20 tracphone can. If this is true its a huge oversight, please fix! -- 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] To the moderator
To the moderator: I posted a question to this group some days ago, but got no replay, nor did the message show up in the group list.. Since there were so many new topics since then, I wonder if my message was rejected. If so, it would be nice to get a message. R.G. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Get URL from Android Browser
Hi Guys, I need a confirmation. I already did a google search but fail to find the answer. It's possible for developer to create an application (let say Application X) to get URL from Android Browser? Means each time a user browse the internet using Android Browser, Application X will capture the URL. Try to find in the android code API, but no answer. If you have the answer please let me know. Thanks guys. -- 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] Getting and sending Data From the Web (HTTPURLConnection via http)
Hi people, I have built an android application that should act like a remote control. Therefore I use json for name and value pairs. In order to establish a connection I use the HTTPURLConnection from the android API and my program is very similar to the tutorial posted on this forum. http://www.anddev.org/getting_data_from_the_web_urlconnection_via_http-t351.html Getting the current states of the different endpoints that I can control is no problem but sending them data doesn't work at all. I ran wireshark to watch the traffic but nothing goes out from my milestone at all. On be buttom line, data only goes downward to the smart phone but not upwards, from the smart phone to the server why??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Single App Across Platforms.
Hi, How does android make single app execute on multiple hardware devices. Does the Manifest have elements like screen size, resolution, CPU architecture etc? Regards, Sanjeev -- 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: Getting checked items from a listview of checkboxes
I have just got code working for this thanks to Romain Guy. See his solution at : http://groups.google.com/group/android-developers/browse_thread/thread/368d0bae027aab63/1c61f007e821ed2a?q=%22Getting+the+state+of+a+checkbox+inside+of+a+listview%22+%22Romain+Guy%22#1c61f007e821ed2a // Loogey -- 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] turn off vibrate for incoming call
Hi, I need turn off vibration for incoming call in my code, but it doesn´t function. I am use audioMgr.setVibrateSetting(AudioManager.VIBRATE_TYPE_RINGER, AudioManager.VIBRATE_SETTING_OFF); when I receive broadcast message for incoming call. Code for turn off sound function great, but for vibrate no. Can you help me? Sorry for my english. Thank you Ro_pR -- 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] audio player writing to AudioTrack
I've implemented an audio player that does decoding and decryption, so writes to an AudioTrack object. The decoding and decryption is done in native code. On the more powerful phones everything works fine, but on the lower-power (e.g. HTC my touch) phones when I switch activities the CPU becomes completely pegged and the audio becomes crackly. The first change was to keep the decoding and writing to the AudioTrack entirely in native code, which seemed to help a little. But, the audio still was bad, so, I re-factored out the portion of the audio player class that is responsible for doing the actual playback -- the rest of this class provides access to the meta data in the file, which is in proprietary format -- and am running this as a remote service. The runs fine on the more powerful phones, but *only* runs fine on the lower-power phones if I do the following: - start up the application - switch to another application - switch back to the application - start the audio player Could anyone guess what switching to the other application does? The CPU usage graphs look the same for both the app and player processes when doing this. Thanks. Jeff -- 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: Neighbouring Cell info - Clarification needed
Perhaps this can help? http://wiki.howardforums.com/index.php/Cingular_SIM_Cards http://wiki.howardforums.com/index.php/Cingular_SIM_CardsRegards, Sebastian Ricaldoni On Mon, May 10, 2010 at 2:06 AM, Vinay S s.vinay@gmail.com wrote: Hi, Thanks for the reply. Actually, I am looking for a different information. When I request for getNeighbouringCellInfo() it gives a set of values. I would like to know, if the Cell Id and the LAC given by this function is belonging to the same operator? Does the phone has the capability to return the Cell Id of different operators around the place..? Regards, VInay On May 8, 7:36 am, Renam seure...@gmail.com wrote: take a look at:http://en.wikipedia.org/wiki/Mobile_Network_Code I think that what you need. Vinay S wrote: Hi, I need one clarification regarding the NeighbouringCellInfo. When i query for the getNeighbouringCellInfo() method, it returns me with 5-6 values. Sample response is below: 06 05 2010 23:59:19.643 Neighbouring Cell Info : Cell Info [1] : Cell Id :20438 RSSI :-67 LAC :6012] Cell Info [2] : Cell Id :22058 RSSI :-69 LAC :6012] Cell Info [3] : Cell Id :22567 RSSI :-69 LAC :6010] Cell Info [4] : Cell Id :22259 RSSI :-69 LAC :6012] Cell Info [5] : Cell Id :22428 RSSI :-67 LAC :6012] Cell Info [6] : Cell Id :7 RSSI :85 LAC :0] My Question is, where these Cell Id and LAC given are specific to the SIM operator or is it from all providers in this area? If it is from multiple operators.., how can I distinguish them? Any kind of info regarding this will be useful. Thanks and Regards, Vinay -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MediaPlayer Resource Issue
Hello All, I'm hoping someone in this group could help me with a problem I'm currently encountering. I've created a soundboard application (Android 1.6). Sound board works great, and plays as expected. That is until you exit the app. When you leave the app, and then restart it, none of the Sound Buttons work. I've noticed in my debug call that the it gives me: create failed: 05-10 09:55:07.834: DEBUG/MediaPlayer(8167): java.io.IOException: Prepare failed.: status=0x1 Now, I believe I have to call reset() on the mediaplayers for the buttons, and I've tried doing it in the onCreate() and having the button initializing in the onRestart() method. But I still keep getting this issue. Additional details: I'm using the create(context, resource id) constructor. What am I doing wrong? Regards, Rebel -- 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] Set Title from a Tab child
Hi, How do change the title from a child tab? I'm trying a naive approach (just setTitle(...)) and nothing. (setTitle(..) from the parent TabActivity does work). thanks, Ori -- 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] How to attach a debugger with monkey
i want to attach a debugger with the monkey tool...can anyone tell me how it can be done?? i want to see the code flow actually , so if any one has any clues regarding that please share. 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] Regarding Battery drainage problem
My app in background is accessing minimum two times the network after each interval.Is it will drain the battery quickly ?If it's how can I solve the problem?Please help. Thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ANR when switching activities
My apk has an activity which may send an intent to open another activity of my co-worker's apk. When I manually switch these two activities between these two apks about 50 rounds, ANR shows. == The logs are attached below: 05-12 09:57:23.181 I/ActivityManager( 1379): ANR in process: com.test.apk (last in com.test.apk) 05-12 09:57:23.181 I/ActivityManager( 1379): Annotation: keyDispatchingTimedOut 05-12 09:57:23.181 I/ActivityManager( 1379): CPU usage: 05-12 09:57:23.181 I/ActivityManager( 1379): Load: 5.29 / 5.09 / 3.22 05-12 09:57:23.181 I/ActivityManager( 1379): CPU usage from 7600ms to 97ms ago: 05-12 09:57:23.181 I/ActivityManager( 1379): system_server: 11% = 8% user + 3% kernel / faults: 119 minor 4 major 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess0: 4% = 0% user + 3% kernel / faults: 8 minor 05-12 09:57:23.181 I/ActivityManager( 1379): android.process.acore: 1% = 1% user + 0% kernel / faults: 61 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess1: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess7: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): com.test.apk: 0% = 0% user + 0% kernel / faults: 79 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess9: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): logcat: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess8: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess2: 0% = 0% user + 0% kernel / faults: 9 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess3: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess4: 0% = 0% user + 0% kernel / faults: 27 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess5: 0% = 0% user + 0% kernel / faults: 2 minor 05-12 09:57:23.181 I/ActivityManager( 1379): testprocess6: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): +sleep: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): +sleep: 0% = 0% user + 0% kernel 05-12 09:57:23.181 I/ActivityManager( 1379): TOTAL: 22% = 11% user + 10% kernel + 0% iowait 05-12 09:57:23.191 I/ActivityManager( 1379): Removing old ANR trace file from /data/anr/traces.txt 05-12 09:57:23.201 I/Process ( 1379): Sending signal. PID: 1687 SIG: 3 05-12 09:57:23.201 I/dalvikvm( 1687): threadid=7: reacting to signal 3 05-12 09:57:23.291 I/dalvikvm( 1687): Wrote stack trace to '/data/anr/ traces.txt' 05-12 09:57:23.411 D/dalvikvm( 3120): GC freed 3128 objects / 177704 bytes in 202ms == And the /data/anr/traces.txt shows: - pid 1687 at 2010-05-12 09:57:23 - Cmd line: com.test.apk DALVIK THREADS: main prio=5 tid=3 WAIT | group=main sCount=1 dsCount=0 s=N obj=0x2aac9f60 self=0xbe10 | sysTid=1687 nice=0 sched=0/0 handle=1877228572 at java.lang.Object.wait(Native Method) - waiting on 0x114d38 (a android.os.MessageQueue) at java.lang.Object.wait(Object.java:288) at android.os.MessageQueue.next(MessageQueue.java:148) at android.os.Looper.loop(Looper.java:110) at android.app.ActivityThread.main(ActivityThread.java:4226) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) == The logs show that there's a keyDispatchingTimedOut. But the system seems not busy. I've checked out that the main thread of my activity was not running a lengthy task when ANR appeared. Is there someone knowing what this problem is? 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] Saving mp3 on RAW uncompressed
Hi, I am trying to use a SoundPoll to play some sound when i press a button. So I have used the code taken from this page: http://www.anddev.org/using_soundpool_instead_of_mediaplayer-t3115.html When I try to run on my emulator I have this error: D/AndroidRuntime( 328): Shutting down VM W/dalvikvm( 328): threadid=3: thread exiting with uncaught exception (group=0x4001b188) E/AndroidRuntime( 328): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 328): java.lang.RuntimeException: Unable to start activity ComponentInfo{net.ikeralbeniz.fundroid/ net.ikeralbeniz.fundroid.MainActivity}: android.content.res.Resources $NotFoundException: File res/raw/zas.mp3 from drawable resource ID #0x7f04000a E/AndroidRuntime( 328):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2454) E/AndroidRuntime( 328):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2470) E/AndroidRuntime( 328):at android.app.ActivityThread.access $2200(ActivityThread.java:119) E/AndroidRuntime( 328):at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1821) E/AndroidRuntime( 328):at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 328):at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 328):at android.app.ActivityThread.main(ActivityThread.java:4310) E/AndroidRuntime( 328):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 328):at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 328):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 328):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime( 328):at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 328): Caused by: android.content.res.Resources $NotFoundException: File res/raw/zas.mp3 from drawable resource ID #0x7f04000a E/AndroidRuntime( 328):at android.content.res.Resources.openRawResourceFd(Resources.java:859) E/AndroidRuntime( 328):at android.media.SoundPool.load(SoundPool.java:174) E/AndroidRuntime( 328):at net.ikeralbeniz.fundroid.MainActivity.onStart(MainActivity.java:53) E/AndroidRuntime( 328):at android.app.Instrumentation.callActivityOnStart(Instrumentation.java: 1129) E/AndroidRuntime( 328):at android.app.Activity.performStart(Activity.java:3723) E/AndroidRuntime( 328):at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2426) E/AndroidRuntime( 328):... 11 more E/AndroidRuntime( 328): Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed E/AndroidRuntime( 328):at android.content.res.AssetManager.openNonAssetFdNative(Native Method) E/AndroidRuntime( 328):at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:411) E/AndroidRuntime( 328):at android.content.res.Resources.openRawResourceFd(Resources.java:856) E/AndroidRuntime( 328):... 16 more I am using netbeans so I have edited de building xml to set -0 mp3 (or -0 .mp3) to the aapt but nothing changed.. I still have the same problem opening the mp3 files from raw.. any idea? -- 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] Marquee in various TextView at the same time?
Hi, I have a dinamic layout wich has one to six TextViews. All the TextViews are created in the Activity (programatically) and all are created equally. I want to marquee the text in the TextViews, but I don't know how to do it. Apparently, the TextView needs to be focused for the marquee works fine, but how i focus six TextViews at the same time? I think that's not possible, so, is there any workaround? Is it possible to get the marquee working without having the focus? This is the code of the TextViews: //TextView TextView tvTitulo = new TextView(this); tvTitulo.setText(Some loong text); tvTitulo.setTypeface(null, Typeface.BOLD); //Marquee tvTitulo.setSingleLine(); tvTitulo.setEllipsize(TruncateAt.MARQUEE); tvTitulo.setHorizontallyScrolling(true); tvTitulo.setFocusableInTouchMode(true); If I remove the line tvTitulo.setFocusableInTouchMode(true); the marquee is not working at all. If I don't remove the line, only one of the TextViews is getting the marquee working. Greetings -- 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] Dynamically update preferences
Hi, we have an XML file placed in the res/xml folder containing our preferences. Is it possible at runtime to add new items to the preferences. Example: The user starts the app and the preferences consists of: America - New York - Los Angeles - Chicago Where all the cities are CheckBoxPreferences. Then the user performs some actions in the application and this triggers that two new cities are added to the preferences: America - New York - Los Angeles - Chicago - Seatlle - Washington We have tried to place the XML file with the preferences in the assets directory, but from there we can't get the preferences into Android Preferences (like we do when the file is placed in the res/xml directory). Anyone that know if it possible at all and how to do it? thanks, Lars -- 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] Problem with startManagingCursor
Hello! I'm experiencing a problem that I fail to understand, maybe somebody can help. I'm using a MergeCursor in a ListActivity and a ResourceCursorAdapter. The MergeCursor consists of several Cursors that come from regular ContentProvider queries. After constructing the MergeCursor, I call startManagingCursor on it - I followed that pattern before without a problem. My problem is that sometimes (not all the time), going to another Activity and coming back, I receive this exception: android.database.StaleDataException: Access closed cursor at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java: 175) at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java: 99) at android.database.CursorWrapper.getLong(CursorWrapper.java:127) at android.database.MergeCursor.getLong(MergeCursor.java:142) at android.widget.CursorAdapter.getItemId(CursorAdapter.java:156) at android.widget.AdapterView.rememberSyncState(AdapterView.java: 1085) at android.widget.AdapterView $AdapterDataSetObserver.onChanged(AdapterView.java:784) at android.database.DataSetObservable.notifyChanged(DataSetObservable.java: 31) at android.widget.BaseAdapter.notifyDataSetChanged(BaseAdapter.java:50) at android.widget.CursorAdapter $MyDataSetObserver.onChanged(CursorAdapter.java:385) at android.database.DataSetObservable.notifyChanged(DataSetObservable.java: 31) at android.database.AbstractCursor.requery(AbstractCursor.java:97) at android.database.sqlite.SQLiteCursor.requery(SQLiteCursor.java: 561) at android.database.CursorWrapper.requery(CursorWrapper.java:211) at android.database.MergeCursor.requery(MergeCursor.java:247) at android.app.Activity.performRestart(Activity.java:3522) at android.app.ActivityThread.performRestartActivity(ActivityThread.java: 2967) at android.app.LocalActivityManager.moveToState(LocalActivityManager.java: 160) at android.app.LocalActivityManager.startActivity(LocalActivityManager.java: 321) (...) My understanding of it is that my managed cursor was deactivated, then going back it is requeried, but doing so a notification is sent to my adapter (DataSetObservable.notifyChanged). So the adapter then tries to access the cursor... which is in the middle of the requery, and so this exception is raised! What did I do wrong? Thanks, BoD -- 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] Activity pause timeout for HistoryRecord -- Any idea how does this happen ?
well , i see what' happens, render ListView with CursorAdapter cost too much time, i need improve the performance of Activity B, that's all -- 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] Sales down in may?
Hi Developers, I have seem my android sales for my apps fall about 50% in may on a per day basis, from around $40 per day (average in Feb and March) to $20 (first 10 days in May) My sales are many from US customers. Anyone else seem this behavior? 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: APKTool - decoding our apps
On 11 Mai, 18:00, Nathan critter...@crittermap.com wrote: Baloney. Reengineering itself is an illegal use. There is no GOOD purpose it should be used for. It is a piracy tool pure and simple. It depends on your jurisdiction. German common law actually allowsit in some cases ( to be honest it allows a lot of funny things, for example prostitution ) -- 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: draw a 2d marker on a openGL scene
thanks Robert! I will try it soon! ;) On 10 Mag, 19:08, Robert Green rbgrn@gmail.com wrote: I couldn't find it either, hrmm Anyway it's like this: gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); GLU.gluOrtho2D(gl, 0, viewportWidth, viewportHeight, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); // draw your quad in 2d here - coordinate system is top left = 0,0 to bottom right = width,height gl.glMatrixMode(GL10.GL_PROJECTION); gl.glPopMatrix(); gl.glMatrixMode(GL10.GL_MODELVIEW); On May 10, 5:32 am, Paolo brand...@gmail.com wrote: I searched for that, but i did't find anything... Could you link it, please? On 4 Mag, 17:48, Robert Green rbgrn@gmail.com wrote: Paolo, If you want to do it the canvas-style, Just flip the projection to orthographic and draw a 2D quad. I have posted the code for that more than once on here so if you do a search you'll probably find it somewhere. On May 4, 5:02 am, Paolo brand...@gmail.com wrote: Hi robert, thanks for your answer. It could be a possible way, but i i think is too much for my objective. In my case the camera is static, instead it is the grid that moves around me. I have only to put some static object over the grid. I say object, but is more correct say small picture. Consider that I'm developing an Augmented Reality App. I hoped that was possible to do that, using canvas on the opengl grid, but maybe is impossible. On 3 Mag, 21:10, Robert Green rbgrn@gmail.com wrote: If you want the 2D objects to have depth, you'll want to use billboarded quads. You may want to look around to find a better implementation but here's a tutorial -http://www.lighthouse3d.com/opengl/billboarding/ On May 3, 8:47 am, Paolo brand...@gmail.com wrote: Hi guys! I've a problem and I'm not able to solve at the moment. I have realized a grid with openGL on a GLSurfaceview. This grid rotates at 360° on all the aces using the orientation sensors. Now I'd like to put over it some markers at specified coordinates, such as 2D objects, as if they were attached to the grid, because they have to rotate together to the grid. How how I can make it? Thanks. Paolo -- 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 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 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,
[android-developers] Strange Error: WIN DEATH: Window{44bba600 SurfaceView paused=false}
Hi All, Can anyone tell me why this error occurs ? WIN DEATH: Window{44bba600 SurfaceView paused=false} I could run the same programing in HTC Magic and when it comes to Nexus one, this error occurs. Thanks in advance Ren -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Nexus one gps issue
thanks Streets, I will try this solution.. On May 11, 9:08 pm, Streets Of Boston flyingdutc...@gmail.com wrote: You probably do NOT want to put the starting and stopping of the location (GPS) providers in the onStart() and onStop(). The onStop() may not be called when your activity goes to the background: - It is not called because your activity remains active in the background - It is not called because the OS just killed your entire process. (this would actually kill the GPS provider as well). Instead, start and stop the GPS provider in the onResume() and onPause(). On May 11, 10:14 am, Namrata puranik.namr...@gmail.com wrote: Please anybody knows about it?? On May 11, 1:42 pm, Namrata puranik.namr...@gmail.com wrote: Hi, I am working app for nexus one which uses gps. I have placed turning on code of gps in onStart() of Activity and and turning off code in onStop(). As per logs On/Off works fine specially turning off. But then gps icon stays forever on notification bar. Is there any bug/ issue with Nexus One GPS? or am I doing anything wrong? Tunrning on/ off code is as follows onStart(){ ... String[] providers = { LocationManager.GPS_PROVIDER, LocationManager.NETWORK_PROVIDER }; int noOfProviders = providers.length; for (int i = 0; i noOfProviders; i++) { final String currentProvider = providers[i]; if (locManager.isProviderEnabled(currentProvider)) { locManager.requestLocationUpdates(currentProvider, 100L, 0.0f, _instance); } } ... } onStop(){ ... if (locManager != null) { locManager.removeUpdates(_instance); } ... } and the logs for turning off gps are.. LocationManager( 369): removeUpdates: listener = com.xxx.xxx@4495e330 D/NetworkLocationProvider( 76): removeListener(): com.xxx.xxx D/GpsLocationProvider( 76): stopNavigating D/libgps ( 76): qct_gps_stop Thanks in advance Namrata -- 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-Hide quoted text - - Show quoted text - -- 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] Dynamically add items to preferences
Hi, we have an XML file placed in the res/xml folder containing our preferences. Is it possible at runtime to add new items to the preferences. Example: The user starts the app and the preferences consists of: America - New York - Los Angeles - Chicago Where all the cities are CheckBoxPreferences. Then the user performs some actions in the application and this triggers that two new cities are added to the preferences: America - New York - Los Angeles - Chicago - Seatlle - Washington Anyone that know if it possible at all and how to do it? thanks, Lars -- 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] does android correct gps altitude ?
Hi, i've decoded some nmea lines delivered by the location manager where i retrieved the longitude, latitude, altitude and others informations. Then i compared theses informations with those stored in a Location object that i got from a location listener. I found out that there is a difference between the location.altitude and the nmea.altitude. The difference is always about 50 m. I think android corrects the latitude but I'm not sure. Is somebody has more informations about that ? I've also retrieved the HDOP, VDOP and PDOP from the nmea lines but i don't know how to compare them with the accuracy since it is given in meters. Does somebody know how to convert DOPs to accuracy ? Thanks in advance for your help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How Truncate Text With 3dots In Table Layout
Hi all, I am truncating the text in simple TextView as under TextView android:layout_width=fill_parent android:layout_height=wrap_content android:paddingTop=5dip android:paddingBottom=5dip android:paddingLeft=10dip android:textColor=#ff android:textSize=15sp android:singleLine=true android:ellipsize=end android:text=Its test string dsjk sdkfjsai ds ldsfjiojrl sdfkaslduifnfdsif sdfdfu sdfaslf dsfhlsja sdfl / This one is working fine. Now move to the issue when i want to truncate the text in Table Layout as under TableLayout android:layout_width=fill_parent android:layout_height=fill_parent TableRow TextView android:id=@+id/topten_rating_text android:textColor=#ff android:textSize=15sp android:paddingTop=5dip android:paddingBottom=5dip android:paddingLeft=10dip android:layout_width=60px android:text=10 android:layout_height=wrap_content/ ImageView android:layout_width=wrap_content android:layout_height=fill_parent android:src=@drawable/verticalline/ TextView android:layout_width=fill_parent android:layout_height=wrap_content android:paddingTop=5dip android:paddingBottom=5dip android:paddingLeft=10dip android:textColor=#ff android:textSize=15sp android:singleLine=true android:ellipsize=end android:text=Its test string dsjk sdkfjsai ds ldsfjiojrl sdfkaslduifnfdsif sdfdfu sdfaslf dsfhlsja sdfl/ /TableRow /TableLayout But its not truncating the text with 3 dots. I have applied most of the solutions which are available on internet but unable to success, Is there any solution ? Thanks in advance Regards, Gulfam Hassan -- 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: RE : Re: [android-developers] starting an application with Android 1.5
I see now, the method i would like to use in 1.5 is setPackage not setComponent; sorry for the misunderstanding. I don't want to use setComponent because i don't know the classname to use (and i don't want to hardcode it as i guess it might change as it is an external application). And setPackage is only available since API level 4 :( I have used your Launchalot exemples to dynamically retrieve the classname. Here is what i did that seems to work: String packageName = com.foo.blabla; Intent mainApps = new Intent(Intent.ACTION_MAIN); mainApps.addCategory(Intent.CATEGORY_LAUNCHER); ListResolveInfo activities = act.getPackageManager().queryIntentActivities(mainApps, 0); IteratorResolveInfo it = activities.iterator(); while (it.hasNext()) { ResolveInfo info = it.next(); ActivityInfo activity=info.activityInfo; if (activity.packageName.equalsIgnoreCase(packageName )) { Intent intent=new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_LAUNCHER); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); ComponentName name = new ComponentName(activity.packageName, activity.name); intent.setComponent(name); act.startActivity(intent); return true; } } // handle not found case Any shorter and faster way (and compatible with 1.5) to do it is welcome :) 2010/5/12 Thierry Legras tleg...@gmail.com Hi Mark, Yes sorry, my mail was not clear but you got it. I was really sure this was available from 1.6. It seems I need to have a rest! I will try that tomorrow. Thanks you both for the lightning fast help :) Thierry Le 12 mai 2010, 12:32 AM, Mark Murphy mmur...@commonsware.com a écrit : Thierry Legras wrote: How can i start an application just knowing the package name, not the clas... There is no concept in Android of start an application. There is start an activity, even start an activity that appears in the Launcher. Ok, there is Intent.setComponent solution would be what i need ... if it was compatible with 1 Not to mention the fact that this will not work by itself. BTW, setComponent() most certainly works with Android 1.5, since that method existed since API Level 1 (a.k.a., Android 1.0). I guess i have to play with getPackageManager() but how can i use it? Intent i=new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_LAUNCHER); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); i.setComponent(name); startActivity(i); See: http://github.com/commonsguy/cw-advandroid/tree/master/Introspection/Launchalot/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Consulting: http://commonsware.com/consulting -- You received this message because you are subscribed to the Google Groups Android Developers group... -- Thierry. -- 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: MediaPlayer pause on loop
It's a problem with the mp3 decoding. The bad news: You can't do it with mp3. The good news: Convert to ogg and it works like a charm. Martin mobitobi (Gentle Alarm, Sleep Now!) www.mobitobi.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: (Bug?) Back button triggers several times in different tasks
Please read more carefully through my description. First I spawning ANOTHER activity in the same task and pressing BACK button while IT IS VISIBLE. BACK button triggers both on this activity (effectively closing it) and also shows toast (so triggers the second time) for the base activity (which is activity A) On May 8, 8:03 am, Romain Guy romain...@android.com wrote: How is it strange? You wrote code that displays a Toast when the back key is pressed, and it does exactly that. On Wed, May 5, 2010 at 8:48 AM,inbraininbr...@gmail.com wrote: I found behavior which I can not understand related to event handling. I have task one with activity A on top of it: public class A extends Activity { private static final String MMS_PACKAGE = com.android.mms; private static final String SMS_INTENT_EXTRA_NAME = sms_body; private static final String SMS_INTENT_TYPE = vnd.android-dir/mms- sms; �...@override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button checkSmsBtn = (Button)findViewById(R.id.sms_start_btn); checkSmsBtn.setOnClickListener(new OnClickListener() { public void onClick(View v) { startActivity(createSmsIntent()); } }); } private Intent createSmsIntent() { String normalizedQuery = ; Intent intent = new Intent(Intent.ACTION_VIEW); intent.setComponent(new ComponentName(MMS_PACKAGE, com.android.mms.ui.ComposeMessageActivity)); intent.putExtra(SMS_INTENT_EXTRA_NAME, normalizedQuery); intent.setType(SMS_INTENT_TYPE); return intent; } �...@override public boolean onKeyUp(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Context context = getApplicationContext(); CharSequence text = Back button triggered; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show(); } return super.onKeyUp(keyCode, event); } } I have listener on my button creating intent for showing compose message window (and passing empty message to it). Then if I press back button (on emulator) ComposeMessageActivity will be close AND Toast in activity A will trigger which seems very strange to me. Can anybody explain what's going on? -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group 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
Re: [android-developers] Dynamically add items to preferences
Lars Nielsen Lind wrote: Hi, we have an XML file placed in the res/xml folder containing our preferences. Is it possible at runtime to add new items to the preferences. In principle, you could do this by adding preferences via Java code instead of XML. However, IMHO, the roster of available preferences should not change based upon other actions. If you want to enable/disable preferences based on a dependency, that's one thing (and can be handled in XML), but I am not a fan of a preference UX that involves preferences magically appearing and disappearing. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: (Bug?) Back button triggers several times in different tasks
inbrain wrote: Please read more carefully through my description. First I spawning ANOTHER activity in the same task and pressing BACK button while IT IS VISIBLE. BACK button triggers both on this activity (effectively closing it) and also shows toast (so triggers the second time) for the base activity (which is activity A) Don't use onKeyUp(). Use onBackPressed (Android 2.x) or onKeyDown() (Android 1.x). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Widget like MapView
Anybody has a clue? On May 12, 10:30 am, Ajay aja...@gmail.com wrote: Another related question: Is there a widget that can scroll diagonally? The only way I know to make a view scroll both horizontally and vertically is to have nested views like have a ScrollView inside a HorizontalScrollView. But, in this way I cannot scroll diagonally and it always has to move in a vertical-horizontal or horizontal-vertical direction. Thank you,Ajay On May 12, 10:02 am,Ajayaja...@gmail.com wrote: Hi, I read some tutorial about loading a MapView in your own activity. The Google maps is a beautiful application that scrolls in any direction the user moves around. I want to develop a similar application, that could scroll in any direction, but the difference being it has to display it's own UI. Is this possible? If yes, then how? Thank you, Ajay -- 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
Re: [android-developers] Re: Widget like MapView
Ajay wrote: Anybody has a clue? If you need help within six hours, please hire a consultant. Otherwise, please wait 24-48 hours before bumping your posts. Is there a widget that can scroll diagonally? There is no built-in widget that can scroll diagonally. I read some tutorial about loading a MapView in your own activity. The Google maps is a beautiful application that scrolls in any direction the user moves around. I want to develop a similar application, that could scroll in any direction, but the difference being it has to display it's own UI. Is this possible? If yes, then how? Draw on the Canvas, using the techniques used by games for rendering a portion of a large map on the screen and allowing scrolling in whatever directions the larger map supports. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android 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] MediaPlayer Resource Issue
May be you have to release thr player before exiting On May 12, 2010 3:15 PM, rebeldev fa...@mobilefringe.com wrote: Hello All, I'm hoping someone in this group could help me with a problem I'm currently encountering. I've created a soundboard application (Android 1.6). Sound board works great, and plays as expected. That is until you exit the app. When you leave the app, and then restart it, none of the Sound Buttons work. I've noticed in my debug call that the it gives me: create failed: 05-10 09:55:07.834: DEBUG/MediaPlayer(8167): java.io.IOException: Prepare failed.: status=0x1 Now, I believe I have to call reset() on the mediaplayers for the buttons, and I've tried doing it in the onCreate() and having the button initializing in the onRestart() method. But I still keep getting this issue. Additional details: I'm using the create(context, resource id) constructor. What am I doing wrong? Regards, Rebel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Socket + SurfaceView + multiplayer game problem. Need Help
Hi Miguel, Thanks. do you recommend Local Androis Service or Remote Android Services design ? Thanks Luc On 23 avr, 01:30, Miguel Morales therevolti...@gmail.com wrote: Making a realtime action game will be difficult when you start to take into account network latency. Specially if you want people to play your game over a 3G or Edge connection. Your problem might be in the way you are polling for data. If you have a looping thread, it'll hog your CPU and yourFPSwill suffer. You may be able to counter this using wait() and notify() or a Looper/Handler pattern. There are several ways to solve this, however this is what I did. Decouple the network functions to use a service in a different process. When the services receives network data, we call a callback function in the the main game process. This is quite fast for me using rough measures. However, in your case a simple lock might do the trick since from my experiments, it is much faster than a queue/handler. Again, I suspect that your simply using a bad poll technique in your network thread. On Sun, Apr 18, 2010 at 1:18 AM, croco zeug...@gmail.com wrote: Hi all, I'm developping a simple realtime action game 4 Android. It works nice. but now i want deal with animationFPSand i'm facing a big problem i can't solve since couple days now. I started from the famous Lunar Android sample using facebook. got 55-60 frame per second on my G1. it smelt good for my game i thought ... BUT when i plugged the surface view in my game i got a poor 6-9 Frame per second making the game unplayable. After debugging removing all content of my doDraw used by the thread controlling the surface view i found the problem. The problem is not the quantity of sprites i displayed but the concurrency between threads used for receiving my game data over TCP and the UI thread i use to control surface view. If when i start displaying the game i stop the my socket protocol threads (reader, writer) the game is refreshed at 25FPSwhich is not 50FPSbut large enought to make the game playable. So my question is how in realtime game for android i can send / received data (and not delayed of course) without killing the game refresh rate. Last thing i use canvas and not open gl but i don't need open gl and i really see the problem comes from the multithreading Thanks a Lot for your help. Luc -- 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 --http://diastrofunk.com,http://developingthedream.blogspot.com/,http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9 -- 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
Re: [android-developers] Dynamically add items to preferences
Do you know how do it via Java code - what to look fore in API - links? 2010/5/12 Mark Murphy mmur...@commonsware.com Lars Nielsen Lind wrote: Hi, we have an XML file placed in the res/xml folder containing our preferences. Is it possible at runtime to add new items to the preferences. In principle, you could do this by adding preferences via Java code instead of XML. However, IMHO, the roster of available preferences should not change based upon other actions. If you want to enable/disable preferences based on a dependency, that's one thing (and can be handled in XML), but I am not a fan of a preference UX that involves preferences magically appearing and disappearing. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Sales down in may?
On Wed, May 12, 2010 at 2:53 AM, chris price chris123pr...@googlemail.com wrote: Hi Developers, I have seem my android sales for my apps fall about 50% in may on a per day basis, from around $40 per day (average in Feb and March) to $20 (first 10 days in May) My sales are many from US customers. Anyone else seem this behavior? No, my sales are actually up about 30% this month. My free-version ad revenue is also up slightly. Have you re-released lately? -- Greg Donald destiney.com | gregdonald.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
Re: [android-developers] Sales down in may?
No one ever replies to posts on this forum. -- 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] Dynamically add items to preferences
Hi, Using below code we add 6the elements to the spinner dynamically userDisplaySpinner = (Spinner) findViewById(R.id.*SpinnerInAddUsers*); ArrayAdapterString adapter2 = *new* ArrayAdapterString(*this* ,android.R.layout.*simple_spinner_item*, array); adapter2.setDropDownViewResource(android.R.layout.* simple_spinner_dropdown_item*); userDisplaySpinner.setAdapter(adapter2); in the Abov ecode array takes the elements dynamically which are dispalyed in spinner like array[]=A,B,C,D On 5/12/10, Lars Nielsen Lind larsnielsenl...@gmail.com wrote: Hi, we have an XML file placed in the res/xml folder containing our preferences. Is it possible at runtime to add new items to the preferences. Example: The user starts the app and the preferences consists of: America - New York - Los Angeles - Chicago Where all the cities are CheckBoxPreferences. Then the user performs some actions in the application and this triggers that two new cities are added to the preferences: America - New York - Los Angeles - Chicago - Seatlle - Washington Anyone that know if it possible at all and how to do it? thanks, Lars -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Praveena Ankitha -- 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] Android fbconnect wall post
Hi, I am using Facebook Connect for Android library in my application (http://code.google.com/p/fbconnect-android/downloads/list). Its login is working properly but on clicking 'Get permission' says user needs to login. Also, in another activity of my app, after a process is completed, i want to make a post on Facebook wall. This must be done completely in background. How can this be done.? Also the session key that i get using this API and by using PHP client library(in web application) is different for the same login. why is it so? Thanks Veradis -- 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: Repo error
HI, Could you please share the command to install repo on Fedora.I am new to Fedora . On Fri, Jun 26, 2009 at 2:45 PM, Sivan sivaprasa...@gmail.com wrote: Dear All, This was due to the error in the repo file which was not downloaded correctly. After getting the correct repo file, repo was initialized successfully Regards Sivan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~--- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Layout Issue: Status Bar Space Remains Empty || Status Bar Animation
(1) I have an issue with the following code: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); On my emulator this seems to work fine. The status bar disappears and the empty space is filled with the content view. However on my Nexus One this sometimes works and sometimes the empty space remains empty/black. Any idea why this happens? I tried to counteract this, but my naive approach wasn't fruitful: handler.postDelayed(new Runnable() { @Override public void run() { v.getRootView().invalidate(); v.getRootView().requestLayout(); v.getRootView().forceLayout(); } }, 800); I tried those things from above separately, synchronously and delayed. (2) Also I wanted to check if I can remove the status bar's animation or tap into that with my own animation. To do that I tried to find the status bar. But using Activity.getWindow().getDecorView() and View.getRootView() both returned the same View, but it doesn't have the status bar as a child: [image: Screen shot 2010-05-12 at 2.02.44 PM.png] That's also what the status bar shows. My content starts with the NO_ID container, but above that there is no status bar. What's up with that? Is it hidden from ordinary apps? Could I still tap into its animation? Cheers, Mariano -- 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=enScreen shot 2010-05-12 at 2.02.44 PM.png
[android-developers] Clarification on loading local images with WebView
Hello all, I apologize if this is beating a dead horse, but I have been through the documentation and groups discussions over and over, and can't seem to resolve this issue What I want to do: - I am loading a remote web page into WebView using loadUrl() - example: webView.loadUrl(http://myserver.com/page.html;); - That page has a very large image in it whose quality I do not want degraded by the OS. So I am putting it in the assets directory of the app. - The page.html that gets downloaded from my server, then has a regular img tag in it like so: img src=file:///android_asset/largeimage.png/ I know there were some issues with reading assets from the file system with different versions of the platform. But its not clear what versions this affects and how to address the problem for all versions. Can someone please clarify: A) should what I am doing above work (because its not) B) If it only works on some versions of the platform - which versions? How should this be addressed when I can't guarantee what version of the platform users are running? I am targeting version 1.6 in my app because I thought that would be a safe version to target. I am testing against version 2.0.1 Thanks, Jeff -- 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: APKTool - decoding our apps
Did you guys notice anything about ProGuard actually supporting encryption? Nope. It just says obfuscator. Hence why I put 'obfuscator', had I meant encryption I would have written that. Its pretty standard practice in the 'real world' to obfuscate byte code. Yes, it isn't encrypted, I have tried to decompile obfuscated byte code generated by other products before using JAD (as a test since my company was using it), and was unable to retrieve anything meaningful from it. That however was a commercial grade obfuscator, it isn't free. I still intend to run this test myself, have any of you actually tried it yet? On May 11, 9:01 pm, Greg Donald gdon...@gmail.com wrote: On Tue, May 11, 2010 at 1:03 PM, André pha...@hotmail.com wrote: That looks good. But I have no idea how to use it? I've been trying to find a tutorial for it. Have you found that? http://proguard.sourceforge.net/FAQ.html#obfuscation That means it will simply take yourNiceBigVariable names and turn them into single letter variable names. That's only secure if you work in Redmond. ProGuard will also remove debugging info, w00h00! But then who compiles production releases in debug mode? No one. Realize Java is bytecode compiled. You will never be able to fully protect it by it's very nature. The Dalvik virtual machine would have to be capable of decrypting the bytecode before any useful protection could be available. http://en.wikipedia.org/wiki/Dalvik_virtual_machine I can't find the word encrypt anywhere on the page. Google did make some sort of attempt at .apk encryption, but we actually like our apps to appear in the Marketplace, so we don't dare use it. Java also fully supports reflection. That makes writing tools to take it apart trivial. The day Dalvik encryption support is announced will be the same day work will begin to break it. Count on it. Develop your business model with that fact in mind. The only winning move is to not play. ~Joshua Or in my case, I just don't care. There will always be reversers and pirates. -- Greg Donald destiney.com | gregdonald.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 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
Re: [android-developers] Clarification on loading local images with WebView
Jeff wrote: Hello all, I apologize if this is beating a dead horse, but I have been through the documentation and groups discussions over and over, and can't seem to resolve this issue What I want to do: - I am loading a remote web page into WebView using loadUrl() - example: webView.loadUrl(http://myserver.com/page.html;); - That page has a very large image in it whose quality I do not want degraded by the OS. So I am putting it in the assets directory of the app. - The page.html that gets downloaded from my server, then has a regular img tag in it like so: img src=file:///android_asset/largeimage.png/ I know there were some issues with reading assets from the file system with different versions of the platform. But its not clear what versions this affects and how to address the problem for all versions. Can someone please clarify: A) should what I am doing above work (because its not) Since you are loading the Web page from the Internet, I imagine WebView will block local file access. This is not significantly different than regular Web browsers, last I checked. Otherwise, Javascript could rummage around the local file system, grab data, and send it hither and proverbially yon. B) If it only works on some versions of the platform - which versions? How should this be addressed when I can't guarantee what version of the platform users are running? Try creating a ContentProvider to serve the image, and see if you have better luck with a content:// URL. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] ListView created programmat ically - emptyView doesn’t pop up
On Sat, May 8, 2010 at 3:11 AM, yorick yuri.opo...@gmail.com wrote: what can be wrong? Try setting the empty view BEFORE setting the adapter, or call adapter.notifyDataSetChanged() after setting the empty view. Maybe this will trigger the change. Not sure. Also, your constructor takes a Context and an Activity, which IS a context, so the first parameter is pointless. Then you use getContext(), which I don't know how it's defined, but you're already passing in two contexts - might as well use one of them there. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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: Which device is best for testing development?
On Sat, May 8, 2010 at 9:10 PM, Ubuntu Explorer ubuntuexplo...@gmail.comwrote: Is it possible to use devices from Samsung or HTC? You can use any Android-based phone for development. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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 fix hit area after scaling
You need to scale your hit areas to match the canvas scaling. If you zoom in 2x on the canvas your hit area is now twice the size likewise if you zoomed out 2x then your hit area is half the size. On May 11, 2:52 pm, Jonathan jonathanmschm...@gmail.com wrote: I am scaling the canvas of a linear layout on draw, but this throws off all the hit areas of my views inside of this layout. They respond as if there was no scaling taking place. What do I have to do to get themselves to re-register their hit areas? Thanks Jonathan -- 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
Re: [android-developers] Regarding Battery drainage problem
On Sun, May 9, 2010 at 8:19 AM, Sun a.sengupt...@gmail.com wrote: My app in background is accessing minimum two times the network after each interval. Is it will drain the battery quickly ? Is it might. Depends. What's an interval? A second? A year? And what are you doing with the data you access? If it's how can I solve the problem? Step 1 - Determine that you actually have a problem. Sounds like you're asking us if you have a problem and have provided no real context or useful information. Step 2 - If you do have a problem - solution: do less until you no longer have a problem. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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: Connecting to bluetooth devices
I can't believe I didn't look here earlier but I've found http://developer.android.com/reference/android/media/AudioManager.html which seems to have what I want in the form of void setBluetoothA2dpOn(boolean on). Unfortunately it also states This method is deprecated. Do not use. and doesn't mention what has superseded it. There is also setBluetoothScoOn() - but isn't that just for low quality telephone audio? On May 5, 11:41 pm, DonFrench dcfre...@gmail.com wrote: Oh. Well, did you take a look at the Bluetooth Chat example? In that app the user clicks on the name of the device they want to connect to. But if you know the device name or the MAC address you can skip the user interaction part. On May 5, 9:02 am, Dan Forever the.mep...@googlemail.com wrote: After looking more closely it seems that the code you pointed to simply turns on the bluetooth radio, but doesn't tell me how to establish a standard connection with a paired bluetooth device. I'm essentially trying to create a widget that allows me to enable and disable my bluetooth handsfree device (not establish my own custom data connection). On May 5, 5:09 am, DonFrench dcfre...@gmail.com wrote: http://developer.android.com/intl/de/guide/topics/wireless/bluetooth On May 4, 2:29 pm, Dan Forever the.mep...@googlemail.com wrote: Excellent, where did you find that? On May 4, 9:38 pm, DonFrench dcfre...@gmail.com wrote: In Android 2.0 +: Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableIntent, REQUEST_ENABLE_BT); On May 4, 2:09 am, Dan Forever the.mep...@googlemail.com wrote: I'm looking to create a button in my app that essentially does the same thing as if a user went to Settings-Wireless Networks-Bluetooth settings and opted to connect (or disconnect) to a previously paired bluetooth device. Unfortunately I can't see how this is done from the android bluetooth api. Am I looking in the wrong place? Is there an Intent that can be sent to act as a shortcut to that settings menu option? Thank you for any suggestions you can offer - Dan -- 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 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 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] Change Text color and text size in listview
In my project im Multiple choice listin this all text view in white color...i want to change text color... in program im use simple xml main.xml ?xml version=1.0 encoding=utf-8? RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:background=#00 ListView android:id=@+id/android:list android:layout_marginTop=2px android:layout_marginLeft=2px android:layout_marginRight=2px android:layout_width=fill_parent android:layout_height=wrap_content android:layout_weight=1 android:background=@drawable/shape_1 android:listSelector=@drawable/shape_3 android:textColor=#00 android:layout_marginBottom=44px / /RelativeLayout im ListActivity class setContentView(R.layout.main); setListAdapter(new ArrayAdapterString(this, android.R.layout.simple_list_item_multiple_choice, GENRES)); listView =getListView(); listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); in how to change text color and text size...plz help me... -- 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] Location Device and Information Usage
On Sat, May 8, 2010 at 6:02 PM, Dirac Comb diracc...@gmail.com wrote: Are there any interfaces available to find out when an application uses location information? You want to know when a specific app is using the locations services? I doubt this is possible. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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] How to differenciate two tables
Hi friends I have two tables.I want to get all records from one table that are different from the records in second table. For eg. if we have four records in first table like A,B,C,D and three records in second table thats A,B,C then the answer of query should be D. I have tried EXCEPT operator but it doesnt work fine.Kindly help me in writing correct query for the given problem. Any help is appreciated Thanks in Advance Nemat -- 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] Readind the APN setting data
Hi all How to read the access point network setting data in android from the database. -- 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] Single App Across Platforms.
On Sun, May 9, 2010 at 4:27 PM, Ubuntu Explorer ubuntuexplo...@gmail.comwrote: Does the Manifest have elements like screen size, resolution, CPU architecture etc? Can't you just look for yourself? http://developer.android.com/intl/fr/guide/topics/manifest/manifest-intro.html http://developer.android.com/intl/fr/guide/topics/manifest/manifest-intro.html - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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] APK not installing, permission request loop at install
I have an app that is will work just fine if I install it directly via ADB, but when I export it into an APK file it will not install, whenever you try it loops on the permissions page, and instead of installing when you click install or okay, it just opens that page again. I have tried compiling it from two different computers with different OS's, and I still have the same issue, what might be causing this? -- 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: Widget like MapView
Thank you! I am sorry for my impatience. Will keep that in mind before I post anything. On May 12, 3:45 pm, Mark Murphy mmur...@commonsware.com wrote: Ajaywrote: Anybody has a clue? If you need help within six hours, please hire a consultant. Otherwise, please wait 24-48 hours before bumping your posts. Is there a widget that can scroll diagonally? There is no built-in widget that can scroll diagonally. I read some tutorial about loading a MapView in your own activity. The Google maps is a beautiful application that scrolls in any direction the user moves around. I want to develop a similar application, that could scroll in any direction, but the difference being it has to display it's own UI. Is this possible? If yes, then how? Draw on the Canvas, using the techniques used by games for rendering a portion of a large map on the screen and allowing scrolling in whatever directions the larger map supports. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android App Developer Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android 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
Re: [android-developers] Sales down in may?
On Wed, May 12, 2010 at 7:00 AM, jtwoods4 jtwoo...@gmail.com wrote: No one ever replies to posts on this forum. Did you notice someone replied to this very post right before you? You might be confusing this group with the Android Market Support Forum ... - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- 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] ListView created programmat ically - emptyView doesn’t pop up
Take a look at the AdapterView http://webcache.googleusercontent.com/search?q=cache:DuD-98M6iV4J:www.netmite.com/android/mydroid/frameworks/base/core/java/android/widget/AdapterView.java+android+AdapterViewcd=6hl=enct=clnk Sorry, that's the only link I could get in a rush. You should though have the Android sources locally... BR, Adrian Vintu http://adrianvintu.com On Wed, May 12, 2010 at 2:45 PM, TreKing treking...@gmail.com wrote: On Sat, May 8, 2010 at 3:11 AM, yorick yuri.opo...@gmail.com wrote: what can be wrong? Try setting the empty view BEFORE setting the adapter, or call adapter.notifyDataSetChanged() after setting the empty view. Maybe this will trigger the change. Not sure. Also, your constructor takes a Context and an Activity, which IS a context, so the first parameter is pointless. Then you use getContext(), which I don't know how it's defined, but you're already passing in two contexts - might as well use one of them there. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView created programmat ically - emptyView doesn’t pop up
A ListView's 'empty-view' has to be part of the main Window, i.e. it has to be added as a content-view of your activity. Why... i don't know, but that's how i got it to work: LayoutInflater vi = (LayoutInflater)mParent.getSystemService(Context.LAYOUT_INFLATER_SERVICE); emptyView = vi.inflate(R.layout.empty_view, null); // emptyView is View, and member of PlayerList this.addContentView(emptyView, layoutParms); this.setEmptyView(emptyView); (where layoutParms specify FILL_PARENT for both width and height) On May 8, 4:11 am, yorick yuri.opo...@gmail.com wrote: I've created custom ListView programmatically, and set view to pop up when ListAdapter is empty. But when data adapter is empty, nothing shows on the screen, what can be wrong? here is constructor's code: public PlayerList(Context context, Activity activity) { super(context); mParent = activity; setOnItemClickListener( new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id) { ... } }; ListPlayerInfo players; players = getPlayerList(); // here size of players == 0 setAdapter(new PlayersAdapter(this.getContext(), R.id.player_name, players)); LayoutInflater vi = (LayoutInflater)mParent.getSystemService(Context.LAYOUT_INFLATER_SERVICE); emptyView = vi.inflate(R.layout.empty_view, null); // emptyView is View, and member of PlayerList this.setEmptyView(emptyView); } -- 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: Sales down in may?
Hi, Yes I updated a few of them (actually did about 3 releases in the past month due to bugs) Does that have a impact? 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: Detect if Screen is locked (Live Wallpaper)
I haven't tried this yet, but take a look at the KeyguardManager class. On May 9, 5:09 pm, jenom neu...@googlemail.com wrote: Hello, I'm currently implementing a live wallpaper. This is also visible, when the device is locked. Now I want to show different content, when it is locked but can't find a way to detect this. PowerManager can only change the settings and the wallpaperEngine only gives me a general onVisibiltyChanged() method, which triggers every time you return to the home screen. Dos anybody know a way to detect if the device is locked? 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 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: HTC Incredible - images not showing up in Gallery
Are you thinking that the HTC Incredible does NOT scan the SD-card when one is re-inserted (re-mounted)? That would suck. On May 9, 5:48 am, Martiño martino.figue...@gmail.com wrote: Hello, I'm making an alternative camera App. As you might expect my App involves taking pictures and saving them to the sdcard. On most phones (and the Emulator) everything works fine, pictures appear in the built-in Gallery App straight away. However on the HTC incredible images only appear when the user restarts the device. (I'm talking about an HTC Incredible phone with an sdcard, I know some of them shipped with internal storage only, but this is not the issue I'm talking about) The code I'm currently trying goes like this: public static boolean savePicture(Bitmap bitmap, int quality, String label, Context context) { ContentResolver resolver = context.getContentResolver(); // Save the name and description of an image in a ContentValues map. ContentValues values = new ContentValues(3); values.put(MediaStore.MediaColumns.MIME_TYPE, image/jpeg); values.put(MediaStore.MediaColumns.TITLE, label + .jpg); // Add a new record without the bitmap Uri uri = resolver.insert(Media.EXTERNAL_CONTENT_URI, values); // Get a handle to the file for that record, and save the data into it. try { OutputStream outStream = resolver.openOutputStream(uri); bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outStream); outStream.close(); context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri)); } catch (Exception e) { return false; } return true; } I've also tried MediaScannerConnection.scanFIle() with no luck. I wonder is the problem is due to the HTC incredible being originally designed to operate with internal storage only, maybe the Gallery App has issues with media stored on the sdcard. -- 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] Running Services memory information not showing
Hi, I found that in Android 2.0 the memory information is not correctly shown for the running services. It always shown as 0.0. But it is shown perfectly in Android 2.1. Does anyone know what may be the problem in 2.0 version? -- 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: ListView created programmat ically - emptyView doesn’t pop up
Yes, exactly! I've tried everything, but nothing helped. Finally it turned out that emptyview must be a part of contentview, for example as in ApiDemos - List8. I've changed the way of creating PlayerList from programmatic to View.inflating(...) , PlayerView was a part of contentView (PlayerView and my emptyView were both inside FrameLayout), and I've called setEmptyView(findViewWithTag(...)) later in procedure of changing content view, and everything worked. On May 12, 6:05 pm, Streets Of Boston flyingdutc...@gmail.com wrote: A ListView's 'empty-view' has to be part of the main Window, i.e. it has to be added as a content-view of your activity. Why... i don't know, but that's how i got it to work: LayoutInflater vi = (LayoutInflater)mParent.getSystemService(Context.LAYOUT_INFLATER_SERVICE); emptyView = vi.inflate(R.layout.empty_view, null); // emptyView is View, and member of PlayerList this.addContentView(emptyView, layoutParms); this.setEmptyView(emptyView); (where layoutParms specify FILL_PARENT for both width and height) On May 8, 4:11 am, yorick yuri.opo...@gmail.com wrote: I've created custom ListView programmatically, and set view to pop up when ListAdapter is empty. But when data adapter is empty, nothing shows on the screen, what can be wrong? here is constructor's code: public PlayerList(Context context, Activity activity) { super(context); mParent = activity; setOnItemClickListener( new OnItemClickListener() { public void onItemClick(AdapterView? parent, View view, int position, long id) { ... } }; ListPlayerInfo players; players = getPlayerList(); // here size of players == 0 setAdapter(new PlayersAdapter(this.getContext(), R.id.player_name, players)); LayoutInflater vi = (LayoutInflater)mParent.getSystemService(Context.LAYOUT_INFLATER_SERVICE); emptyView = vi.inflate(R.layout.empty_view, null); // emptyView is View, and member of PlayerList this.setEmptyView(emptyView); } -- 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- Hide quoted text - - Show quoted text - -- 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] Strange Error: WIN DEATH: Window{44bba600 SurfaceView paused=false}
I have seen this when I was using OpenGL VBO and didn't reset the buffer bindings back to default. Leigh On 5/12/2010 4:55 AM, Renjith wrote: Hi All, Can anyone tell me why this error occurs ? WIN DEATH: Window{44bba600 SurfaceView paused=false} I could run the same programing in HTC Magic and when it comes to Nexus one, this error occurs. Thanks in advance Ren -- Leigh McRae www.lonedwarfgames.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] volume key pressed to ignore call
Hi, Is it possible to capture when the volume key is pressed to ignore a phone call? 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
Re: [android-developers] Re: Sales down in may?
It does by putting your app back at the top of the Just In category. On Wed, May 12, 2010 at 7:06 AM, chris price chris123pr...@googlemail.comwrote: Hi, Yes I updated a few of them (actually did about 3 releases in the past month due to bugs) Does that have a impact? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Follow us on Twitter @fuliginsoftware Join the forums. http://www.fuligin.com/forums -- 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: volume key pressed to ignore call
Okay, need to read the API a bit better ... AudioManager.getMode() is what I was looking for. On May 12, 7:33 am, EdKawas ed.ka...@gmail.com wrote: Hi, Is it possible to capture when the volume key is pressed to ignore a phone call? 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 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] string-array max size?
Hey, I have a string-array in my resource file that has a little over 1,000 items in it. When I go to launch the activity that calls an AutoCompleteTextView the app won't load this array it simply backs out of that activity and returns to the previous activity. If I delete a bunch of items in the array it begins to work. How can I make it hold all my items? Is there a max size associated with this? -- 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] Gallery elasticity at the ends
Hi all, I use the gallery view extensively as a full screen pagination mechanism. It works really well for me without having to create a brand new control. I would like to add a little elasticity at the ends (much like the iPhone homescreen). How could I go about doing this? Any hint as to which method I would need to override/modify? Thanks in advance. Nik -- 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