[android-developers] Position StaticLayout on Canvas

2011-02-27 Thread Boozel
Hi I am trying to draw some text onto a canvas. I was using canvas.drawText() but i need the text to be wrapped so i am now using StaticLayout.draw(canvas) which works fine except i cannot position the text. I have read some posts that suggest using canvas.translate(x,y) but when i have to draw

[android-developers] Re: Playing music in Background

2011-02-27 Thread Nightwolf
http://developer.android.com/intl/zh-CN/guide/topics/media/index.html On 27 фев, 06:27, Ankur Avlani ankuravl...@gmail.com wrote: Hi, I have developed an application in Android using Webview.  Now i want to play a music in background.  The Mp3 file will come from a URL dynamically.  Any

[android-developers] Preventing Multiple AppWidget Instances

2011-02-27 Thread String
There's no way to prevent it, no. IMHO, your best bet is to handle it gracefully: if the user wants to add multiple copies of your widget, let them. If that's not possible for whatever reason, then you will at least need to issue a warning. String -- You received this message because you

[android-developers] The best way to store data for animation

2011-02-27 Thread mastermind
I'm making simple animation for my app, just series of many png files (about 700). At one moment there are only 20 bitmaps in memory. Now all .png files stored in assets. What is the best way to store such data? 1) load all files to byte[] arrays and them dynamically decode and recycle bitmaps.

Re: [android-developers] EditText behaving weirdly

