Re: [android-developers] Re: Urgent-Help

2010-04-09 Thread subrat kumar panda
Hello Kumar Bibek, Google Maps on your phone showing the current location i thing there is no problem in my phone. The GPS hasn been turned on in the first place. i think my code has some problem. here i am sending my code also, if u don't mind please check my code whether it's correct or not.

[android-developers] how to read database of one application in another application using contentproviders

2010-04-09 Thread saikiran n
Hi, I implemented sqlitedatabase using content provider in one application. And created some tables and some data in that. By using another application how to read those database. I am doing in second application as a sql query by using Content uri what i used in application one. But it is

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-09 Thread Bob Kerns
I'm not wrong. But it seems you aren't wrong either! I was consulting the source. It's definitely a CheckedTextView. I just confirmed it with the Hierarchy Viewer; there's no discrepancy. But I definitely see the radio button icon. Here's what's going on: The layout: CheckedTextView

[android-developers] Re: multi-touch not working !!

2010-04-09 Thread Bob Kerns
How do you know you lifted them in the same order you put them down? Give your description, I'd expect to see both orders. There are known limitations of the multitouch implementation on all the Android phones out there now. But this doesn't seem to me to be one. Try carefully putting one finger

[android-developers] Thread execution hiccups on Motorola Droid

2010-04-09 Thread Andrew P. Lentvorski, Jr.
Occasionally I see thread execution hiccups on my Motorola Droid (currently running 2.1 but I saw it with 2.0.1, too). Normally my dummy thread (full tilt, foreground, not doing *anything* else) runs in about 5-6mS. However, I see a second hump around 13-14mS and stragglers anywhere out to 80mS

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Clankrieger
Hi, I had a lot of difficulties getting the threading and app lifecycle issues done, too. For my part, this was much more confusing than getting the actual game done. ;) The good thing is: you do not have to do too much for the render- and logic-thread separation because most of the rendering

Re: [android-developers] Re: Call blocking application

2010-04-09 Thread jitendra kumar
We can't block incoming call using coding as we are not able to get Phone object. Phone object must to block incoming call. Using SDK we can register for incoming call events but we can't block it as we do not have Phone object which used to block incoming call. if you find any clue please let

[android-developers] Trying to achieve scale centerCrop with Activity windowBackground drawable

2010-04-09 Thread patbenatar
Hey all- I apologize in advance if the list receives two copies of this... I was having some issues with my Google account for the past few hours and it doesn't appear as if this post made it through. I am trying to display my splash screen image [I use the splash when fetching data from a Web

[android-developers] To close the virtual keyboard

2010-04-09 Thread rajesh chandrasekaran
Hi all, I am new in android, i need to close the virtual keyboard when user enter the Enter button in virtual keyboard. How to close it. Please help me. Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to

[android-developers] Re: To close the virtual keyboard

2010-04-09 Thread jamesc
Read the Android blog posts on IMEs: http://android-developers.blogspot.com/search/label/Input%20methods On Apr 9, 9:51 am, rajesh chandrasekaran crajeshdanger...@gmail.com wrote: Hi all,          I am new in android, i need to close the virtual keyboard when user enter the Enter button in

[android-developers] Re: List View Item Strange Behavior

2010-04-09 Thread Binesy
Ok thanks. I'll give that a try and see if it works On Apr 8, 6:57 pm, ~ TreKing treking...@gmail.com wrote: On Thu, Apr 8, 2010 at 4:42 AM, Binesy ross.bi...@gmail.com wrote: Why is this happening and how can I fix it? The ListView will re-use views it uses, as you see by the convertView.

[android-developers] help about new ContactsContract API

2010-04-09 Thread Gibson
Hi, I try to use following code to insert a new contact into the ContactsProvider. But I cannot see it in the native Contacts application. Is there something wrong with my code? ContentValues values = new ContentValues(); values.put(RawContacts.ACCOUNT_TYPE, );

[android-developers] Re: Problem with Vertical Scroll Bar *thumb* in WebView !!!

