[android-developers] Position StaticLayout on Canvas
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 more than one text box i translate the canvas the first time and the text box is positioned but then when i translate the next text box the canvas just translates off the screen. Is there any way to position the text relatively to the screen. Any help would be great. 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: Playing music in Background
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 pointers would be helpful. I tried to search online but couldnt find much help. Thanks and regards, Ankur -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Preventing Multiple AppWidget Instances
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 are subscribed to the Google Groups Android Developers group. 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] The best way to store data for animation
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. The fastest solution but it requires a lot of memory (about 2mb for 700 images) 2) load all files and save to internal storage. 3) load and decode all files and save them as bitmaps to internal storage 4) same as above but use external storage 5) ...other ways I need the fastest solution with low memory usage. Have any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] EditText behaving weirdly
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) { final AlertDialog.Builder builder = new AlertDialog.Builder(this); Context mContext = getApplicationContext(); LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE); final View layout; switch (id){ //created when the user clicks on a child item case EDITITEM_DIALOG_ID: //build custom dialog to update selected data layout = inflater.inflate(R.layout.budget_dialog_edit_child,(ViewGroup) findViewById(R.id.BudgetMain_llDialogEdit)); builder.setTitle(Edit\\Delete:\n + BudgetItem); builder.setMessage(Edit price or delete if no longer required); builder.setView(layout); builder.setPositiveButton(Save, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { final EditText edAmount = (EditText)layout.findViewById(R.id.BudgetMainEdit_edAmount); if ( edAmount.getText().toString().equals() ) mDbBudget.updateAmount(BudgetRowID, 0.00); else mDbBudget.updateAmount(BudgetRowID, Double.valueOf(edAmount.getText().toString())); mAdapterCursor.requery(); setBudgetUsed(); } }); builder.setNegativeButton(Delete,new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.cancel(); if (mDbBudget.deleteItem(BudgetRowID)) { mAdapterCursor.requery(); setBudgetUsed(); } } }); builder.setNeutralButton(Cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.dismiss(); } }); return builder.show(); case EDITTOTAL_DIALOG_ID: layout = inflater.inflate(R.layout.budget_dialog_edit_total,(ViewGroup) findViewById(R.id.Budget_Dialog_Edit_Total_llTotal)); builder.setTitle(Edit Total Budget); builder.setMessage(Edit the wedding's total budget amount); builder.setView(layout); builder.setPositiveButton(Save, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { final EditText edAmount = (EditText)layout.findViewById(R.id.Budget_Dialog_Edit_Total_edTotal); mDbSettings.open(); if (edAmount.getText().toString().equals()) mDbSettings.updateBudgetTotal(0.00); else mDbSettings.updateBudgetTotal(Double.valueOf((edAmount.getText().toString(; mDbSettings.close(); setBudgetUsed(); } }); builder.setNegativeButton(Cancel,new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { dialog.cancel(); } }); return builder.show(); default: return null; } } /** Called each time a dialog is called - use to update dialog's display values*/ @Override protected void onPrepareDialog (int id, Dialog dialog){ //register dialog to activity by calling super super.onPrepareDialog(id, dialog); switch (id){ //created when the user clicks on a child item case
[android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 treking...@gmail.com wrote: On Sat, Feb 26, 2011 at 3:27 PM, Dianne Hackborn hack...@android.comwrote: Have you tried going to the Market support forum? http://www.google.com/support/forum/p/Android+Market/label?lid=7dc8a5... There are people from Market support answering questions there. LOL - Seriously? With all due respect Dianne, have you actually been over there? I spend about as much time there as I do here and I assure you, there is ***no one*** from the Market team answering *anything* over there. There was a time when you could count on Dontae to at least chime in with a bulls*** canned we're looking into it response, but in the last like 6 months or so I have not seen a single response from a Google Employee in that support forum. Sometimes, if you win a lottery, they'll respond to direct developer support requests when major stuff breaks (like the stats that are always breaking). But no one, and I mean NO ONE, from the Market has ever taken even 5 seconds to answer questions only someone from Google could answer, like the points of the TOS discussed here (and this issue has come up quite a few times). At least AFAIK - if you happen to know where these types of questions have been answered, I'm sure we'd all like to know where to go look. I mean, look at what you, Romain, Xavier, and others do here: spending your own free time helping us out wherever you can with issues others can't. I presume you all do this because you care about the product and want us to have a good experience using it. That's why it truly boggles my mind that not a single individual on the Market Team gives enough of a damn about *their* product to respond to even a single post. So, unfortunately, the OP is absolutely correct. Support for the Android Market for both users and developers is essentially non-existent. And this lack of support (and for me personally the fact that no one on that team seems to give a damn) is the chief reason why so many developers have such a terrible perception of everything and anything that has to do with the Android Market. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 little coincidental that another similar question popped up so soon over there. Ah, well, let's all watch intently as no one from Google responds. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 registered a company in another country to be able to sell.(I am fortunate that I can register a company in another country with ease) I can sell easily, but I cannot buy anything... By the looks of it there is no developer relations people in the market team whatsoever. And the developers are the ones that make the market something valuable. On 26 фев, 17:26, rich friedel rich.frie...@gmail.com wrote: So then how does all of this apply to you? According to what you just said your application isn't even being sold on the market thus you need not worry about it being removed for going through a third-party vendor or accepting payment without including Google in the process. On Sat, Feb 26, 2011 at 8:47 AM, JAlexoid (Aleksandr Panzin) jalex...@gmail.com wrote: I would say it's not only the 30%, but the fact that Google is too slow in implementing app sales globally. I am not aware how hard it is to do it globally, but it is not hard to implement app sales within Europe.(I've actually had a lot of informal discussion with the best accounting lawyers and accountants in several countries) I live in one of the smaller countries in EU and I don't expect to be able to sell or even buy apps for a long time on the AM. And that annoys me a lot! So reading the market agreement, I have to go through all sort of hoops just to earn anything on the AM. And for buying stuff I have to get a SIM from another country. And they wonder why some people say that Android is not easy to use... On 26 фев, 08:24, HeyYouThere newsome...@gmail.com wrote: So as of right now, the major app lookout is subject to removal -- but won't be removed because Google selectively enforces it's TOS. They collect your CC directly into the application. I'm not trying to rag on them, but the facts, are facts. Since using PayPal would probably just get the app removed once google realized they weren't getting their 30% -- Is it a violation to to use the google checkout web api for subscriptions-- building that into the app? Thanks everyone for taking the time to try and help me with this. It's an absolute shame we have NO OFFICIAL SUPPORT to direct these questions toward. On Feb 25, 9:53 pm, rich friedel rich.frie...@gmail.com wrote: unless your special like Slacker Radio and run the subscription through the carrier! i personally dont agree with that double standard... On Feb 25, 2011 10:28 PM, Zsolt Vasvari zvasv...@gmail.com wrote: In-app billing doesn't support the subscriptions model: http://www.google.com/support/androidmarket/bin/answer.py?hl=enanswe. .. So, yes, I'd say if you are selling an app with subscriptions, you are violating the TOS and your app is subject to removal. On Feb 26, 10:36 am, davemac davemac...@gmail.com wrote: Google announced in-app billing. Seehttp:// developer.android.com/guide/market/billing/index.html. - dave On Feb 25, 9:26 pm, rich friedel rich.frie...@gmail.com wrote: didn't they just do an update to the market which allows in-app billing? On Feb 25, 2011 9:16 PM, HeyYouThere newsome...@gmail.com wrote: Thank you for your reply. Here's what I don't understand: Lookout - They have you enter your payment information directly into the app -- taking a credit card payment for their subscription service Google does not support this yet in the market...So do you think I am SOL? On Feb 25, 7:39 pm, Zsolt Vasvari zvasv...@gmail.com wrote: I am no lawyer, but AFAIK you CANNOT take any 3rd party payments in an app marketed through the Google Android Market. This is not against PayPal per se and it's fair otherwise what would stop you from offering a free app and then charge the user outside of the Market, thus not giving Google their 30% cut? Of course, as opposed to Apple, you have the option to sell your app on your own or on alternate markets and do whatever you want. If you have a subscription tied into your app, and you are not giving Google their cut, you could certainly wake up one morning and find your app pulled -- and rightly so. On Feb 25, 2:53 pm, HeyYouThere newsome...@gmail.com wrote: Well, I am a developer and I understand that you guys have this thing lately where you will randomly pull apps...Even ones that have been there since Genesis 1:1. Anywho, I have a subscription tied into my app, and I am wondering, IF I WILL WAKE UP AND
[android-developers] Re: In-App Payments with Single-Click Checkout
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 users for Products distributed via the Market. If they pull these apps then they also need to pull every other merchant offering credit card transactions. Only if those other merchants are not authorised by Google? Maybe Amazon etc actually went the proper route and got authorised, who knows? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 Market provides a service and takes 30% of our income, but doesn't even provide a method of contacting support. 1 star. Oh, the irony runs deeper than that, actually. Because there's no way for * users* to contact Market support either, they contact us instead. So we developers pay Google 30%, then are expected to support their Market problems out of our $0.69 share. That's when users *can* even complete the purchase, that is - I'm sure I'm not the only dev who frequently gets emails from people who can't even get that far. String -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 Determine Which Dialog Was Dismissed
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 a code review. I'm still learning the Android application life-cycle and I wasn't sure if an onPause/onResume pair of events may cause the == to fail. I like the idea of using small specialized OnDismissListeners for each dialog rather than having my activity implement OnDismissListener. I'm going to switch over to that approach. I'll sleep better, even if my fears are unfounded. :-) Thanks again, Dave On Feb 24, 9:07 am, Kostya Vasilyev kmans...@gmail.com wrote: 24.02.2011 16:19, hoyski ?: For the moment, I'm testing if the dialog interface equals either of my dialog instances held by the activity, e.g. if (d == mOptionsDlg). That works but it feels brittle to me. Sounds fine - Dialog impelments DialogInterface, and since you know you're not creating other classes that implement DialogInterface, there shouldn't be any unexpected values here. Anyone know a better way? Or should I just stick with the instance comparison? You could implement little stubs for onDismiss listener for the dialogs: *dialog_1*.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { myActivity.myDialogDismissed(*DIALOG_1*); } }); *dialog_2*.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { myActivity.myDialogDismissed(*DIALOG_2*); } }); -- Kostya -- Kostya Vasilyev --http://kmansoft.wordpress.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] Re: How To Determine Which Dialog Was Dismissed
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 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 a code review. I'm still learning the Android application life-cycle and I wasn't sure if an onPause/onResume pair of events may cause the == to fail. I like the idea of using small specialized OnDismissListeners for each dialog rather than having my activity implement OnDismissListener. I'm going to switch over to that approach. I'll sleep better, even if my fears are unfounded. :-) Thanks again, Dave On Feb 24, 9:07 am, Kostya Vasilyevkmans...@gmail.com wrote: 24.02.2011 16:19, hoyski ?: For the moment, I'm testing if the dialog interface equals either of my dialog instances held by the activity, e.g. if (d == mOptionsDlg). That works but it feels brittle to me. Sounds fine - Dialog impelments DialogInterface, and since you know you're not creating other classes that implement DialogInterface, there shouldn't be any unexpected values here. Anyone know a better way? Or should I just stick with the instance comparison? You could implement little stubs for onDismiss listener for the dialogs: *dialog_1*.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { myActivity.myDialogDismissed(*DIALOG_1*); } }); *dialog_2*.setOnDismissListener(new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { myActivity.myDialogDismissed(*DIALOG_2*); } }); -- Kostya -- Kostya Vasilyev --http://kmansoft.wordpress.com -- Kostya Vasilyev -- http://kmansoft.wordpress.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] ProgressDialog Theme - TextColor or Background but not both
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 constructor. style name=ApplicationTheme parent=android:style/Theme item name=android:alertDialogStyle@style/AlertDialogStyle/ item /style style name=AlertDialogStyle parent=@android:style/ AlertDialog item name=android:fullDark@drawable/dialog_background/ item !--item name=android:textColor@color/jumblee_yellow/item-- !-- No impact. -- item name=android:textAppearance@style/ AlterDialogTextAppearance/item !-- No impact. -- /style And I can get the TextColor, but not the background of the ProgressDialog to display if I instead use the 2 arg constructor of ProgressDialog and pass in a ProgressDialogTheme. style name=ProgressDialogTheme parent=android:style/ Theme.Dialog item name=android:textColor@color/jumblee_yellow/item !-- Colours the ProgressDialog text. -- item name=android:windowBackground@color/transparent/ item !-- Hides the title and just displays the content panel (as long as background does not have a value) -- !--item name=android:panelBackground@color/jumblee_purple/ item-- !-- no impact -- item name=android:background@color/jumblee_purple/item !-- no impact -- /style Any ideas on how using either of these methods I can get both the TextColor and the Background to display as I want them to? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android 2.3: Music content providers for artists, albums and songs
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(); intent.setAction(MediaStore.INTENT_ACTION_MEDIA_SEARCH); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); query = artistName; intent.putExtra(MediaStore.EXTRA_MEDIA_ARTIST, artistName); intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS, MediaStore.Audio.Albums.ENTRY_CONTENT_TYPE); intent.putExtra(SearchManager.QUERY, query); mContext.startActivity(intent); For albums: Intent intent; String query = ; intent = new Intent(); intent.setAction(MediaStore.INTENT_ACTION_MEDIA_SEARCH); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); query = albumName; intent.putExtra(MediaStore.EXTRA_MEDIA_ALBUM, albumName); query = query + + artistName; intent.putExtra(MediaStore.EXTRA_MEDIA_ARTIST, artistName); intent.putExtra(MediaStore.EXTRA_MEDIA_FOCUS, MediaStore.Audio.Albums.ENTRY_CONTENT_TYPE); intent.putExtra(SearchManager.QUERY, query); mContext.startActivity(intent); On 27 Feb., 08:26, Dianne Hackborn hack...@android.com wrote: It is a bug that the activity choose allows activities to be launched from itself instead of the original caller. This will be fixed in a future release. On Sat, Feb 26, 2011 at 10:11 PM, gizmomogwai christian.koest...@gmail.comwrote: Ok ... I understand, that this Intent is not supposed to use that way. My actual question now is, why the behavior of the system changes depending of the installed or not installed MixZing-App. Case 1 (no MixZing): - startActivity leads to an securityexception Case 2 (with MixZing installed): - startActivity opens up the ActivitiyChooser as usual (with Music and MixZing, because they both filter this intent). - choosing the stock music player opens up the music.app with the album preselected (no securityexception). 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] In-app purchase, how to test it on Android 2.3.3?
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 received this message because you are subscribed to the Google Groups Android Developers group. 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] 2.3.3 NFC Tag app breaks 2.3.2 NFC apps
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 because you are subscribed to the Google Groups Android Developers group. 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: Preventing Multiple AppWidget Instances
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 to S issue a warning. Can I detect that a second instance has been added so that I can display a toast? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cost of requestLocationUpdates
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 specify a distance trigger doesn't that mean that Android is continually checking to see if you have moved the required distance? And if that's the case does it make any difference whether I specify 5, 10, or 100 miles as the trigger? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] One User Has a Problem - How do I debug it?
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 requestLocationUpdates is kicking in as scheduled and that it broadcasts an intent containing the location. This user will work with me and I can send him development APKs to install on his phone. I suppose I can add Log statements but how do I get to see his log? Are there any tools that can help me with this? Anything else anyone can suggest? On my own phone I have used Log Collector to email myself some logs. But since it only takes a current slice from the log it is difficult to ensure that it collects what's relevant to me. So any suggestions? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Preventing Multiple AppWidget Instances
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 really careful because of various edge cases and Android and launcher issues (also consider replacement launchers) . Why not just let the user create as many widgets as they like, and let the user decide? -- Kostya 27.02.2011 17:24, Jake Colman пишет: S == Stringsterling.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 to S issue a warning. Can I detect that a second instance has been added so that I can display a toast? -- Kostya Vasilyev -- http://kmansoft.wordpress.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: Preventing Multiple AppWidget Instances
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 widget. The config activity can be made transparent and finish KV right away, so it's just there as a callback for your logic. KV But if you do that, you've got to be really careful because of KV various edge cases and Android and launcher issues (also consider KV replacement launchers) . KV Why not just let the user create as many widgets as they like, KV and let the user decide? KV -- Kostya KV 27.02.2011 17:24, Jake Colman пишет: S == Stringsterling.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 to S issue a warning. Can I detect that a second instance has been added so that I can display a toast? KV -- KV Kostya Vasilyev -- http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Developers group. KV To post to this group, send email to android-developers@googlegroups.com KV To unsubscribe from this group, send email to KV android-developers+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] System signing a test suite
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 permission to send system broadcast intents. I have root access so that's not a problem. The problem I'm running into is, it appears I also need to sign my app with a system key. Where do I get a system key store, users names, and passwords? I assume I could build my own version of Android and sign it with my own keys, but since I have root access there should be an easier way right? I have a N1 with CM7 and the emulator I'd be fine with keys for either. 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
Re: [android-developers] (Newbie warning) Adding one of the sample projects to Eclipse
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 beginners group over to StackOverflow ( http://www.stackoverflow.com). Just search for Android. Also, there are a few beginners groups on Google Groups. Just search for Android Beginner -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: One User Has a Problem - How do I debug it?
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 have this done automatically in the case an exception surfaces out of our code). Works pretty well and its fairly easy to setup. Let me know you'd like more details on it. thanks Rishi -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Controlling Android init process / staged boot
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 mucking with the source code. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Cost of requestLocationUpdates
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 1km. So what happens? This means that the provider connection (gps radio or network) will be open until i get a reading that matches these criteria. So i'll at least get notified every hour (the timing isn't exact btw) or i'll get notified every 1km, whichever comes first. We see this happening when we're listening for GPS and the user is in their navigation app. So if the user is driving and receiving GPS as while we're registered, we'll get notified every 1KM since they are actively using the provider. If the provider is not actively in use, i think it'll initiate the check primarily using the minTime parameter. (This is just speculation on my part based upon what we've seen in our location-based apps, so take that with a grain of salt). This is definitely a great topic and requires a bit of experimentation to understand exactly how it works in theory and how it differs in practice on each of the device models.Hopefully someone from the Android team can shed some more light on this and to validate what i've said. Thanks -rish -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 show JSON data into list view
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 the implementation details of data sourcing and display into separate concerns. This will also shield you from changes in the source JSON structure as well. If you go down this path, you can then write your own ArrayAdapter that works off your business objects. e.g. public class MyArrayAdapter extends ArrayAdapterMyBusinessObject In this object, you can store a private member points to the list of business objects. private ListMyBusinessObject list; Then its just a matter of pulling out the right object when the view is called and then mapping that to the fields that are in your list view. Hope that helps. -rishi -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Simple Search App -- Help Required
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. - http://www.sqlite.org/fts3.html - http://bakhtiyor.com/2009/08/sqlite-full-text-search/ - http://stackoverflow.com/questions/4432314/using-sqlite-with-fts-on-android This might take a bit more to setup, but it'll give you a lot of flexibility to add in additional functionality later. thanks Rishi -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Check permissions
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 limit access to your apps only If my app (which contains appwidgets) didn't have a shared id before and I set this in the next update will it work without any problem? http://code.google.com/p/android/issues/detail?id=1227 -- Regards, Marcin -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Listening to call log changes when app is not running
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 message because you are subscribed to the Google Groups Android Developers group. 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: One User Has a Problem - How do I debug it?
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 allow the user to send us an email file RK containing the log information (or we have this done RK automatically in the case an exception surfaces out of our code). RK Works pretty well and its fairly easy to setup. RK Let me know you'd like more details on it. Yes, please. I would really appreciate it. And source code would be awesome! :-) -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: noob question I guess - input requires enter key
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 DuRoss r2s...@gmail.com wrote: I too have this same issue and would appreciate some help. So far, I have just been ignoring the problem because it doesn't happen on actual Android devices. I tried searching the Eclipse Help for things mentioned by TreKing but came up empty. Not Eclipse settings, but your Android emulator's settings. -- Harsh J www.harshj.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- 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
[android-developers] Clear data from MediaStore
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 menu: Settings-Applications-Manage Applications-All-Media Storage- clear data and then execute an new media scan it works. How can I clear the data of the Media Storage with the Android-API? Greetz dudero -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Maps not working in the android emulator
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 MapActivity. Is that the case? -rishi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 much in the forums but if you send them an email from you dev account address, I'm pretty sure you will get a reply. Sincerely, Brad Gies --- Bistro Bot - Bistro Blurb http://bgies.comhttp://nocrappyapps.com http://bistroblurb.com http://forcethetruth.com http://ihottonight.com --- Everything in moderation, including abstinence (paraphrased) Every person is born with a brain... Those who use it well are the successful happy ones - Brad Gies Adversity can make or break you... It's your choice... Choose wisely - Brad Gies Never doubt that a small group of thoughtful, committed people can change the world. Indeed. It is the only thing that ever has - Margaret Mead On 26/02/2011 6:44 PM, TreKing wrote: On Sat, Feb 26, 2011 at 3:27 PM, Dianne Hackborn hack...@android.com mailto:hack...@android.com wrote: Have you tried going to the Market support forum? http://www.google.com/support/forum/p/Android+Market/label?lid=7dc8a5c590cd22eehl=en http://www.google.com/support/forum/p/Android+Market/label?lid=7dc8a5c590cd22eehl=en There are people from Market support answering questions there. LOL - Seriously? With all due respect Dianne, have you actually been over there? I spend about as much time there as I do here and I assure you, there is /*/no one/*/ from the Market team answering *anything* over there. There was a time when you could count on Dontae to at least chime in with a bulls*** canned we're looking into it response, but in the last like 6 months or so I have not seen a single response from a Google Employee in that support forum. Sometimes, if you win a lottery, they'll respond to direct developer support requests when major stuff breaks (like the stats that are always breaking). But no one, and I mean NO ONE, from the Market has ever taken even 5 seconds to answer questions only someone from Google could answer, like the points of the TOS discussed here (and this issue has come up quite a few times). At least AFAIK - if you happen to know where these types of questions have been answered, I'm sure we'd all like to know where to go look. I mean, look at what you, Romain, Xavier, and others do here: spending your own free time helping us out wherever you can with issues others can't. I presume you all do this because you care about the product and want us to have a good experience using it. That's why it truly boggles my mind that not a single individual on the Market Team gives enough of a damn about *their* product to respond to even a single post. So, unfortunately, the OP is absolutely correct. Support for the Android Market for both users and developers is essentially non-existent. And this lack of support (and for me personally the fact that no one on that team seems to give a damn) is the chief reason why so many developers have such a terrible perception of everything and anything that has to do with the Android Market. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Re: One User Has a Problem - How do I debug it?
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( (); buf.append(DbMetadata.DEBUG_TIME).append( INTEGER, ); buf.append(DbMetadata.DEBUG_TYPE).append( TEXT, ); buf.append(DbMetadata.DEBUG_PACKAGE).append( TEXT, ); buf.append(DbMetadata.DEBUG_MESSAGE).append( 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=enimport java.util.List; import android.util.Log; public class DbLogService implements ILogService { private static final String TAG = DbLogService.class.getName(); private static DbLogService instance = null; private CoreDataPersister persister = CoreDataPersister.getInstance(); public static DbLogService getInstance() { if (instance == null) { instance = new DbLogService(); } return instance; } private DbLogService() { } public ListDebugMessage getLogs() { return persister.getMessages(); } public void debug(String label, String msg) { writeLog(debug, label, msg); } public void verbose(String label, String msg) { writeLog(verbose, label, msg); } public void info(String label, String msg) { writeLog(info, label, msg); } public void warn(String label, String msg) { writeLog(warn, label, msg); } public void error(String label, String msg) { writeLog(error, label, msg); } private void writeLog(String type, String pack, String msg) { if (AppMetadata.DEBUG_ENABLED) { DebugMessage dm = new DebugMessage(System.currentTimeMillis(), type, pack, msg); try { persister.saveMessage(dm); } catch (Exception e) { // catching and swallowing any exception that occurs here. Log.w(TAG, e); } } } } public class DebugMessage { private long time; private String type; private String packageLabel; private String message; public DebugMessage(long time, String type, String pack, String msg) { this.time = time; this.type = type; this.packageLabel = pack; this.message = msg; } public long getTime() { return time; } public void setTime(long time) { this.time = time; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getPackageLabel() { return packageLabel; } public void setPackageLabel(String packageLabel) { this.packageLabel = packageLabel; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String toString() { StringBuilder buf = new StringBuilder(); buf.append(DebugMessage: time=[).append(time).append(().append(DateFormat.format(AppMetadata.DEFAULT_DATE_FORMAT, time)).append()]).append(AppMetadata.NEW_LINE); // buf.append(type=[).append(type).append(], ); buf.append(package=[).append(packageLabel).append(]).append(AppMetadata.NEW_LINE); buf.append(msg=[).append(message).append(]).append(AppMetadata.NEW_LINE); return buf.toString(); } } import java.util.ArrayList; import java.util.List; import android.content.ContentResolver; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import android.util.Log; public class DebugPersister { private static final String TAG = DebugPersister.class.getName(); private static DebugPersister instance; public static DebugPersister getInstance() { if (instance == null) { instance = new DebugPersister(); } return instance; } private DebugPersister() { } public ListDebugMessage getMessages() { ContentResolver cr = ctx.getContentResolver(); Uri uri = Uri.withAppendedPath(CoreDataProvider.CONTENT_URI, ProviderMetadata.CORE_URL_DEBUG); Cursor c = null; ListDebugMessage messages = null; try { c = cr.query(uri, null, null, null, null); if (c == null || !c.moveToFirst()) {
[android-developers] Re: Listening to call log changes when app is not running
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 for now + 100ms and then when the alarm goes off I check the call log for changes... A bit crude, but that's the only way I could come up with that works regardless of the app running or not... If there's a better or a more Android-like method to do this I'd be happy to hear what you or the community thinks, but if not I hope this hack helps someone :) Thanks again! Tal -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Listening to call log changes when app is not running
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 this message because you are subscribed to the Google Groups Android Developers group. 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: One User Has a Problem - How do I debug it?
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 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 here is the database table definition: RKbuf.append(CREATE TABLE ).append(DbMetadata.TABLE_DEBUG RK ).append( (); RK buf.append(DbMetadata.DEBUG_TIME).append( INTEGER, ); RK buf.append(DbMetadata.DEBUG_TYPE).append( TEXT, ); RK buf.append(DbMetadata.DEBUG_PACKAGE).append( TEXT, ); RK buf.append(DbMetadata.DEBUG_MESSAGE).append( TEXT)); RK -- RK You received this message because you are subscribed to the Google RK Groups Android Developers group. RK To post to this group, send email to android-developers@googlegroups.com RK To unsubscribe from this group, send email to RK android-developers+unsubscr...@googlegroups.com RK For more options, visit this group at RK http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: One User Has a Problem - How do I debug it?
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: One User Has a Problem - How do I debug it?
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 here is the database table definition: RKbuf.append(CREATE TABLE ).append(DbMetadata.TABLE_DEBUG RK ).append( (); RK buf.append(DbMetadata.DEBUG_TIME).append( INTEGER, ); RK buf.append(DbMetadata.DEBUG_TYPE).append( TEXT, ); RK buf.append(DbMetadata.DEBUG_PACKAGE).append( TEXT, ); RK buf.append(DbMetadata.DEBUG_MESSAGE).append( TEXT)); RK -- RK You received this message because you are subscribed to the Google RK Groups Android Developers group. RK To post to this group, send email to android-developers@googlegroups.com RK To unsubscribe from this group, send email to RK android-developers+unsubscr...@googlegroups.com RK For more options, visit this group at RK http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: GOOGLE TO BAN PAYPAL?!
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 Thanks for the email it's done!!. Noted. To quote myself: Sometimes, if you win a lottery, they'll respond to direct developer support requests when major stuff breaks (like the stats that are always breaking). I do agree they don't answer much in the forums but if you send them an email from you dev account address, I'm pretty sure you will get a reply. I would be willing to bet good money that if anyone emailed them to clarify this issue about subscriptions and asked them the simple question Will doing X violate the TOS? Please clarify, you will not get an answer. You may get a *response*, but you will not get an *answer*. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Check permissions
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 implications of doing that, which I would prefer just be avoided. On Sat, Feb 26, 2011 at 11:51 PM, 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? If my app (which contains appwidgets) didn't have a shared id before and I set this in the next update will it work without any problem? Appwidgets uses this id or not? They are running in the name of this user? On febr. 26, 22:12, Dianne Hackborn hack...@android.com wrote: Yes a help application works well. Just be sure that if you do such a thing it is in a secure way -- for example if this is structured as a Service that your main application binds to in order to have it do stuff with SMS messages, declare a signature permission in the help that restricts access to it, and use it in your main app. This way other applications can't get the permission and can't find to your service and abuse you as a security hole (in which case your helper app will get the blame, since it is the one accessing the SMS data). On Sat, Feb 26, 2011 at 12:32 PM, Kostya Vasilyev kmans...@gmail.com wrote: I do have a suggestion for you - you could implement additional functionality as an add-on, a companion application. Android has features that make it pretty easy to implement (shared user ids, intents, services, being able to query installed packages and intent resolution). Some applications that are available in Market already do this (e.g. Smart Keyboard, ES File Explorer, those are just the ones I use, there are certainly many more). 26.02.2011 22:18, b_t пишет: There are users who don't read the app description nor the comments. They don't write an email to ask just write a bad comment. Yes, users are a pain - they are ignorant, paranoid, moronic, inarticulate. The world would a better place without them :) /irony So explaining it doesn't help because they don't read. I always try to answer comments but the next comments keep asking the same questions. True. But I also find that sometimes there are things you can do to address certain often asked questions or misunderstood functionality - like adding a help button, or tweaking how the information is presented, so it's more obvious. So I'm not satisfied with this permission model, what about you? Well, my two current application are so simple, it's not even funny. The permissions they request are obvious, so my experience doesn't really apply here. -- Kostya Vasilyev --http://kmansoft.wordpress.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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: One User Has a Problem - How do I debug it?
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 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: One User Has a Problem - How do I debug it?
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 Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Listening to call log changes when app is not running
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 (2) if the new calls are already in the call log to avoid a race condition, right? - Is there a difference if I register a content observer from the service or from the code that starts the service? If I understand correctly the only purpose of the service is to reduce the chance of Android killing the app, so where I register the content observer makes no difference. - Do you think I should still implement a timer and stop the service after the timer expires? The way I see it there's no guarantee that the content observer will hold all the calls on the first call back, so my only choice is to give it some time and see that there's no more callbacks... I appreciate your help - from my experience, these delicate matters make the difference between a piece of software that works 80% of the time than a piece of software that works 99% of the time (and that 1% is really out of our hands - someone should name it like any other physical constant :) Tal -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Strange nullpointer on setMessage() of a ProgressDialog
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); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setProgress(0); progressDialog.setMessage(Loading...); return progressDialog; default: return null; } } In a Handler I do a progressDialog.setMessage(Uploading...);, which works finde. Later on the handler calls a activity.dismissDialog(PROGRESS_DIALOG_ID). Now a second time I do the same as aboth. I do showDialog(PROGRESS_DIALOG_ID); But when the handler does the progressDialog.setMessage(Uploading...); I get the following strange Nullpointer inside the ProgressDialog E/AndroidRuntime( 496): java.lang.NullPointerException E/AndroidRuntime( 496):at android.app.ProgressDialog.setMessage(ProgressDialog.java:294) I'm on android 2.1 Any ideas what could be the problem? 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] Draw Image next to text on canvas
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 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cost of requestLocationUpdates
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 60 meters, the check won't even run for at least an hour. After that it will check for the distance. If the distance criteria is not met, I'm not sure how it determines when to check again. Probably some heuristics based on the current distance changed. And if that's the case does it make any difference whether I specify 5, 10, or 100 miles as the trigger? Well you won't get any updates until 5, 10, or 100 miles, after the initial time has expired. On Sun, Feb 27, 2011 at 9:53 AM, Rishi Kumar reeesh...@gmail.com wrote: I request location updates every 1 hr and every 1km. So what happens? This means that the provider connection (gps radio or network) will be open until i get a reading that matches these criteria. So i'll at least get notified every hour (the timing isn't exact btw) or i'll get notified every 1km, whichever comes first. I believe it is not whichever comes first - both conditions must be met for the notification to go off. It would not make sense otherwise. For example, if you set min time to 60 minutes and distance to zero if you did not care how far you'd moved, you'd always get notified despite the time not expiring due to having move zero. Similarly if you specified 0 time and 60k distance, if it was either, you'd still get constant updates due to the 0 minutes parameter. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Cost of requestLocationUpdates
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: T On Sun, Feb 27, 2011 at 8:27 AM, Jake Colman col...@ppllc.com T 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? T Both conditions must be met. So you if you specify 60 minutes and T 60 meters, the check won't even run for at least an hour. After T that it will check for the distance. If the distance criteria is T not met, I'm not sure how it determines when to check T again. Probably some heuristics based on the current distance T changed. T And if that's the case does it make any difference whether I T specify 5, 10, or 100 miles as the trigger? T Well you won't get any updates until 5, 10, or 100 miles, after the initial T time has expired. T On Sun, Feb 27, 2011 at 9:53 AM, Rishi Kumar reeesh...@gmail.com wrote: I request location updates every 1 hr and every 1km. So what happens? This means that the provider connection (gps radio or network) will be open until i get a reading that matches these criteria. So i'll at least get notified every hour (the timing isn't exact btw) or i'll get notified every 1km, whichever comes first. T I believe it is not whichever comes first - both conditions must be met for T the notification to go off. T It would not make sense otherwise. For example, if you set min time to 60 T minutes and distance to zero if you did not care how far you'd moved, you'd T always get notified despite the time not expiring due to having move zero. T Similarly if you specified 0 time and 60k distance, if it was either, you'd T still get constant updates due to the 0 minutes parameter. T - T TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago T transit tracking app for Android-powered devices T -- T You received this message because you are subscribed to the Google T Groups Android Developers group. T To post to this group, send email to android-developers@googlegroups.com T To unsubscribe from this group, send email to T android-developers+unsubscr...@googlegroups.com T For more options, visit this group at T http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Clear data from MediaStore
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 you are subscribed to the Google Groups Android Developers group. 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] TableLayout issue
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 ImageSwitcher) the current state of the XML is: ?xml version=1.0 encoding=utf-8? TableLayout android:id=@+id/TableLayout01 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android; TableRow android:id=@+id/TableRow01 android:layout_width=fill_parent android:layout_height=fill_parent ImageSwitcher android:layout_weight=1 android:layout_column=0 android:id=@+id/imsLeftTop/ImageSwitcher ImageSwitcher android:layout_weight=1 android:layout_column=1 android:id=@+id/imsRightTop/ImageSwitcher /TableRow TableRow android:id=@+id/TableRow02 android:layout_width=fill_parent android:layout_height=fill_parent ImageSwitcher android:layout_weight=1 android:layout_column=0 android:id=@+id/imsLeftBottom /ImageSwitcher ImageSwitcher android:layout_weight=1 android:layout_column=1 android:id=@+id/imsRightBottom /ImageSwitcher /TableRow /TableLayout -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] TableLayout issue
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 ImageSwitcher) Your row heights are set to fill parent. Thus, they will both try to fill their parent. Only one will succeed, usually the first. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Beta Game Space Bike
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 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Beta Game Space Bike
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, suggestions http://www.megaupload.com/?d=R02OEBUEhttp://rapidshare.com/files/450131198/Space_Bike_Game.ziphttp://www.mediafire.com/?qnffd2qb8hrcjah -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Beta Game Space Bike
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 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=R02OEBUEhttp://rapidshare.com/files/450131198/Space_Bike_Game.ziphttp://www.mediafire.com/?qnffd2qb8hrcjah -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Content Provider for Private Database?
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 database access through a content provider? -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Custom instrumentation test runner fails on android-8
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 { public TestSuite getAllTests() { suite = new TestSuite(Sweet); suite.addTest(new TestCase(Success 1) { public void runTest() throws java.lang.Throwable { // Success } }); suite.addTest(new TestCase(Success 2) { public void runTest() throws java.lang.Throwable { // Success } }); suite.addTest(new TestCase(Error) { public void runTest() throws java.lang.Throwable { throw new RuntimeException(Error!); } }); return suite; } logcat gives nothing useful: I/TestRunner( 552): started: Success 1(org.ruboto.test.InstrumentationTestRunner$1) I/ActivityManager( 68): Force stopping package org.ruboto.sample_app uid=10036 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Content Provider for Private Database?
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 automatically by registering data change observers. Another useful thing is that it forces you to map your data into a hierarchical URI-based scheme. This, IMO, results in a cleaner conceptual model for your data. Yet another is that you can easily pass data references between activities by using a data URI. On the other hand, with content providers you can't just run a raw sql statement whenever you feel like it - all data access is structured, so you've got to do some planning first. Howerver, for debug info, I probably wouldn't bother with a content provider or a database at all. Just a text log file, with timestamps, so it can be cross-referenced with the logcat (if you can collect that too). And speaking of debug reports - have you looked at ready-made solutions for this? For example, this one is often recommended on this list: http://code.google.com/p/acra/ -- Kostya 28.02.2011 0:18, 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 database access through a content provider? -- Kostya Vasilyev -- http://kmansoft.wordpress.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] TableLayout issue
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, metrics.heightPixels / 2)); (and even in that case the ImageSwitchers don't feel the entire of the screen (there is this spacing between the images and the cell borders). I was hoping there is an elegant solution in code but it seems there isn't one. Thanks again. Yoni -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Content Provider for Private Database?
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 (via Log.d) but do it such that I can collect the trace and have the app email it upon request. Can ACRA do this? I also looked at microlog4android but the documentation is not easy to follow and it looks like alot of work. A helpful soul in this group provide me some starter classes that will log a trace into a database. I can then access the database when I want and extract what I am looking for. Can you suggest some other alternative? 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? ...Jake KV == Kostya Vasilyev kmans...@gmail.com writes: KV Jake, KV ContentProvider isn't just for exporting data. KV One useful thing it provides is data change notifications (based KV on data URIs). In practice, it means that ListViews with content KV provider-supplied data refresh automatically, and it's really KV easy to make other UI elements also update automatically by KV registering data change observers. KV Another useful thing is that it forces you to map your data into KV a hierarchical URI-based scheme. This, IMO, results in a cleaner KV conceptual model for your data. KV Yet another is that you can easily pass data references between KV activities by using a data URI. KV On the other hand, with content providers you can't just run a KV raw sql statement whenever you feel like it - all data access is KV structured, so you've got to do some planning first. KV Howerver, for debug info, I probably wouldn't bother with a KV content provider or a database at all. Just a text log file, with KV timestamps, so it can be cross-referenced with the logcat (if you KV can collect that too). KV And speaking of debug reports - have you looked at ready-made KV solutions for this? For example, this one is often recommended on KV this list: KV http://code.google.com/p/acra/ KV -- Kostya KV 28.02.2011 0:18, 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 database access through a content provider? KV -- KV Kostya Vasilyev -- http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Developers group. KV To post to this group, send email to android-developers@googlegroups.com KV To unsubscribe from this group, send email to KV android-developers+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cost of requestLocationUpdates
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 receive. The time is merely a guideline, and you may get events more frequently than that. If minTime is greater than 0, the LocationManager could potentially rest for minTime milliseconds between location updates to conserve power. That being said, longer minTime values should generally be better for power. Or, as the docs put it: Background services should be careful about setting a sufficiently high minTime so that the device doesn't consume too much power by keeping the GPS or wireless radios on all the time. In particular, values under 6ms are not recommended. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming 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] TableLayout issue
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. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Content Provider for Private Database?
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 that I might otherwise send to syslog (via Log.d) but do it such that I can collect the trace and have the app email it upon request. Can ACRA do this? They talk about it here: http://code.google.com/p/acra/wiki/ACRA3HowTo#Can_I_send_reports_for_caught_exceptions_?_or_for_unexpected_app but I think it still requires an exception, and each one is sent as a separate reported event. I also looked at microlog4android but the documentation is not easy to follow and it looks like alot of work. A helpful soul in this group provide me some starter classes that will log a trace into a database. I can then access the database when I want and extract what I am looking for. Can you suggest some other alternative? Well, to share some experience - I use my own logger that can output to logcat or a text file, and has settings for individual facilities (i.e. output only network-related events, or worker-thread-related events, etc.), as well as crash logging. Writing it wasn't terribly difficult, and if I had to do it over again, I would. Perhaps this is another option for you to consider: log data to a text file on the memory card. Ask your user (since he's cooperating) to email it to you. Fix the bug - done - move on - probably in less time than it takes to understand a ready-made logging facility. 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? I like content providers for the reasons outlined in my previous email. YMMV. -- Kostya -- Kostya Vasilyev -- http://kmansoft.wordpress.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] Re: Content Provider for Private Database?
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: -- Data-change notification is helpful, and becomes increasingly helpful with more complex applications. Simple apps, though, can just requery their Cursors when they do a database change, and result is a savings in code complexity, since ContentProviders don't write themselves. -- Data URls are no more useful than other forms of primary key, except in relatively unusual circumstances (e.g., the recipient of the Uri really isn't using the Uri but is merely passing it along to activities that are keyed to the ContentProvider's MIME type). The costs of a ContentProvider are: -- You leak database connections (i.e., there is no place to close your SQLiteDatabase). -- The limited API that Kostya mentions, so much of makes a relational database worthwhile is tossed out. -- They are *world readable and writable by default*, so developers that fail to put android:exported=false on their provider elements in the manifest make their data available for all other apps on the device, purely by accident. If you like the benefits and don't mind the costs, feel free to use a ContentProvider. It's one of the more contentious architectural areas in Android, with its proponents and detractors, so on the whole I don't think there is a consensus right or wrong answer. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming 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
[android-developers] Looking for information on the Fragment dump() method (FragmentManager too)
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 = getFragmentManager(); File dumpFile = new File(Environment.getExternalStorageDirectory() + /fmdump.txt); if(dumpFile.exists()) { dumpFile.delete(); } try { FileOutputStream fos = new FileOutputStream(dumpFile, true); fm.dump(DIALOG, fos.getFD(), new PrintWriter(fos), null); fos.flush(); fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } I'm positive that I have fragments in my fragment manager. My output file is always empty, although I can see the datetimestamp getting updated. I'm always passing null for the 4th argument to dump() since I have no idea what else to put there. I have enableDebugLogging set to true. Any help please? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cost of requestLocationUpdates
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 true. I thought it was, originally. The distance is a filter for what events you receive. The time is merely a guideline, and you may get events more frequently than that. Yeah, sorry. Should not have said at least - it is a hint. Actually, not sure what you mean by distance is a filter for what events you receive. But what I mean is that is you set the min time, the check won't run for *approximately* that long. But I believe it's still true that both conditions must be met. I'm basing this on my own tests. I have a feature in my app that looks up nearby bus stops based on the user location. If the user moves far enough away, it updates to get the closest stops based on their new location. Originally, as I only cared about distance, I left min time as 0. The frequency of the update checks was fairly frequent (this was a while ago, so I don't remember how frequent, but enough to be noticeable). Since it was likely the user would not be moving much very much when using this feature, I didn't want the update check to happen that frequently, so I added a min time. In one experiment, I set this to 5 minutes. I used the feature, then hopped on a bus and got significantly further than the min distance in under 5 minutes. 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. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cost of requestLocationUpdates
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 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 met, you won't get notified via your LocationListener or PendingIntent. Sorry for any confusion I may have caused. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming 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] Cost of requestLocationUpdates
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 met, you won't get notified via your LocationListener or PendingIntent. Ah, OK. This is what I was trying to get at as well (though I missed the bit on minTime being a guideline). Glad I'm not crazy (well ... in this case). - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Content Provider for Private Database?
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 gain. As far as databases vs. content providers, I definitely lean towards the camp of avoiding content provider if the data you are managing is never going to be made available to other apps. That said, content providers are such a common pattern in Android's standard apps (since they tend to publish their data to others) that most of the helpers for dealing with structured data are oriented around them. Also keep in mind that publish to others can actually be pretty broad -- for example if you are writing a messaging app, you probably have no reason to want to expose that data as a content provider to others. Except... well, if you are going to do a share option you will need to have a content provider for a URI to share with others. And in Android 3.0 the drag and drop and rich clipboard APIs are built around data stored in a content provider. Even there, though, there's no reason you couldn't take a hybrid approach -- have your application directly access the database, and put a content provider on top of the same database just for publishing specific URIs you want to make available to other apps. On Sun, Feb 27, 2011 at 1:51 PM, Jake Colman col...@ppllc.com wrote: 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 (via Log.d) but do it such that I can collect the trace and have the app email it upon request. Can ACRA do this? I also looked at microlog4android but the documentation is not easy to follow and it looks like alot of work. A helpful soul in this group provide me some starter classes that will log a trace into a database. I can then access the database when I want and extract what I am looking for. Can you suggest some other alternative? 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? ...Jake KV == Kostya Vasilyev kmans...@gmail.com writes: KV Jake, KV ContentProvider isn't just for exporting data. KV One useful thing it provides is data change notifications (based KV on data URIs). In practice, it means that ListViews with content KV provider-supplied data refresh automatically, and it's really KV easy to make other UI elements also update automatically by KV registering data change observers. KV Another useful thing is that it forces you to map your data into KV a hierarchical URI-based scheme. This, IMO, results in a cleaner KV conceptual model for your data. KV Yet another is that you can easily pass data references between KV activities by using a data URI. KV On the other hand, with content providers you can't just run a KV raw sql statement whenever you feel like it - all data access is KV structured, so you've got to do some planning first. KV Howerver, for debug info, I probably wouldn't bother with a KV content provider or a database at all. Just a text log file, with KV timestamps, so it can be cross-referenced with the logcat (if you KV can collect that too). KV And speaking of debug reports - have you looked at ready-made KV solutions for this? For example, this one is often recommended on KV this list: KV http://code.google.com/p/acra/ KV -- Kostya KV 28.02.2011 0:18, 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 database access through a content provider? KV -- KV Kostya Vasilyev -- http://kmansoft.wordpress.com KV -- KV You received this message because you are subscribed to the Google KV Groups Android Developers group. KV To post to this group, send email to android-developers@googlegroups.com KV To unsubscribe from this group, send email to KV android-developers+unsubscr...@googlegroups.com KV For more options, visit this group at KV http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] NullPointer Exception
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 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2512 ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 119 ActivityThread$H.handleMessage(Message) line: 1863 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4363 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: NullPointer Exception
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 first Activity ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2496 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2512 ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 119 ActivityThread$H.handleMessage(Message) line: 1863 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4363 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: NullPointer Exception
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 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 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord, Intent) line: 2512 ActivityThread.access$2200(ActivityThread, ActivityThread$ActivityRecord, Intent) line: 119 ActivityThread$H.handleMessage(Message) line: 1863 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 4363 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Cannot have more than one INSTALL_REFFERER receiver in Android Manifest?
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 /receiver However, I also wish to use my own INSTALL_REFFERER receiver. The problem is, when I include my own receiver after the AdMob one, it never gets called. If I include mine before the AdMob receiver in the manifest file, mine gets called but the AdMob one doesn't. Is there anyway I can get both to be called? 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: Custom instrumentation test runner fails on android-8
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); suite.addTest(new TestCase(runTest) { public void runTest() throws java.lang.Throwable { // Success } }); suite.addTest(new TestCase(runTest) { public void runTest() throws java.lang.Throwable { // Success } }); suite.addTest(new TestCase(runTest) { public void runTest() throws java.lang.Throwable { throw new RuntimeException(Error!); } }); return suite; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: TableLayout issue
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 use a LinearLayout. It's the only ViewGroup that observes the layout_weight property. I'd use something like this skeleton below. This will give you proportional heights of the two rows and the ImageSwitchers will be laid out proportionally to take up half the width of each row. This is off the cuff so do check for sanity! LinearLayout android:orientation=vertical android:layout_height=fill_parent android:layout_width=fill_parent LinearLayout android:layout_weight=1 android:orientation=horizontal android:layout_height=fill_parent android:layout_width=fill_parent ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / /LinearLayout LinearLayout android:layout_weight=1 android:orientation=horizontal android:layout_height=fill_parent android:layout_width=fill_parent ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / /LinearLayout /LinearLayout Jonathan On Feb 27, 2:01 pm, TreKing treking...@gmail.com wrote: 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. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] exception in getting data from cursor(database)
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*/ db=new DBAdapter(this); db.open(); Cursor result=db.getAllNames(); Log.e(column:,:+ result.getColumnCount()); String data[]=new String[result.getCount()]; for(int i=0;iresult.getCount();i++) { Log.e(column:,:+ result.getColumnCount()); if(data[i]==null) Log.e(null, null); data[i]=new String(); int colIndex=result.getColumnIndexOrThrow(name); Log.e(colIndex, :+colIndex); data[i]=result.getString(colIndex); //data[i]=temp; // Log.e(temp:, temp); result.moveToNext(); hope to hear soon. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] exception in getting data from cursor(database)
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. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Saving layout file is very slow with Eclipse / ADT
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 outside and refresh the xml portion so it will build only once. On Feb 19, 7:03 am, Tom thomas.bruye...@gmail.com wrote: Hi all, I'm a little disappointed, every time I save a layout file under Eclipse, it takes about 20~30 seconds ... It's very slow... Do somebody know why ? Is there a workaround ? I'm using an Intel i7 with Eclipse Elios and ADT 9.0.0.v201101191456-93220 --Tom -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Saving layout file is very slow with Eclipse / ADT
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 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 outside and refresh the xml portion so it will build only once. On Feb 19, 7:03 am, Tom thomas.bruye...@gmail.com wrote: Hi all, I'm a little disappointed, every time I save a layout file under Eclipse, it takes about 20~30 seconds ... It's very slow... Do somebody know why ? Is there a workaround ? I'm using an Intel i7 with Eclipse Elios and ADT 9.0.0.v201101191456-93220 --Tom- 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] exception in getting data from cursor(database)
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 are 0 based when you use a counter to ref the position in the array you would need to make sure you only go to 9. If you go to the full count length (10) you get an index out of bounds exception. -Original Message- From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of Honest Sent: Sunday, February 27, 2011 7:56 PM To: Android Developers Subject: [android-developers] exception in getting data from cursor(database) 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*/ db=new DBAdapter(this); db.open(); Cursor result=db.getAllNames(); Log.e(column:,:+ result.getColumnCount()); String data[]=new String[result.getCount()]; for(int i=0;iresult.getCount();i++) { Log.e(column:,:+ result.getColumnCount()); if(data[i]==null) Log.e(null, null); data[i]=new String(); int colIndex=result.getColumnIndexOrThrow(name); Log.e(colIndex, :+colIndex); data[i]=result.getString(colIndex); //data[i]=temp; // Log.e(temp:, temp); result.moveToNext(); hope to hear soon. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Re: TableLayout issue
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 trying to move rows/columns around. I understand and appreciate that the RelativeLayout is usually the most efficient memory and computation-wise, but it sure is difficult to work with and buggy in some older versions of Android. Another reason I will be dropping 1.5 support soon. On Feb 28, 7:59 am, Jonathan Foley jonefo...@gmail.com wrote: 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 use a LinearLayout. It's the only ViewGroup that observes the layout_weight property. I'd use something like this skeleton below. This will give you proportional heights of the two rows and the ImageSwitchers will be laid out proportionally to take up half the width of each row. This is off the cuff so do check for sanity! LinearLayout android:orientation=vertical android:layout_height=fill_parent android:layout_width=fill_parent LinearLayout android:layout_weight=1 android:orientation=horizontal android:layout_height=fill_parent android:layout_width=fill_parent ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / /LinearLayout LinearLayout android:layout_weight=1 android:orientation=horizontal android:layout_height=fill_parent android:layout_width=fill_parent ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / ImageSwitcher android:layout_height=fill_parent android:layout_weight=1 android:layout_width=fill_parent / /LinearLayout /LinearLayout Jonathan On Feb 27, 2:01 pm, TreKing treking...@gmail.com wrote: 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. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices- 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
[android-developers] Re: Fragment question: inter-fragment communication?
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 mechanism for a fragment to send a message to the activity? If not, I guess I could just create a handler in the activity and pass the handler pointer to the fragment so it can send a message to the activity. My use case is the activity is responsible for all changes to the action bar and to showing or hiding various fragments. Thanks, -Gregg Reno -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Fragment question: inter-fragment communication?
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 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 mechanism for a fragment to send a message to the activity? If not, I guess I could just create a handler in the activity and pass the handler pointer to the fragment so it can send a message to the activity. My use case is the activity is responsible for all changes to the action bar and to showing or hiding various fragments. Thanks, -Gregg Reno -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Fragment question: inter-fragment communication?
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 fragment can implement. On Sun, Feb 27, 2011 at 6:39 PM, Gregg Reno gregg.r...@gmail.com wrote: 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 mechanism for a fragment to send a message to the activity? If not, I guess I could just create a handler in the activity and pass the handler pointer to the fragment so it can send a message to the activity. My use case is the activity is responsible for all changes to the action bar and to showing or hiding various fragments. Thanks, -Gregg Reno -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView/ExpandableListView Imageview flicking
Below is my code: AllBuddyListAdapter.class: private class AllBuddyListAdapter extends BaseAdapter { public ListBuddyTO allBuddyList; public AllBuddyListAdapter(Context con, ListBuddyTO allBuddyList){ this.allBuddyList = allBuddyList; } @Override public int getCount() { return this.allBuddyList.size(); } @Override public Object getItem(int position) { return this.allBuddyList.get(position); } @Override public long getItemId(int position) { return 0; } @Override public View getView(int position, View convertView, ViewGroup parent) { BuddyTO buddy = allBuddyList.get(position); BuddyListView holder = null; try { if (convertView == null) { holder = new BuddyListView(); convertView = getLayoutInflater().inflate(R.layout.buddy_list_layout, parent, false); holder.titleText = (TextView) convertView.findViewById(R.id.listTitle); holder.distText = (TextView) convertView.findViewById(R.id.distText); holder.avatar =(ImageView) convertView.findViewById(R.id.avatar); LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); holder.v2 = inflater.inflate(R.layout.buddy_list_popup,null); holder.ballonName = (TextView) holder.v2.findViewById(R.id.balloon_item_snippet); holder.buddyImage = (ImageView) holder.v2.findViewById(R.id.buddyImg); holder.btnIM = (ImageView) holder.v2.findViewById(R.id.im_button); holder.btnSms = (ImageView) holder.v2.findViewById(R.id.sms_button); holder.groupBtn = (ImageView) holder.v2.findViewById(R.id.edit_button); holder.btnCall = (ImageView) holder.v2.findViewById(R.id.call_button); holder.btnNudge = (ImageView) holder.v2.findViewById(R.id.nudge_button); holder.popupLinear = (LinearLayout) holder.v2.findViewById(R.id.balloon_main_layout); holder.linear = (ImageView) holder.v2.findViewById(R.id.close_button); holder.drawable = convertView.getContext().getResources().getDrawable(R.drawable.avatar); holder.smsView = inflater.inflate(R.layout.sms,holder.smsLayout); holder.backBtn = (Button) holder.smsView.findViewById(R.id.btnBack); holder.unblockBtn = (ImageView) convertView.findViewById(R.id.btnUnblock); holder.blockBtn = (ImageView) convertView.findViewById(R.id.btnBlock); holder.unshareBtn = (ImageView) convertView.findViewById(R.id.btnUnShare); holder.shareBtn = (ImageView) convertView.findViewById(R.id.btnShare); holder.status = (ImageView) convertView.findViewById(R.id.status); holder.userGroup = (TextView) convertView.findViewById(R.id.listTitleGroup); holder.buddyLineView = convertView; convertView.setTag(holder); } else { holder = (BuddyListView)convertView.getTag(); } if (buddy.isShareLocToBuddy()) { holder.unshareBtn.setVisibility(View.VISIBLE); holder.shareBtn.setVisibility(View.GONE); } else { holder.unshareBtn.setVisibility(View.GONE); holder.shareBtn.setVisibility(View.VISIBLE); } if (!buddy.isBlockBuddy()) { holder.unblockBtn.setVisibility(View.VISIBLE); holder.blockBtn.setVisibility(View.GONE); } else {
[android-developers] Re: ListView/ExpandableListView Imageview flicking
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, Justin Anderson magouyaw...@gmail.comwrote: We can help better if you post your code... On Feb 24, 2011 10:01 PM, Sao Kim Beng kbsa...@gmail.com wrote: Hi All, i have a listview/ExpandableListView contain Imageview and some text. I facing a problem when there is a new entry in and i try to update the list , after i try to refresh the BaseAdapter/ BaseExpandableListAdapter by calling notifyDataSetChanged, every imageview will flicking once. It like loading all the image again from top to bottom again, is it any way to just update those data and show to the user without flicking? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Launching an app from the quick search box creates a new instance of the app?
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 this app, it only brings back the singleTask activity and retains all its state, but all the other activities are lost. Is there a way to fix this? Thanks a lot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Fragment question: inter-fragment communication?
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: ((OnMyFragmentListener)getActivity()).onFragmentDidSomething(...); You will get a ClassCastException in your fragment if the activity didn't implement the interface, but the really nice thing is that from your fragment's point of view, it doesn't have to care exactly which activity did the invoking. The cast is to the interface, not the activity. You could put the Listener interface definition inside your fragment class to keep things nice and clean. - dave On Feb 27, 9:58 pm, Gregg Reno gregg.r...@gmail.com wrote: 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 fragment can implement. On Sun, Feb 27, 2011 at 6:39 PM, Gregg Reno gregg.r...@gmail.com wrote: 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 mechanism for a fragment to send a message to the activity? If not, I guess I could just create a handler in the activity and pass the handler pointer to the fragment so it can send a message to the activity. My use case is the activity is responsible for all changes to the action bar and to showing or hiding various fragments. Thanks, -Gregg Reno -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Render Script samples does't show anything
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 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: ProgressDialog Theme - TextColor or Background but not both
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 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 constructor. style name=ApplicationTheme parent=android:style/Theme item name=android:alertDialogStyle@style/AlertDialogStyle/ item /style style name=AlertDialogStyle parent=@android:style/ AlertDialog item name=android:fullDark@drawable/dialog_background/ item !--item name=android:textColor@color/jumblee_yellow/item-- !-- No impact. -- item name=android:textAppearance@style/ AlterDialogTextAppearance/item !-- No impact. -- /style And I can get the TextColor, but not the background of the ProgressDialog to display if I instead use the 2 arg constructor of ProgressDialog and pass in a ProgressDialogTheme. style name=ProgressDialogTheme parent=android:style/ Theme.Dialog item name=android:textColor@color/jumblee_yellow/item !-- Colours the ProgressDialog text. -- item name=android:windowBackground@color/transparent/ item !-- Hides the title and just displays the content panel (as long as background does not have a value) -- !--item name=android:panelBackground@color/jumblee_purple/ item-- !-- no impact -- item name=android:background@color/jumblee_purple/item !-- no impact -- /style Any ideas on how using either of these methods I can get both the TextColor and the Background to display as I want them to? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Launching an app from the quick search box creates a new instance of the app?
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 Developers group. 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] Try to implement coverflow animation using Gallery
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 visible on the device .and not the middle one. How do i acheive this?Do i need to write some logic or will it work with some APIs?i hope i am clear with the query.Could any1 giv a solution? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 resize an icon at run time to achieve specific size
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 subscribed to the Google Groups Android Developers group. 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] ant run-tests returns code 0 even if tests fail
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 Android Developers group. 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] Launching an app from the quick search box creates a new instance of the app?
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 what you mean by it creating a new instance of your app. Does your app consist of only one activity? So you are actually creating a new instance of your activity? If so, then yes, this is expected, because the activity is being launched with different arguments (the ones from the search) so it needs to run to show that data. You do need to make sure you can handle this (fix your crash). To avoid the new instance being created, you can use the singleTop launch mode (please read the docs on it to understand it). On Sun, Feb 27, 2011 at 8:56 PM, ZEAN QIN qinz...@gmail.com wrote: 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 this app, it only brings back the singleTask activity and retains all its state, but all the other activities are lost. Is there a way to fix this? Thanks a lot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Fragment question: inter-fragment communication?
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 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: ((OnMyFragmentListener)getActivity()).onFragmentDidSomething(...); You will get a ClassCastException in your fragment if the activity didn't implement the interface, but the really nice thing is that from your fragment's point of view, it doesn't have to care exactly which activity did the invoking. The cast is to the interface, not the activity. You could put the Listener interface definition inside your fragment class to keep things nice and clean. - dave On Feb 27, 9:58 pm, Gregg Reno gregg.r...@gmail.com wrote: 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 fragment can implement. On Sun, Feb 27, 2011 at 6:39 PM, Gregg Reno gregg.r...@gmail.com wrote: 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 mechanism for a fragment to send a message to the activity? If not, I guess I could just create a handler in the activity and pass the handler pointer to the fragment so it can send a message to the activity. My use case is the activity is responsible for all changes to the action bar and to showing or hiding various fragments. Thanks, -Gregg Reno -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] TableLayout issue
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 started to work with TableLayout I was under the impression that it as easy as HTML Tables I was so wrong :-) 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
Re: [android-developers] Render Script samples does't show anything
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? 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 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 at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is SL4A a better tool to test android Applications
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: Better? Maybe not. But since there are diverse tools for diverse kinds of testing, you should also be aware ofhttp://developer.android.com/guide/developing/tools/monkey.htmland DeviceAnywhere. On Feb 24, 9:51 pm, Shyam shyamstri...@gmail.com wrote: Hello Android Developers, Currently i am using SL4A to test the existing Android Applications like media player,Contacts,Calling etc. Is it the correct way to Test the android apps. If no, please suggest me a better tool to test android apps. Thanks a ton in advance. Shyam -- You received this message because you are subscribed to the Google Groups Android Developers group. 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