2011-02-27 Thread Richard Marsh
Ok. This is going to be pretty long. Posted below is the onCreateDialog and onPrepareDialog. Another, possible related issue is that when the screen rotates to landscape mode, the dialog box is opened again for reasons unknown. @Override protected Dialog onCreateDialog(int id) {

[android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread HeyYouThere
I followed her advice, however this seems to be the general concensus... http://www.google.com/support/forum/p/Android+Market/thread?fid=6d6cc0380c0b10d500049d3f4f0f3433hl=en It's so incredibly tempting to PM Eric Schmidt on FB and ask him if this is normalT_T On Feb 26, 8:44 pm, TreKing

Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 4:15 AM, HeyYouThere newsome...@gmail.com wrote: I followed her advice, however this seems to be the general concensus... http://www.google.com/support/forum/p/Android+Market/thread?fid=6d6cc0380c0b10d500049d3f4f0f3433hl=en Oh, that was you? LOL. I thought it was a

[android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread JAlexoid (Aleksandr Panzin)
It does apply, because the Market team just does not reply with explanations. Plain and simple. There is literally no way of knowing if what I do for my local users to be able to buy will result in the app being pulled without notice. I do sell. But with the slowness of market penetration, I have

[android-developers] Re: In-App Payments with Single-Click Checkout

2011-02-27 Thread oldskool73
Google made the mistake very earlier on (and still today) in not defining payment processors. It seems quite clearly defined to me? Payment Processor(s): Any party authorized by Google to provide payment processing services that enable Developers with optional Payment Accounts to charge Device

[android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread String
On Sunday, February 27, 2011 4:42:57 AM UTC, Kevin TeslaCoil Software wrote: It's especially funny (? not the right word for it) when compared to our users. We write apps that the user pays $1 or $2 for and then demands customer support and updates for the rest of their lives. The Google

[android-developers] Re: How To Determine Which Dialog Was Dismissed

2011-02-27 Thread hoyski
Thank you, Ian and Kostya, for your replies. As far as the brittleness, it may just be my own personal bias. I work mainly on large multi-threaded, multi-server apps where objects are constantly being serialized and de-serialized. Seeing an == comparison of two references is always a red flag in

Re: [android-developers] Re: How To Determine Which Dialog Was Dismissed

2011-02-27 Thread Kostya Vasilyev
Ok, if that helps your sleep - insomnia can be a terrible thing :) Unfortunately, there is no dismiss callback in Activity for managed dialogs, but small stub listeners should work fine. -- Kostya 27.02.2011 15:39, hoyski пишет: Thank you, Ian and Kostya, for your replies. As far as the

[android-developers] ProgressDialog Theme - TextColor or Background but not both

2011-02-27 Thread William Ferguson
I'm tryig to style my ProgressDialogs to have a certain background and a certain TextColor. I can set the background of the ProgressDialog content pane (but not the TextColor) if I define an alterDialogStyle in my main application theme and invoke the ProgressDIalog using the single arg

[android-developers] Re: Android 2.3: Music content providers for artists, albums and songs

2011-02-27 Thread Daniel
I would suggest these two intents for starting artist and album activities on an Android device now. They also work for Android 2.3 and 3.0. They do not look as good as the other activities build by Google but they work :-). For artists: String query = ; Intent intent = new Intent();

[android-developers] In-app purchase, how to test it on Android 2.3.3?

2011-02-27 Thread Christer Nordvik
I have a Nexus One with Android 2.3.3 and Market version 2.3.2. This method always returns false: @Override public void onBillingSupported(boolean supported) How are we supposed to test this then? This code is taken from the sample app so should be correct... -Christer -- You

[android-developers] 2.3.3 NFC Tag app breaks 2.3.2 NFC apps

2011-02-27 Thread MrChaz
The in built Tags app in 2.3.3 appears to use the TECH_DISCOVERED action which means that will obscure any 2.3.2 apps that use TAG_DISCOVERED... This is of course dependant on the TECHs that the Tags app is filtering - is there any public list of which ones? -- You received this message

[android-developers] Re: Preventing Multiple AppWidget Instances

2011-02-27 Thread Jake Colman
S == String sterling.ud...@googlemail.com writes: S There's no way to prevent it, no. S IMHO, your best bet is to handle it gracefully: if the user wants S to add multiple copies of your widget, let them. If that's not S possible for whatever reason, then you will at least need

[android-developers] Cost of requestLocationUpdates

2011-02-27 Thread Jake Colman
If I use the intent-based requestLocationUpdates using a time period of, say, 60 minutes I would expect that would be minimally 'expensive' in terms of resources. I expect that, internally, Android only queries for the new location at the expired time interval. But since you also have to

[android-developers] One User Has a Problem - How do I debug it?

2011-02-27 Thread Jake Colman
I have an appwidget that seems to be working for all my users but one. In his case, no matter what I try, the app cannot dynamically determine its location. The app works fine if he specifies where he so that the app can use reverse geocoding. On my own phone I have verified

Re: [android-developers] Re: Preventing Multiple AppWidget Instances

2011-02-27 Thread Kostya Vasilyev
Jake, You can watch for ACTION_APPWIDGET_UPDATE with a previously unseen widget Id, or specify a configuration activity for the widget. The config activity can be made transparent and finish right away, so it's just there as a callback for your logic. But if you do that, you've got to be

[android-developers] Re: Preventing Multiple AppWidget Instances

2011-02-27 Thread Jake Colman
Thanks. I guess nothing terrible will happen, it's just that it's not useful. Thanks. KV == Kostya Vasilyev kmans...@gmail.com writes: KV Jake, KV You can watch for ACTION_APPWIDGET_UPDATE with a previously KV unseen widget Id, or specify a configuration activity for the KV

[android-developers] System signing a test suite

2011-02-27 Thread GodsMoon
I'm writing a testing suite (for personal use only) for my other apps that triggers system intents. I know I need to add android:sharedUserId=android.uid.system to my android manifest in the manifest tag and I need to install my app in / system/app instead of the normal /data/data to have

Re: [android-developers] (Newbie warning) Adding one of the sample projects to Eclipse

2011-02-27 Thread Justin Giles
On Sat, Feb 26, 2011 at 10:21 PM, Ryan S music...@gmail.com wrote: Ah! That worked! Thanks! If my questions are too much of newbie questions for this group (it feels like it is) can anybody suggest a forum for total newbs like me to get basic answers to my questions? Google moved their

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Rishi Kumar
Hello Jake In one of our apps, we've created a debug log table for these types of things. We send out a debug version of the app which writes all relevant messages to this table. Then we have a button in the app to allow the user to send us an email file containing the log information (or we

[android-developers] Re: Controlling Android init process / staged boot

2011-02-27 Thread ale
Thank You for the info! I'll try my luck :-) On 26 Feb., 19:03, TreKing treking...@gmail.com wrote: On Fri, Feb 25, 2011 at 5:28 AM, ale ale.noval...@googlemail.com wrote: Any help on that subject is very much appreciated. I think you're in the wrong group. Try the platform group if you're

[android-developers] Re: Cost of requestLocationUpdates

2011-02-27 Thread Rishi Kumar
Hi Jake, This part of the code isn't well documented, but from my experience, here is how it works. minTime - notify me every X ms of an updated location. minDistance - notify me every X m of an updated location. So let's take an example. I request location updates every 1 hr and every

[android-developers] Re: how to show JSON data into list view

2011-02-27 Thread Rishi Kumar
Can I suggest that you separate the JSON parsing and the List View display into separate components of your code? I'd recommend that you do a translation between JSON and your domain model (Java beans) and then use those objects to interact with your Array Adapter. That way you can separate

[android-developers] Re: Simple Search App -- Help Required

2011-02-27 Thread Rishi Kumar
Hello Arun, Another option for this would be to load all the data into the SQLite table and then do the querying in there. There is a FTS index table type that is very good for this when you're dealing with a lot of data. A couple links that might help. -

Re: [android-developers] Re: Check permissions

2011-02-27 Thread Marcin Orlowski
On 27 February 2011 08:51, b_t bartata...@gmail.com wrote: Can Shared ID be used for this purpose with setting content provider as not exported? Then only my app could use this addon, am I right? Consider using permission mechanism instead with android:protectionLevel=signature, which would

[android-developers] Re: Listening to call log changes when app is not running

2011-02-27 Thread Rishi Kumar
Hi Tal, Can you register a broadcast receiver that listens to ACTION_PHONE_STATE_CHANGED and then make the check to the CallLog then? You can use this instead of the content observer if it works, so you can avoid making duplicate requests to the call log. -rishi -- You received this

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Jake Colman
RK == Rishi Kumar reeesh...@gmail.com writes: RK Hello Jake RK In one of our apps, we've created a debug log table for these RK types of things. We send out a debug version of the app which RK writes all relevant messages to this table. Then we have a RK button in the app to

[android-developers] Re: noob question I guess - input requires enter key

2011-02-27 Thread Russell DuRoss
Got it! Thanks. On Feb 26, 1:02 pm, rich friedel rich.frie...@gmail.com wrote: Go to MenuSettingsLanguage and Keyboard Settings and disable everything except Android Keyboard On Sat, Feb 26, 2011 at 12:09 PM, Harsh J qwertyman...@gmail.com wrote: On Sat, Feb 26, 2011 at 10:33 PM, Russell

[android-developers] Clear data from MediaStore

2011-02-27 Thread Dudero
Hello, I have a bug with my SGS Froyo 2.2: If I put new albums on my sd-card, they are not added into MediaStore after completing the MediaScanner. I tried the app SDrescan, but it does not solve my problem - it only executes a new media scan... But if I delete the media-store in the android

[android-developers] Re: Maps not working in the android emulator

2011-02-27 Thread Rishi Kumar
You posted the stack trace on stackoverflow right? This line is in the stack trace: Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity This is telling me that you're attempting to open a map outside of something that extends

Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread Brad Gies
I just want to say that it seems the Android Market team DOES provide support to developers. I have emailed them twice and both times they have responded within a day or so, and both times the answer they gave was roughly Thanks for the email it's done!!. I do agree they don't answer

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Rishi Kumar
Hey, I attached a couple of our java classes that perform this function. I had to clean up a bit and remove the package names, but i'm sure that won't slow you down :-) here is the database table definition: buf.append(CREATE TABLE ).append(DbMetadata.TABLE_DEBUG ).append(

[android-developers] Re: Listening to call log changes when app is not running

2011-02-27 Thread loyan
Hi Rishi, Thanks for your suggestion. Unfortunately I can't do that because when the ACTION_PHONE_STATE_CHANGED is fired the call log still doesn't hold the most recent call(s). I resorted to register to ACTION_PHONE_STATE_CHANGED and when the state becomes CALL_STATE_IDLE I set up an alarm

[android-developers] Re: Listening to call log changes when app is not running

2011-02-27 Thread Rishi Kumar
ah, gotcha. What if you combine the approaches? e.g. register for the broadcast, and then immediate register for content observer in a service? As soon as you get the reply back from the content observer you can perform you work and then terminate the service. -Rishi -- You received

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Jake Colman
Thanks, Rishi. You are a life (or at least a time) saver! I'll get your code up and running, add some preferences to enable logging and email and I should be in business. Thanks. RK == Rishi Kumar reeesh...@gmail.com writes: RK Hey, I attached a couple of our java classes that perform

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Rishi Kumar
no problem man. glad i could 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] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Jake Colman
Do I also need the implementation of ILogService? RK == Rishi Kumar reeesh...@gmail.com writes: RK Hey, I attached a couple of our java classes that perform this function. I RK had to clean up a bit and remove the package names, but i'm sure that won't RK slow you down :-) RK

Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 10:49 AM, Brad Gies rbg...@gmail.com wrote: I just want to say that it seems the Android Market team DOES provide support to developers. I have emailed them twice and both times they have responded within a day or so, and both times the answer they gave was roughly