2010-04-09 Thread AJ
Any clue guys - AJ On Apr 8, 9:40 am, AJ ajeet.invinci...@gmail.com wrote: My code is like that :- LinearLayout     WebView      TableLayout      TableRow                         Button /                         Button /                 /TableRow         /TableLayout /LinearLayout

[android-developers] Re: Best practise for storing app. Configuration

2010-04-09 Thread Kim Ras
Excellent, I looked at that and was not sure if that fas able to share the settings between Servises and Activities.. I will look again Thanks Kim -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: applying themes to views

2010-04-09 Thread Bob Kerns
Just to clarify/avoid a possible misunderstanding If you are using a WebView to do your album, rather than building it out of Android's widgets (as Nick suggests), then you CAN, of course, use CSS. The Android UI toolkit supports styles and themes, which act somewhat like CSS, but with a

Re: [android-developers] Re: Accelerometer - direction of shake?

2010-04-09 Thread Jason LeBlanc
How much faster? On Apr 8, 2010 7:32 PM, BobG bobgard...@aol.com wrote: If you move the phone left and right when looking at the screen, thats moving in the x axis, so if you take sanples faster than you are shaking it, as ordained by Mr Nyquist, you will see the accel increasing, then slowing

[android-developers] Contacting Market Customers

2010-04-09 Thread momojo
I have an app which relies on a 3rd party service. I usually have about a 75% retention rate and good ratings all around. The other day the service my app uses had some technical difficulties. This caused my app to FC for many users and unfortunatley those are usually the customers that rank an

[android-developers] Re: [android-porting] 3GP audio support in Eclair

2010-04-09 Thread Uander
Followed by your comments , plz find my inline replies : On Fri, Apr 9, 2010 at 2:42 PM, Deva R r.deva...@gmail.com wrote: Hi, - have ever seen a file inside gallery or music app? after booting eclair for first time, i always have to wait like 5 minutes for mediascanner to finish loading

Re: [android-developers] Service vs Singleton

2010-04-09 Thread Mark Murphy
ailinykh wrote: Hello, everybody! Android has such concept as a Service. It makes sense for interprocess communication. But if I need this service from Activities running in the same process regular singleton seems to be more convenient. No need to register, to bind. Are there any benefits

[android-developers] How to let soft keyboard overlap the footer of window

2010-04-09 Thread James Wang
Hi, My customer want soft keyboard can overlap the footer(menu bar) of window when showing up. We noticed soft keyboard squeeze the foreground window to smaller size when showing up. So we overrided onSizeChanged and set footer which is in linearlayout and below one webview to be GONE. But we got

Re: [android-developers] Re: how to get device's movement speed?

2010-04-09 Thread Jason LeBlanc
Well, if your just spinning the device on end, I would consider it's movement speed to be Zero. Your interested in angular velocity, which is not linear velocity. So the fact that 'velocity = distance/time' doesn't matter for this scenario. Instead of a linear measurement like miles per hour

Re: [android-developers] How to let soft keyboard overlap the footer of window

2010-04-09 Thread Mark Murphy
James Wang wrote: My customer want soft keyboard can overlap the footer(menu bar) of window when showing up. It should do that by default. Make sure you have android:windowSoftInputMode=adjustPan in your manifest for this activity. We noticed soft keyboard squeeze the foreground window to

[android-developers] Re: [android-porting] 3GP audio support in Eclair

2010-04-09 Thread Uander
On Fri, Apr 9, 2010 at 4:47 PM, Deva R r.deva...@gmail.com wrote: nothing looks positive yet., can you make sure 'ls /sdcard' is showing valid conent?? It shows all file including .3gp one as well : ls -l /sdcard audio bigplanet dcim images video MLO_working uImage uImage_Amit test2.3gp