Re: [android-developers] Re: Check permissions

2011-02-27 Thread Dianne Hackborn
There is *no* need to use a shared used ID. Signature-based permissions do this, in a much more clean way. Also as pointed out, you can't change your app to a shared used ID if it doesn't already use one. And I really discourage people from using shared user IDs; there are lots of subtle

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Rishi Kumar
no, its just an interface - the implementation is the DbLogService that i sent 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

[android-developers] Re: One User Has a Problem - How do I debug it?

2011-02-27 Thread Jake Colman
RK == Rishi Kumar reeesh...@gmail.com writes: RK no, its just an interface - the implementation is the RK DbLogService that i sent you Thanks again. This will be the first time that I am using a database and a content provider so this will be a useful learning exercise as well. -- Jake

[android-developers] Re: Listening to call log changes when app is not running

2011-02-27 Thread loyan
Interesting idea... So if I understand correctly, you suggest: 1. From the phone state receiver I'll start a service 2. The service will register a content observer 3. When the content observer calls back I'll stop the service Couple of questions re this idea: - I'll have to check in (1) and in

[android-developers] Strange nullpointer on setMessage() of a ProgressDialog

2011-02-27 Thread Patrick
Basically what I do: I invoke the method showDialog(PROGRESS_DIALOG_ID); which looks like (copy paste from the tutorial: protected Dialog onCreateDialog(int id) { switch(id) { case PROGRESS_DIALOG_ID: progressDialog = new ProgressDialog(this);

[android-developers] Draw Image next to text on canvas

2011-02-27 Thread Boozel
Hi I am drawing 3 blocks of text on a canvas. I am creating a staticlayout and then using staticlayout.draw(c) to draw the text so that it is wrapped. I now want to draw in image of quotation marks on either side of the text. Can any one tell me how to go about this? thanks for any help --

Re: [android-developers] Cost of requestLocationUpdates

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 8:27 AM, Jake Colman col...@ppllc.com wrote: But since you also have to specify a distance trigger doesn't that mean that Android is continually checking to see if you have moved the required distance? Both conditions must be met. So you if you specify 60 minutes and

[android-developers] Re: Cost of requestLocationUpdates

2011-02-27 Thread Jake Colman
Then that would seem to imply that it does not really cost anything to check on small moves as long as the repeat interval is not too high. In other words, I should worry more about how often I'm checking and not whether my distance is too small. T == TreKing treking...@gmail.com writes:

[android-developers] Re: Clear data from MediaStore

2011-02-27 Thread Dudero
My idea for an app is: 1. getting root-rights 2. disable media provider (com.providers.media) 3. delete the cache form the media provider: dbdata/ com.android.providers.media/* ?! 4. enable media provider 5. execute a rescan with mediascanner any feedback? -- You received this message because

Re: [android-developers] TableLayout issue

2011-02-27 Thread rael_yoni
First of all I would like to thank you. However it still not good. it shows only the first row in the middle of the screen (there are black bars above it and underneath it). and the second row is not seen at all... no matter what the content is (I placed TextViews instead of the

Re: [android-developers] TableLayout issue

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 1:32 PM, rael_yoni yoni.stoff...@gmail.com wrote: it shows only the first row in the middle of the screen (there are black bars above it and underneath it). and the second row is not seen at all... no matter what the content is (I placed TextViews instead of the

[android-developers] Beta Game Space Bike

2011-02-27 Thread brian purgert
here are some download links check it out. tell people about it, if you know any reviewers give them a link, also post problems, bugs, questions, suggestions http://www.megaupload.com/?d=R02OEBUE http://rapidshare.com/files/450131198/Space_Bike_Game.zip http://www.mediafire.com/?qnffd2qb8hrcjah

[android-developers] Re: Beta Game Space Bike

2011-02-27 Thread Spiral123
I'll give it a go. I did think of a name for the game as well: Crikey Bikey! On Feb 27, 2:56 pm, brian purgert brianpurge...@gmail.com wrote: here are some download links check it out. tell people about it, if you know any reviewers give them a link, also post problems, bugs, questions,

Re: [android-developers] Re: Beta Game Space Bike

2011-02-27 Thread brian purgert
Lol i like the name, post suggestions and what not and be honest. On Feb 27, 2011 4:05 PM, Spiral123 cumis...@gmail.com wrote: I'll give it a go. I did think of a name for the game as well: Crikey Bikey! On Feb 27, 2:56 pm, brian purgert brianpurge...@gmail.com wrote: here are some

[android-developers] Content Provider for Private Database?

2011-02-27 Thread Jake Colman
What are best practices? My app will use a private database to store debug information. Should I create it as a content provider and do my own data access that way or, since I do not intend to publish this database for anyone else to use, there is no point? Is best practice to alway wrap

[android-developers] Custom instrumentation test runner fails on android-8

2011-02-27 Thread donV
Hi all! I have made a custom instrumentation test runner, see below. This works fine on android-9, but fails on android-8. Is this a known issue? If so, is there are workaround for android-8? public class InstrumentationTestRunner extends android.test.InstrumentationTestRunner {

Re: [android-developers] Content Provider for Private Database?

2011-02-27 Thread Kostya Vasilyev
Jake, ContentProvider isn't just for exporting data. One useful thing it provides is data change notifications (based on data URIs). In practice, it means that ListViews with content provider-supplied data refresh automatically, and it's really easy to make other UI elements also update

Re: [android-developers] TableLayout issue

2011-02-27 Thread rael_yoni
That was just another test... that didn't work. Currently the only thing that does work is setting explicitly in code the height and the width of item activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); is.setLayoutParams(new TableRow.LayoutParams(metrics.widthPixels / 2,

[android-developers] Re: Content Provider for Private Database?

2011-02-27 Thread Jake Colman
Kostya, Unless I misread it, ACRA is good for catching thrown exceptions and automatically sending them to the developer. I am looking for something will allow me to create a trace file. Essentially, I'm looking for a good way to trap the kind of output that I might otherwise send to syslog

Re: [android-developers] Cost of requestLocationUpdates

2011-02-27 Thread Mark Murphy
On Sun, Feb 27, 2011 at 12:58 PM, TreKing treking...@gmail.com wrote: Both conditions must be met. So you if you specify 60 minutes and 60 meters, the check won't even run for at least an hour. Actually, that's not true. I thought it was, originally. The distance is a filter for what events you

Re: [android-developers] TableLayout issue

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 3:48 PM, rael_yoni yoni.stoff...@gmail.com wrote: That was just another test... that didn't work. Well, do you really a TableLayout in this case? If you just have two rows, consider a LinearLayout which might work better.

Re: [android-developers] Re: Content Provider for Private Database?

2011-02-27 Thread Kostya Vasilyev
28.02.2011 0:51, Jake Colman пишет: Kostya, Unless I misread it, ACRA is good for catching thrown exceptions and automatically sending them to the developer. I am looking for something will allow me to create a trace file. Essentially, I'm looking for a good way to trap the kind of output

Re: [android-developers] Re: Content Provider for Private Database?

2011-02-27 Thread Mark Murphy
On Sun, Feb 27, 2011 at 4:51 PM, Jake Colman col...@ppllc.com wrote: Getting back to the original topic, so a Content Provider is a good paradigm to use across the board even if the database is only meant to be used internally? Kostya is pro-ContentProvider. I'm far less of a fan. Notably: --

[android-developers] Looking for information on the Fragment dump() method (FragmentManager too)

2011-02-27 Thread davemac
Both of these classes have a dump() method which looks useful for debugging. I tried to use them in a sample application, but I'm not getting any output at all. My code looks like this from within my activity: public void dumpFragmentMgr() { FragmentManager fm =

Re: [android-developers] Cost of requestLocationUpdates

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 3:56 PM, Mark Murphy mmur...@commonsware.comwrote: On Sun, Feb 27, 2011 at 12:58 PM, TreKing treking...@gmail.com wrote: Both conditions must be met. So you if you specify 60 minutes and 60 meters, the check won't even run for at least an hour. Actually, that's not

Re: [android-developers] Cost of requestLocationUpdates

2011-02-27 Thread Mark Murphy
On Sun, Feb 27, 2011 at 5:18 PM, TreKing treking...@gmail.com wrote: I did not get an update and my nearby stops list did not refresh until the 5 minutes were up, when the location check finally kicked in and I my listener was triggered because the distance was far enough. That's what I

Re: [android-developers] Cost of requestLocationUpdates

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 4:24 PM, Mark Murphy mmur...@commonsware.comwrote: That's what I meant by distance is a filter. minTime controls how frequently the tech checks your position, though minTime is a guideline and not an absolute. Regardless of minTime, though, if minDistance has not been

Re: [android-developers] Re: Content Provider for Private Database?

2011-02-27 Thread Dianne Hackborn
Fwiw, a database is way overkill for a debug log or other such thing. Databases aren't free -- all of their features come with significant costs. If you actually are using those features (queries etc) then they are useful. But for a debug log? You are bringing in a ton of overhead for no real

[android-developers] NullPointer Exception

2011-02-27 Thread Hendrik Greving
Hi I am getting a NullPointerException but no real log where it occurs. How can I debug this? It crashes when it returns from onCreate from the first Activity ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2496

[android-developers] Re: NullPointer Exception

2011-02-27 Thread DanH
http://stackoverflow.com/questions/1217449/how-can-i-debug-this-nullpointer-exception On Feb 27, 5:03 pm, Hendrik Greving fourhend...@gmail.com wrote: Hi I am getting a NullPointerException but no real log where it occurs. How can I debug this? It crashes when it returns from onCreate from the

[android-developers] Re: NullPointer Exception

2011-02-27 Thread Hendrik Greving
I found it. I learned that with Run-Add Java Exception Breakpoint you can actually catch the exception - Original Message - From: Hendrik Greving To: Android Developers Sent: Sunday, February 27, 2011 3:03 PM Subject: NullPointer Exception Hi I am getting a

[android-developers] Cannot have more than one INSTALL_REFFERER receiver in Android Manifest?

2011-02-27 Thread mscwd01
I am using the AdMob install receiver in my Android Manifest file, e.g. !-- AdMob Install Receiver -- receiver android:name=com.admob.android.ads.analytics.InstallReceiver android:exported=true intent-filter action android:name=com.android.vending.INSTALL_REFERRER / /intent-filter

[android-developers] Re: Custom instrumentation test runner fails on android-8

2011-02-27 Thread donV
Found a workaround: Set the name of the test to runTest. Is there a way to detect the api-level of the device running the tests? public class InstrumentationTestRunner extends android.test.InstrumentationTestRunner { public TestSuite getAllTests() { suite = new TestSuite(Sweet);

[android-developers] Re: TableLayout issue

2011-02-27 Thread Jonathan Foley
I agree with TreKing. I have never found a situation where I actually need a TableLayout. They are too restrictive IMO and don't afford much control over layout. One gets better control using RelativeLayout or LinearLayout. For the type of weighted proportional layout you're after, you'll want to

[android-developers] exception in getting data from cursor(database)

2011-02-27 Thread Honest
hello, i am retrieving Cursor from database but when i am trying to get data from cursor using colIndex. i am getting exception. can some one tell me what is wrong in it. the following is code i am using . it is giving exception at the sentence data[i]=result.getString(colIndex); /*code*/

Re: [android-developers] exception in getting data from cursor(database)

2011-02-27 Thread TreKing
On Sun, Feb 27, 2011 at 6:55 PM, Honest honestsucc...@gmail.com wrote: i am getting exception. can some one tell me what is wrong in it. Not if you don't even specify what the exception is. -

[android-developers] Re: Saving layout file is very slow with Eclipse / ADT

2011-02-27 Thread Arron
I found this to be a problem in ADT 10. It's super slow to edit an XML file. It keeps rebuilding (to generate the new R) but it's painstakingly slow. I didn't have this issue until the recent upgrade. Makes it nearly unbearable to make any changes in the XML under eclipse. I had to edit it

[android-developers] Re: Saving layout file is very slow with Eclipse / ADT

2011-02-27 Thread Zsolt Vasvari
It's been that way for a very long time. It's not the ADT version, but the # or combined size of the resource files that seems to matter. Perhaps you reached that magic value coincidentally the same time as the new ADT? On Feb 28, 9:37 am, Arron arro...@gmail.com wrote: I found this to be a

RE: [android-developers] exception in getting data from cursor(database)

2011-02-27 Thread Tommy
It could be a mess of different things. Could you post the error? How many times does it loop before the exception? You might want to do result.getCount() -1;i++ I haven't worked much with arrays and getting the number of elements back but in VB if you have 10 items it returns 10, but since arrays

[android-developers] Re: TableLayout issue

2011-02-27 Thread Zsolt Vasvari
I agree that a TableLayout can always be replaced with Relative and/or Linear layouts, but I still find it a very convinient shorthand in a lot of cases. It's also a lot more readable than a RelativeLayout and it's also much easier to modify than the nightmare that a RelativeLayout is when are

[android-developers] Re: Fragment question: inter-fragment communication?

2011-02-27 Thread Gregg Reno
Maybe this covered earlier in this thread and I'm still not understanding it. I like the idea of a each fragment communicating back to the activity rather than to other fragments. Then the activity can decide whether it needs to send information to other fragments. So is there an existing

Re: [android-developers] Re: Fragment question: inter-fragment communication?

2011-02-27 Thread Dianne Hackborn
Fragment.getActivity().doSomething(). A little more formally, define an interface for the fragment to call back on the activity it is running in, which each activity using that fragment can implement. On Sun, Feb 27, 2011 at 6:39 PM, Gregg Reno gregg.r...@gmail.com wrote: Maybe this covered

Re: [android-developers] Re: Fragment question: inter-fragment communication?

2011-02-27 Thread Gregg Reno
OK, that makes sense. Thanks Dianne. -Gregg On Feb 27, 2011 9:53 PM, Dianne Hackborn hack...@android.com wrote: Fragment.getActivity().doSomething(). A little more formally, define an interface for the fragment to call back on the activity it is running in, which each activity using that

[android-developers] Re: ListView/ExpandableListView Imageview flicking

2011-02-27 Thread Sao Kim Beng
Below is my code: AllBuddyListAdapter.class: private class AllBuddyListAdapter extends BaseAdapter { public ListBuddyTO allBuddyList; public AllBuddyListAdapter(Context con, ListBuddyTO allBuddyList){ this.allBuddyList =

[android-developers] Re: ListView/ExpandableListView Imageview flicking

2011-02-27 Thread Sao Kim Beng
Thanks. I will try on the method. On Feb 27, 3:26 pm, Rajesh Kumar rajnitj.g...@gmail.com wrote: Rather than Base Adapter use ArrayAdapter.NotifyDataSetChanged will call for all views which are currently Visible.Try to invalidate layout.I hope it will work. On Sat, Feb 26, 2011 at 6:31 AM,

Re: [android-developers] Launching an app from the quick search box creates a new instance of the app?

2011-02-27 Thread ZEAN QIN
Hi, sureshmenon87: Thanks a lot. It works for me. But it seems to introduce another problem: After I launched the singleTask activity to the task and go to some other activities from there, I click the HOME button to send the current task to the background. Then when I click the icon for

[android-developers] Re: Fragment question: inter-fragment communication?

2011-02-27 Thread davemac
A little more formally, have your activity implement an interface such as OnMyFragmentListener, so that the activity must implement a method like onFragmentDidSomething(). When your fragment wants to send something to the activity, it can do the following:

[android-developers] Render Script samples does't show anything

2011-02-27 Thread mmkr
Hi all, I tried to run the render script samples, but it doesn't show anything and crashes. Did any one face this issue? Or is there any other way to run those sample ? thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post

[android-developers] Re: ProgressDialog Theme - TextColor or Background but not both

2011-02-27 Thread William Ferguson
No takers? Is setting the font and background color of a basic ProgressDialog using styles a bridge too far? On Feb 27, 11:10 pm, William Ferguson william.ferguson...@gmail.com wrote: I'm tryig to style my ProgressDialogs to have a certain background and a certain TextColor. I can set the

Re: [android-developers] Launching an app from the quick search box creates a new instance of the app?

2011-02-27 Thread ZEAN QIN
Hi, TreKing: Thanks for the suggestion. But if that case does happen, it will be confusing that when the user fills the form on that page and clicks the BACK button, the user sees a new blank page appear. -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Try to implement coverflow animation using Gallery

2011-02-27 Thread monty
Hi I am developing an application where i need to achieive coverflow animation using android Gallery.When i scroll the Gallery i need to display the data of the middle item in the Gallery in a TextView. But instead when i scroll and stop the Gallery ,the TextView prints the last item of Gallery

[android-developers] How to resize an icon at run time to achieve specific size

2011-02-27 Thread argongold
Hello, I am working on an android application for which I need to get specific size of icons as I am displaying on smaller scale. Is there a straight forward way to resize/scale an icon to achieve its specific size. Kind regards, argongold -- You received this message because you are

[android-developers] ant run-tests returns code 0 even if tests fail

2011-02-27 Thread donV
Hi all! When running ant run-tests and getting test failures, ant still says BUILD SUCCESSFUL and return code 0. This makes is hard to automate testing. Is there a way to programmatically detect test failures? -- You received this message because you are subscribed to the Google Groups

Re: [android-developers] Launching an app from the quick search box creates a new instance of the app?

2011-02-27 Thread Dianne Hackborn
singleTask is for specific types of flow through activities; it is not a work-around for this kind of situation. As someone else said, your first step should be to actually *look* at the crash that is happening in your fourth scenario and fix it. You also haven't really given a clear idea of

Re: [android-developers] Re: Fragment question: inter-fragment communication?

2011-02-27 Thread Dianne Hackborn
You can also do the cast in Fragment.onAttach() if you want to fail quickly in the case of someone forgetting to implement the interface. On Sun, Feb 27, 2011 at 8:59 PM, davemac davemac...@gmail.com wrote: A little more formally, have your activity implement an interface such as

Re: [android-developers] TableLayout issue

2011-02-27 Thread rael_yoni
Of-course I can use LinearLayout, but I wanted to understand what the problem was. Also my understanding is that TableRow is a LinearLayout so I was hoping it will present the same kind of behavior http://developer.android.com/reference/android/widget/TableRow.html. Also when I initially

Re: [android-developers] Render Script samples does't show anything

2011-02-27 Thread Romain Guy
You must run them on a device, they won't work on the emulator (at least not the graphical ones.) On Sun, Feb 27, 2011 at 9:03 PM, mmkr manutd...@gmail.com wrote: Hi all, I tried to run the render script samples, but it doesn't show anything and crashes. Did any one face this issue?

[android-developers] Re: Is SL4A a better tool to test android Applications

2011-02-27 Thread Shyam
Thanks buddy. I have one more query. For example, Lets say the device is cusomized with its own OEM applications. For eg, Contacts application is customized. With SL4A, can we test that Contacts application ? Thanks, Shyam On Feb 25, 11:17 pm, Indicator Veritatis mej1...@yahoo.com wrote:

  1   2   >