[android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Jason LeBlanc
I have a scenario where I start a Service from a splash screen. If I intentionally cause problems in that Service (such as an invalid port for the Socket connection) my UI Thread locks up. I have put a Timer in the Service, and have it perform logging at every tick. The Timer works from within the

[android-developers] Reg: Layouts

2010-04-09 Thread Santha
Hello Everyone, I'm currently looking in to layouts. can anyone tell me which layout is the best layout to be used for all kind of applications. and Why? Thanks in Advance, Santha -- You received this message because you are subscribed to the Google Groups Android Developers

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Mark Murphy
Jason LeBlanc wrote: I have a scenario where I start a Service from a splash screen. If I intentionally cause problems in that Service (such as an invalid port for the Socket connection) my UI Thread locks up. I have put a Timer in the Service, and have it perform logging at every tick. The

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Agus
Have you tried launching a thread inside your Service and have your Service binded/started in the Application context? On Fri, Apr 9, 2010 at 5:23 AM, Jason LeBlanc jasonalebl...@gmail.comwrote: I have a scenario where I start a Service from a splash screen. If I intentionally cause problems

Re: [android-developers] List View Item Strange Behavior

2010-04-09 Thread Agus
You are using convertView object which is a recycled view. On Thu, Apr 8, 2010 at 2:42 AM, Binesy ross.bi...@gmail.com wrote: Hi, I have been having some strange behavior when refreshing a listview from a button in a list item. Say you have a list of 4 items, indexes 0-3 and you click on

[android-developers] Re: real ip address

2010-04-09 Thread Engin Arslan
Thanks mscwd01 for answer, can you give example , code? thanks On Mar 30, 3:52 pm, mscwd01 mscw...@gmail.com wrote: The only way I found to do this was by opening a socket connection and reading the IP that way. I couldn't find a nice getIP() method. On Mar 30, 11:32 am,EnginArslan

[android-developers] Re: Service vs Singleton

2010-04-09 Thread ailinykh
Using a service gives you: 1. Less chance of garbage collection problems from failing to null out the singleton. This one I don't understand. What do you mean? Andrey -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Eddie Ringle
I'm a bit confused. What exactly is Game.sInstance? And can you explain what the update() and render() methods do? (Well, I know what they _do_, but I do not know how they are doing it (pseudocode would work here).) My gameplay is probably going to be a bit bigger than what you have, so I don't

Re: [android-developers] Re: Service vs Singleton

2010-04-09 Thread Donal Rafferty
The singleton wont be killed by the system automatically like a service which could lead to GC problems On Fri, Apr 9, 2010 at 1:51 PM, ailinykh ailin...@gmail.com wrote: Using a service gives you: 1. Less chance of garbage collection problems from failing to null out the singleton.

Re: [android-developers] Re: Service vs Singleton

2010-04-09 Thread Mark Murphy
Donal Rafferty wrote: The singleton wont be killed by the system automatically like a service which could lead to GC problems Correct. Objects held in static data members, or referenced from a static data member, will not be garbage collected. Hence, you need to remember to null out those

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Jason LeBlanc
Mark, I have tried moving the start Service call to a manually-managed thread within the Activity, but with the same results. The UI Thread still hangs when the Service attempts to connect to an invalid server. Agus, In the Service, I instanciate a Connection object from which the class extends

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Mark Murphy
Jason LeBlanc wrote: I have tried moving the start Service call to a manually-managed thread within the Activity, but with the same results. The UI Thread still hangs when the Service attempts to connect to an invalid server. :: shrug :: If you think this is a bug in Android, create a sample

[android-developers] NPE in onItemClickListener

2010-04-09 Thread Al
I have a (Multi)AutoCompleteTextView which uses an item click listener. I received a crash report which shows a NPE in onItemClick(). In onItemClick, I use the selected view (param #2 of the listener) to do manipulation to the text, but looking at the source code for AutoCompleteTextView and it

[android-developers] 2nd phone line Line2 iPhone

2010-04-09 Thread alexdonnini
Hello, Probably, you have heard of the iPhone application called Line2. In short, it gives an iPhone a second phone number and line complete with contacts list, voice mail, etc., etc. I have been working on an application in the same area for Android but have run into the system's

Re: [android-developers] 2nd phone line Line2 iPhone

2010-04-09 Thread Mark Murphy
alexdonnini wrote: Probably, you have heard of the iPhone application called Line2. In short, it gives an iPhone a second phone number and line complete with contacts list, voice mail, etc., etc. It is more generically referred to as voice over IP (VOIP). I was wondering if anyone has

[android-developers] Re: 2nd phone line Line2 iPhone

2010-04-09 Thread alexdonnini
Hi Mark, Did you actually take a look at Line2? If you have, would be interested in your more detailed feedback. I do not believe that any of the Android applications you mention performs the same functions as Line2. I may be mistaken but I do not believe that Line2 is simply a VOIP application.

Re: [android-developers] 2nd phone line Line2 iPhone

2010-04-09 Thread Disconnect
At least google voice isn't VOIP, and ISTR that neither is skype (although that may have changed with recent releases.) They both function by dialing special-use numbers (google voice uses http to set up a line to remote mapping, so that when you call 202-111-2345 gvoice connects you to

Re: [android-developers] Urgent-Help

2010-04-09 Thread ~ TreKing
On Fri, Apr 9, 2010 at 12:48 AM, subrat kumar panda evergreen.sub...@gmail.com wrote: would you please anybody help me regarding this matter. it's very urgent First of all, why is this very urgent? Does someone's life depend on this? Along the same lines, please don't title posts Urgent-Help

[android-developers] Re: 2nd phone line Line2 iPhone

2010-04-09 Thread alexdonnini
Understood but I am not interested in VOIP. I am interested in implementing phone application functions. Again, based on my limited understanding, Line2 is not just a VOIP application. It actually performs phone app functions and can let users pamek calls over the ATT network, but I could be

Re: [android-developers] Re: 2nd phone line Line2 iPhone

2010-04-09 Thread Mark Murphy
alexdonnini wrote: Based on my limited understanding (I could be wrong), Line2 actually manages calls either via ATT or the Internet (VOIP), i.e. works alongside/replaces the iPhone phone application. It does not replace the iPhone phone application. It is just another application on the

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Eddie Ringle
Another thought occurred to me. I'm more comfortable with the old- fashioned game loop, and I noticed I can turn off auto-rendering. I'll see if this works out instead. On Apr 9, 8:55 am, Eddie Ringle ed...@eringle.net wrote: I'm a bit confused. What exactly is Game.sInstance? And can you

Re: [android-developers] Contacting Market Customers

2010-04-09 Thread ~ TreKing
On Fri, Apr 9, 2010 at 6:01 AM, momojo jason.kah...@gmail.com wrote: Is this allowable by Google Checkout Terms? Did you, you know, read the terms? =P I haven't, but you do get a contact email with each purchase that I assume gets forwarded to the customers. I assume the point of this is for

[android-developers] Re: NPE in onItemClickListener

2010-04-09 Thread Kumar Bibek
What are you trying to do? Can you elaborate a little bit? I guess you want an Autocomplete textview that is capable of having multiple values, something like an email to field. If this is the case, you have a simpler solution. Just change the way, AutoCompleteTextView behaves. Here is an

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Jason LeBlanc
Mark, I'm almost certain that I'm doing something wrong. I would even dare to venture that I'm taking the wrong approach entirely. I don't know what I don't know. My plan for the Connection Service is to manage the connection to the remote server entirely in the background. I am planning for the

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Mark Murphy
Jason LeBlanc wrote: Yes, the Connection extends Thread. Then be sure not to do anything time-consuming in the Connection constructor. Put the time-consuming stuff in run(). In this case, that includes opening your socket connection, because while it might not be time-consuming normally, it will

Re: [android-developers] help about new ContactsContract API

2010-04-09 Thread Dmitri Plotnikov
You should either use real, existing account name and type or null for both. If you are inserting into a google account, you should also add it to the MyContacts group. On Apr 9, 2010 2:08 AM, Gibson zclgib...@gmail.com wrote: Hi, I try to use following code to insert a new contact into the

[android-developers] Same Title bar but different view below it?

2010-04-09 Thread javame_android
Hi, In one of my Android Application I need to keep the title bar same but the view that is shown in the rest of the screen changes. So, I have taken different Activity for all the views that I need to show and set the title bar in every Activities onCreate method. Now, the problem is that I

[android-developers] Re: MediRecorder query

2010-04-09 Thread ani
check this file libmediaplayerservice/MediaRecorderClient.cpp. This client i guess gets called by libmediaplayerservice/ MediaPlayerService.cpp file which gets the object of MediaRecorderClient. In this file(MediaRecorderClient.cpp) we are creating the object of PV media and passing it to user

Re: [android-developers] Same Title bar but different view below it?

2010-04-09 Thread Mark Murphy
javame_android wrote: In one of my Android Application I need to keep the title bar same but the view that is shown in the rest of the screen changes. So, I have taken different Activity for all the views that I need to show and set the title bar in every Activities onCreate method. Now,

[android-developers] dex.jar not loaded from SDK folder

2010-04-09 Thread Eric Carman
I got the following error this morning: Unknown error: Unable to build: the file dex.jar was not loaded from the SDK folder! Everything was fine when I shut down last night, but this morning I get this error. I am at a loss as to what to do about it. Any suggestions? Running Eclipse Ganymede

[android-developers] HTML page on Android 2.1 browser renders very small

2010-04-09 Thread Jay-andro
I have a bunch of pages that render normally on the Android 1.6 native browser as well as on the iphone Safari browser, but are heavily zoomed out and small by default on the Android 2.1 native browser. The pages are zoomed out by about 4x making them appear very small. Of course I can manually

Re: [android-developers] Reg: Layouts

2010-04-09 Thread ~ TreKing
On Fri, Apr 9, 2010 at 7:26 AM, Santha nsd1...@gmail.com wrote: I'm currently looking in to layouts. Good for you! can anyone tell me which layout is the best layout to be used for all kind of applications. There is none. and Why? Because there is no best for all, only best for

[android-developers] Re: Same Title bar but different view below it?

2010-04-09 Thread javame_android
Hi, Thanks for your fast response. I am just a bit confused by what you said. Suppose I have a Class A that has my button logic, then according to what I understood I need to 1. Create a subclass of A such as Class B extends A 2. Other activities subclass B such as Class C extends B If

[android-developers] Re: Reg: Layouts

2010-04-09 Thread Charlie Collins
That sounds like a trick question ;). The best layout depends on the situation you are in, the context. There is no one best for all kind of applications. That said, RelativeLayout is often noted as the most robust layout because it can sometimes be used to replace multiple other types of

Re: [android-developers] 2nd phone line Line2 iPhone

2010-04-09 Thread mike
On 04/09/2010 06:57 AM, Disconnect wrote: At least google voice isn't VOIP, and ISTR that neither is skype (although that may have changed with recent releases.) They both function by dialing special-use numbers (google voice uses http to set up a line to remote mapping, so that when you call

[android-developers] Re: Same Title bar but different view below it?

2010-04-09 Thread javame_android
Hi, One more thing then when I need to display this subclasses, will they be displayed as we normally display one activity from another activity i.e. startActivity(intentObj). Please reply if anyone knows the solutions. Thanks regards Sunil -- You received this message because you are

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread shaun
I suggest you take a look at the open source Android game Replica Island. Chris Pruett (a Google employee and Android advocate) programmed it and I understand he uses a Thread for rendering, a Thread for game logic and a Thread for the Activity (life cycle, input etc...). He has a

Re: [android-developers] HTML page on Android 2.1 browser renders very small

2010-04-09 Thread ~ TreKing
On Fri, Apr 9, 2010 at 9:51 AM, Jay-andro jayan...@gmail.com wrote: Anyone else face this issue, and is there a fix for this that doesn't break how it works on other browsers? The new browser has a setting open pages in overview that was on by default for me. Do you have this enabled? It will

[android-developers] Re: Where is the import android.hardware.CameraDevice

2010-04-09 Thread Charlie Collins
Most of the tutorials that use CameraDevice are from ~2007. CameraDevice was around pre-1.0, I believe. Currently you would use the Camera class and the callbacks around it, etc.: http://developer.android.com/reference/android/hardware/Camera.html. Here is a more recent tutorial (no idea if it's

[android-developers] Re: Service vs Singleton

2010-04-09 Thread Gubatron
Is there anything wrong about putting those background tasks on threads? That's how I've been doing it so far. I don't need these tasks to do any IPC and my Runnables already support Lifecycle logic (implemented by me initially for other java project) On Apr 9, 9:11 am, Mark Murphy

[android-developers] Re: Same Title bar but different view below it?

2010-04-09 Thread javame_android
Hi, I have been able to extend the class and get the button click event in the same Activity. But now there is another issue. I want to display images in Gallery from that button click but its not happening so if I click on that button from another activity. The onclick method is being called

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Robert Green
It's pretty easy to do this: I use a World to write to and read from for the two sides. Makes networking nice too. My World has a simple lock. Only one thing can write to it or read from it at a time. in GameLogicThread: run() { while (!done) { // wait for renderer world.getLock(); //

[android-developers] Re: Service vs Singleton

2010-04-09 Thread ailinykh
On Apr 9, 8:11 am, Mark Murphy mmur...@commonsware.com wrote: Donal Rafferty wrote: The singleton wont be killed by the system automatically like a service which could lead to GC problems Correct. Objects held in static data members, or referenced from a static data member, will not be

Re: [android-developers] Re: Service vs Singleton

2010-04-09 Thread Mark Murphy
ailinykh wrote: On Apr 9, 8:11 am, Mark Murphy mmur...@commonsware.com wrote: Donal Rafferty wrote: The singleton wont be killed by the system automatically like a service which could lead to GC problems Correct. Objects held in static data members, or referenced from a static data member,

[android-developers] combining 1.5 and 1.6

2010-04-09 Thread BrianS
Hi I'm wondering if it's possible to have an app that has a portion of its code implemented using Android 1.5 (API Level 3) and part using 1.6. (For example maybe implementing one of the app's activities in 1.6 while the overall app is in 1.5)? thanks much Brian -- You received this message

Re: [android-developers] Re: how to get device's movement speed?

2010-04-09 Thread Frank Weiss
I also thought getting angular movement from the accelerometer would be a problem. However, note that it provides *proper acceleration*. You can track the ambient gravitational field as a 3D vector. On Apr 9, 2010 4:55 AM, Jason LeBlanc jasonalebl...@gmail.com wrote: Well, if your just spinning

[android-developers] Re: Service vs Singleton

2010-04-09 Thread ailinykh
On Apr 9, 11:07 am, Mark Murphy mmur...@commonsware.com wrote: ailinykh wrote: On Apr 9, 8:11 am, Mark Murphy mmur...@commonsware.com wrote: Donal Rafferty wrote: The singleton wont be killed by the system automatically like a service which could lead to GC problems Correct. Objects

Re: [android-developers] combining 1.5 and 1.6

2010-04-09 Thread Mark Murphy
BrianS wrote: Hi I'm wondering if it's possible to have an app that has a portion of its code implemented using Android 1.5 (API Level 3) and part using 1.6. (For example maybe implementing one of the app's activities in 1.6 while the overall app is in 1.5)? You can write to the 1.5 API, then

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Eddie Ringle
Where do you store all your attributes, like player position? Currently I just have a GLQuad class that I use to create new quads, texture them, and manage position and velocity. Do you store them in World, and then each side can access them from the world object? Also, threading is new to me, so

[android-developers] Re: plotting Market sales - determining if your android work is profitable

2010-04-09 Thread kostmo
Here it is for Android: http://code.google.com/p/chartdroid/wiki/MarketSalesPlotter On Apr 4, 12:35 pm, Lance Nanek lna...@gmail.com wrote: Neat. I wonder if the market API could be used to do graphs for free apps as well:http://code.google.com/p/android-market-api/ On Apr 4, 1:54 am, kostmo

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-09 Thread Gubatron
Why are you reading the entire file into a byte array? That sounds right there like the OutOfMem error. public static byte[] getBytesFromFile(ContentResolver cR, String fileUriString) throws IOException { Uri tempuri = Uri.parse(fileUriString); InputStream is =

Re: [android-developers] Re: Service vs Singleton

2010-04-09 Thread Mark Murphy
ailinykh wrote: First at all singleton could be a member of the application. Then it will garbage collected with application. Then it is not a singleton. It is a data member of Application. As far as I understand one process runs one application. At a time, yes. However, when all

[android-developers] Re: unable to open database file after OS upgrade

2010-04-09 Thread Mariano Kamp
*bump* On Fri, Apr 2, 2010 at 12:53 PM, Mariano Kamp mariano.k...@gmail.comwrote: Hi, recently I very often get error reports from users that upgrade their OS. This includes at least 1.5, 1.6, 2.1 and custom ROMs. Anybody else seeing these? Any idea what to do about it? Cheers, Mariano

Re: [android-developers] Re: unable to open database file after OS upgrade

2010-04-09 Thread Mark Murphy
Mariano Kamp wrote: *bump* What have you done to gather more info? For example, is the issue that the database is deleted, or that the database exists but somehow the permissions are messed up? On Fri, Apr 2, 2010 at 12:53 PM, Mariano Kamp mariano.k...@gmail.com mailto:mariano.k...@gmail.com

Re: [android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-09 Thread Anna Powell-Smith
Why are you reading the entire file into a byte array? That sounds right there like the OutOfMem error. Because it's the only way that I know to get from a content Uri to the byte array that I use to create the FilePart element of the multipart message. It is possible to create the FilePart

[android-developers] Calling close() on a Cursor that's backing a ListView

2010-04-09 Thread westmeadboy
I'm using a SimpleCursorAdapter with ListView. I just noticed that calling AbstractCursor.close() in a non-UI thread will cause this exception: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. at

[android-developers] Re: Best practise for storing app. Configuration

2010-04-09 Thread Gubatron
Here's a static wrapper I implemented to get and set properties real easy package gubatron.android.util; import java.util.Arrays; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; /** * Convenience class to get or set

Re: [android-developers] how to read database of one application in another application using contentproviders

2010-04-09 Thread Frank Weiss
Android security does not allow reading another apps DB directly. You need to create a ContentProvider for that AFIAK. On Thu, Apr 8, 2010 at 11:26 PM, saikiran n saikiran@gmail.com wrote: Hi, I implemented sqlitedatabase using content provider in one application. And created some tables

Re: [android-developers] Re: MediaRecorder: unsupported paramter

2010-04-09 Thread Rogério de Souza Moraes
I am trying to create an application that streams video from android camera to a desktop. I am testing it in a Nexus One Device. I created a application based on the example of the file VideoCamera.java of Sipdroid and the file VideoCamera.java of Camera application. The difference between them,

[android-developers] Re: Send email in background

2010-04-09 Thread RMD
Just for anybody who comes across this link wondering the same thing, this worked for me: http://www.androidsnippets.org/snippets/166/ I only used a gmail account, but it worked. Good luck. On Apr 7, 8:32 am, RMD rmdel...@gmail.com wrote: Thanks for all the responses.  I was just getting the

[android-developers] Re: Multiple Listviews in single Activity?

2010-04-09 Thread DonFrench
@Frank Weiss I understand the difference between the two. The problem that I was trying to solve is that the behavior differs when an item is selected by the user versus by the program. When selected by the user, the appearance changes to reflect its selected state but when selected by the

[android-developers] Re: OutOfMemoryError: how best to transfer large video files into a byte array?

2010-04-09 Thread Gubatron
I suppose when you say FilePart, you mean this org.apache.commons.httpclient.methods.multipart.FilePart I'm thinking along these lines after looking at that API (I haven't tested this) final File theFile = new File(yourFileLargerThan2Mb.ext); //Implement your own PartSource to feed your File

Re: [android-developers] Calling close() on a Cursor that's backing a ListView

2010-04-09 Thread Mark Murphy
westmeadboy wrote: I'm using a SimpleCursorAdapter with ListView. I just noticed that calling AbstractCursor.close() in a non-UI thread will cause this exception: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its

Re: [android-developers] combining 1.5 and 1.6

2010-04-09 Thread Dianne Hackborn
Often easier is to build against the newest API you want to use, so you have full access to the newer XML attributes (which will be ignored by older platforms), and use any of a number of options for avoiding use of newer APIs on older platforms. There is a general blog post on dealing with

[android-developers] Re: AsyncTask : java.util.concurrent.RejectedExecutionException

2010-04-09 Thread Greg Giacovelli
Hi arnouf, I don't mean to butt in but I suspect this is a similar problem to something I saw before. In your ViewAdapter, I am assuming you are creating or using a View which is or contains an ImageView which you are trying to load the image contents for remotely. If you are always creating the

[android-developers] Retrieving PackName from RecentTaskInfo

2010-04-09 Thread Mark Hansen
I'm trying to the the application and icons for Recent Tasks, but I can't seem to get the appInfo using the RecentTaskInfo. The getApplicationInfo call is what is failing due to the getPackageName() returning null. ActivityManager manager =

[android-developers] Re: Service vs Singleton

2010-04-09 Thread ailinykh
Thank you, Mark! First at all singleton could be a member of the application. Then it will garbage collected with application. Then it is not a singleton. It is a data member of Application. Sorry, I wasn't precise. As far as I understand one process runs one application. At a

Re: [android-developers] Re: Service vs Singleton

2010-04-09 Thread Mark Murphy
ailinykh wrote: What do mean by when all components of an Android application are destroyed? Let's talk about Activity, for example. Does destroy Activity means unload Java class? No, I mean destroyed, as in onDestroy(). If so, what happens when system tries to destroy activity but it is

[android-developers] Timing out an AsyncTask?

2010-04-09 Thread HippoMan
I know how to use AsyncTask in a standard manner to manage operations that are in the background in relation to a UI thread. However, I want to run a task in the background which might run for a very long time under certain circumstances. In these cases, I would like to force the background task

[android-developers] Hard to describe ... How to quickly scan through all rows?! How to pass a cursor between two activities?!

2010-04-09 Thread Mariano Kamp
Hi, I have an app that has a list view of messages and a detail view. If you click on a message in the list view the detail view is opened for the message in the row you clicked on. In the detail view you also can go back and forth to other messages. So I pass in the position of the row the

Re: [android-developers] Retrieving PackName from RecentTaskInfo

2010-04-09 Thread Mark Murphy
Mark Hansen wrote: I'm trying to the the application and icons for Recent Tasks, but I can't seem to get the appInfo using the RecentTaskInfo. The getApplicationInfo call is what is failing due to the getPackageName() returning null. ActivityManager manager =

Re: [android-developers] Do Services *really* run in the Background?

2010-04-09 Thread Dianne Hackborn
I strongly recommend using IntentService, which takes care of the threading for you. Unless you are good at multithreading (I will claim that 90% of developers are not) then it is a good idea to stay away from Thread and use some higher-level facilities like IntentService, AsyncTask, etc. On

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread Robert Green
Yeah, you're going to want to model your game like you would model the real world: class World { public Player player; public Enemy[] enemies; public int timeLeft; public int level; //etc.. } Then you update the world (usually by calls to player.update, enemy.update, etc) from your

Re: [android-developers] Timing out an AsyncTask?

2010-04-09 Thread Romain Guy
AsyncTask was not designed for long running operations and should definitely not be used in the way you describe here. To cancel a task, just invoke cancel(). On Fri, Apr 9, 2010 at 10:50 AM, HippoMan hippo.mail...@gmail.com wrote: I know how to use AsyncTask in a standard manner to manage

[android-developers] Animations and Threads

2010-04-09 Thread Bevor
Hello, with AnimationDrawable I can handle animations well. But this class doesn't pay when I use a thread which draws on the canvas because it has no sense to draw with AnimationDrawable to the background of a View when there are a lot of animations to draw (http://

[android-developers] Re: Android OpenGL Game - App Architecture and Threading Logic

2010-04-09 Thread shaun
I wonder how much true parallelism is happening when the game logic runs on a separate thread than the rendering (in addition to the Activity thread for a total of 3). I do not claim to be an expert in this arena, but what follows is what I think about the subject of threads in Android games.

[android-developers] Re: Timing out an AsyncTask?

2010-04-09 Thread HippoMan
Of course I know about cancel(). When I mentioned the use of get(long timeout, TimeUnit unit), I thought it would be obvious that I would then invoke cancel() to terminate my overly-long-running task. But then, my UI thread would block while I'm waiting, as I stated above, which is not desirable.

  1   2   3   >