[android-developers] Re: 64k method limit in dex files

2012-04-06 Thread Joseph Earl
acceptable, so that is what I shall do in future. Cheers, Joe On Friday, 6 April 2012 16:49:37 UTC+1, Morrison Chang wrote: > > You needed to actually use the search tool. > > http://code.google.com/p/android/issues/detail?id=20814 > > On Apr 6, 6:31 am, Joseph Earl wrot

[android-developers] 64k method limit in dex files

2012-04-06 Thread Joseph Earl
I was just wondering whether someone on the Android team could put a quick note in the docs that this exists (a brief summary of the other limits of the dalvik executable format would also be nice). I know a bug report has been filed to improve the error message given by the tools, but something in

[android-developers] Re: Animation is too slow with xhdpi device.

2012-04-06 Thread Joseph Earl
I believe the Note is a dual-core Samsung Exynos processor with each core running at 1.4GHz. (At least the international version I have is, the US version may differ.) Joe On Apr 6, 1:26 am, Dianne Hackborn wrote: > Ah, I missed that this is the note.  If this is a Tegra 3 on a 1280x800 > screen

[android-developers] Re: Someone use GridLayout (ADT-17) in v7?

2012-04-05 Thread Joseph Earl
Edit the attrs.xml and redefine the attributes as: Then clean your GridLayout library project. Looks like someone made a mistake when putting it together as those attributes don't exist in the "android" namespace prior to API level 14. Joe On Mar 22, 8:06 pm, André Luiz R. Silva wrote: > Som

[android-developers] Re: How does the default News widget animate it's content

2011-05-05 Thread Joseph Earl
e a ViewFlipper. > > I see it's annotated with @RemoteView in 2.2 sources. > > And further, setFlipInterval is annotated with > @android.view.RemotableViewMethod. > > -- Kostya > > 05.05.2011 20:05, Joseph Earl пишет: > > > > From my experience with Widgets

[android-developers] How does the default News widget animate it's content

2011-05-05 Thread Joseph Earl
>From my experience with Widgets the following apply: - You cannot apply Animations to RemoteViews - You cannot use custom classes in RemoteViews, and so there is no way to provide a custom view with animation built in - You can use a Layout Animation, but this only plays when the widget is add

[android-developers] Re: SJXP 2.0 Released - Simple XML Parsing in Android

2011-03-10 Thread Joseph Earl
What's this like in terms of speed/memory compared to say a SaxParser ? On Mar 10, 10:02 pm, Riyad wrote: > Simple Java XML Parser (SJXP) 2.0 is released. > > SJXP is a very light weight (4 class) abstraction to XML Pull Parsing > on Android (and Java in general) that allows you to use XPath-like

[android-developers] Re: Dev phone linux (and Windows)

2010-08-20 Thread Joseph Earl
In general ALL Android devices work with Windows (and probably Mac OSX) Only some seem to have drivers for Linux. Since there is a wide range of Android handsets you should try to purchase a variety of phones by different manufacturers. A good way to prioritize your purchases would be based on the

[android-developers] Re: Difference between Android Service and Content Provider

2010-08-20 Thread Joseph Earl
It sounds like you have the right idea. A ContentProvider is a wrapper around your database which allows other applications to access and modify your database in a controlled manner. A Service is basically just a long-running task, such as downloading/ syncing data. A ContentProvider would provid

[android-developers] Re: HTC Droid Eris - Accessing SD Card

2010-08-11 Thread Joseph Earl
> 256MB or 512MB is still pretty typical, I think. The actual amount of space available to the user may be less than this. Devices may have significantly less than 256MB (e.g. 128MB). -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post

[android-developers] Re: Sharable Custom UI components

2010-08-11 Thread Joseph Earl
> 1. I want to hide my custom component code from its users so that > they > just need to include it in their antivity rest its upto me. You can create a custom View. Then the developer can just include the needed class(es) (or library) and create instances of your view either from within Java or

[android-developers] Re: HTC Droid Eris - Accessing SD Card

2010-08-11 Thread Joseph Earl
It could possibly be an issue with a corrupted file or SD card. If possible ask the user to re-format their card or use a different one (this will also ensure they definitely have enough free space). Try creating a simple application that just saves an image, verifies the file exists, and then loa

[android-developers] Re: developing with htc aria

2010-08-09 Thread Joseph Earl
Providing a driver for the HTC Aria is probably up to HTC and not Google, though I could be wrong. Try contacting HTC support and searching Google to see if others have had the same issue. HTC Sync works fine for me with various HTC devices on Windows 7 Professional (though I do not have the Aria I

[android-developers] Re: hi, i'm newbie in android, i wonder about float dp...

2010-08-09 Thread Joseph Earl
Your calculation is wrong, it should be buttonWidth = (currentDPI/160)*100; So if currentDPI = 240 then buttonWidth = 150px Instead of using (currentDPI/160) use final float scaleDPI = getContext().getResources().getDisplayMetrics().density; and then buttonWidth = scaleDPI*100; See http://dev

[android-developers] Re: adding a splash screen to an APK

2010-08-08 Thread Joseph Earl
t; installed separately? > > On Aug 8, 5:29 pm, Joseph Earl wrote: > > > You could create a new application which displays a splash screen and > > then loads the desired activity from your original application (as you > > suggest above). > > Make sure to finish() the

[android-developers] Re: Populating custom layout from xml resource.

2010-08-08 Thread Joseph Earl
Create a custom layout with an ImageView and two TextViews. On Aug 8, 7:07 pm, gnugu wrote: > Hello, > I have created a custom list item layout just like in this > articlehttp://developer.android.com/resources/articles/layout-tricks-efficie > > Each list item has icon, title and summary. > >

[android-developers] Re: Request different IME for TextEditField

2010-08-08 Thread Joseph Earl
Do you mean there is a problem with the Swype IME when Swyping, or when just tapping the individual keys like a normal keyboard? > Is it possible to force the usage of another keyboard > (e.g. one the user selected in m app's preferences) for the > text-fields in my app to restore user-experience?

[android-developers] Re: native c++ api

2010-08-08 Thread Joseph Earl
I don't think this will happen. You'd have to recompile your ENTIRE application for each device. On Aug 8, 5:02 pm, jsm wrote: > Can google provide a native c++ api to develop for Android, not the > NDK which uses Java/JNI to invoke c++ classes? > Its primarily for performance related requirement

[android-developers] Re: LVL and Settings.Secure.ANDROID_ID - how secure?

2010-08-08 Thread Joseph Earl
> 'should' and 'may' concerned me too much to use it. If what you want is a constant ID for the life-time of the device then you are correct - this is not the ID you are looking for; in this case use the IMEI. -- You received this message because you are subscribed to the Google Groups "Android

[android-developers] Re: adding a splash screen to an APK

2010-08-08 Thread Joseph Earl
You could create a new application which displays a splash screen and then loads the desired activity from your original application (as you suggest above). Make sure to finish() the splash screen activity once you have started your desired activity. On Aug 8, 6:46 pm, Avtar Khalsa wrote: > Hi gu

[android-developers] Re: LVL Feedback

2010-08-08 Thread Joseph Earl
> p.s. bit more advance notice next time would be great... Agreed. Things should get better in the future as the platform matures though. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-develope

[android-developers] Re: i can't send email in UncaughtExceptionHandler for Service

2010-07-29 Thread Joseph Earl
Here's your error: java.lang.NullPointerException at com.my.service.onCreate(ISPService.java line:230) Take a look at line 230 of ISPService.java and try and see what could possibly be null. On Jul 29, 12:45 pm, codefish <92soc...@gmail.com> wrote: > thank you for your reply > I added try/catch

[android-developers] Re: Android Market Licensing: Now Available!

2010-07-28 Thread Joseph Earl
. On Jul 28, 5:49 pm, sblantipodi wrote: > Joseph thanks for your reply, using my own system means that I can't > sell my software on the market. > Am I right? > > On Jul 28, 6:01 pm, Joseph Earl wrote: > > > Not with this system as far as I'm aware - users will

[android-developers] Re: Android Market Licensing: Now Available!

2010-07-28 Thread Joseph Earl
Any chance you guys are working a solution for large applications that will work across Android 1.5-2.1? Currently the only secure way of doing it is by targeting Froyo only (using 8 as minSdkVersion) - however it will be at least a year, more likely 3, before this an acceptable solution to present

[android-developers] Re: Android Market Licensing: Now Available!

2010-07-28 Thread Joseph Earl
Not with this system as far as I'm aware - users will have to purchase a new license when changing to a phone running a different OS. You'll have to continue using your own system if you want this kind of functionality. On Jul 28, 12:44 pm, sblantipodi wrote: > Hi all... > When you bought my soft

[android-developers] Re: I'm done with development, how do i publish my apk

2010-07-28 Thread Joseph Earl
Sadly, Android Market does not currently have provisions for large applications. If you need large data, you'll have to store it on your own web-server and download it to the SD card on first run (via HTTP or possibly FTP). Remember this isn't secure, any user or app will be able to get at your fil

[android-developers] Re: Issues in changing custom title bar

2010-07-27 Thread Joseph Earl
Don't use FEATURE_CUSTOM_TITLE. This leads to a brief period at the beginning of your app when the default title bar is visible. Instead use android:theme="@android:style/Theme.NoTitleBar" in your manifest (do not use requestWindowFeature together with FEATURE_NO_TITLE as you will still get a flash

[android-developers] Re: Color of a ListView Header

2010-07-27 Thread Joseph Earl
A header item is ALWAYS at the top of the list, and a footer always at the bottom. Doesn't make a lot of difference unless items in your list change order. On Jul 27, 12:32 am, John wrote: > Okay, got it figured out. android:background="#FF00FF00" -- You received this message because you are su

[android-developers] Re: Resources find rule

2010-07-27 Thread Joseph Earl
Yes. If it doesn't something going's wrong. On Jul 27, 5:11 am, Wong Ho Wa wrote: > Dear all, > Let say in the res directory we have two directories drawable and > drawable-hdpi. drawable contains icon.png while drawable-hdpi has > nothing inside. if drawable-hdpi is matched. Will the icon.png at

[android-developers] Re: detecting home screen, idle of device

2010-07-27 Thread Joseph Earl
It would be reasonable to start a service when the device is idle. I think it would be unreasonable to start a visible activity without user interaction. The user will start your app when they want to. On Jul 27, 3:47 am, optimusgeek wrote: > I want to start my activity when the device is in idle

[android-developers] Re: listactivity within a layout

2010-07-27 Thread Joseph Earl
Just use a standard Activity, you can still use ListView and other components in it. So you could have something like: ... ... Not using a ListActivity just means you have to do a little bit more work initializing your list - e.g. ListView myList = (ListView) findViewById(R.i

[android-developers] Re: How to capture long press of menu button

2010-07-27 Thread Joseph Earl
I don't think you can. Pressing and holding the menu button to show the soft keyboard exists for compatibility reasons - I'm not sure it would be wise to allow developers to disable it. On Jul 27, 12:18 pm, Mathias Lin wrote: > How can I capture a long press of the device menu button in my applic

[android-developers] Re: Code Coverage with EMMA or Ant

2010-07-26 Thread Joseph Earl
Would EclEmma do? Code coverage tool for Eclipse based on EMMA: http://www.eclemma.org/ On Jun 24, 12:52 am, sirvalerius wrote: > hi guys i'm tryng to do some testing in my android application, > > I've set-up my project in eclipse and I can successfully run my code. > I've alredy written some JU

[android-developers] Re: Effect of copying assets in Internal memory?

2010-07-26 Thread Joseph Earl
When your app is first launched download them to the SD card. On Jul 26, 7:36 am, garry wrote: > I wanna store large number of images and videos on the INTERNAL > memory. I wanna know if there is some specific % size of memory that > can be used or is it upto maximum? What effect it will cause?

[android-developers] Re: Transfer database file to Android

2010-07-25 Thread Joseph Earl
It is possible to copy an existing SQLite database from your assets folder to the correct location on the device. See: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ On Jul 25, 8:36 pm, Mark Murphy wrote: > On Sun, Jul 25, 2010 at 11:45 AM, Doug Gordon w

[android-developers] Re: How to end a child activity and return to parent activity?

2010-07-25 Thread Joseph Earl
You can call finish() on the activities when you no longer need it. On Jul 25, 1:21 pm, Mystique wrote: > Hi, > > I have a main screen with buttons to launch other subactivities. > I have to press back button each time to go back to the main screen of > my application. > How do I finish a child a

[android-developers] Re: Application works after reboot the phone

2010-07-25 Thread Joseph Earl
Do you have any errors in Logcat / DDMS when your application fails to launch? On Jul 25, 7:18 am, mike wrote: > hi guys, > > i have found out a strange behavior. My application works only after > phone reboots. after rebooting the phone first time application works > fine. from there onwards it'

[android-developers] Re: Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-25 Thread Joseph Earl
pgrade to a newer version. > > On 7月25日, 上午3時57分, Dianne Hackborn wrote: > > > Ergh...  that may be a bug. :(  To be clear, when doing the update your > > internal data is not being erased, but the data on the SD card is? > > > On Sat, Jul 24, 2010 at 10:11 AM, Joseph Earl

[android-developers] Re: Android to iPhone

2010-07-25 Thread Joseph Earl
Or Appcelerator. But non-of these is replacement yet for coding in the relevant platform language if you want access to all the features. On Jul 25, 9:25 am, Eelco wrote: > What about this:http://www.phonegap.com/ > > "PhoneGap is an open source development framework for building cross- > platfor

[android-developers] Re: Did selected tab background colors change in 2.1 ?

2010-07-24 Thread Joseph Earl
Or you could import the desired images into your own drawables folder and manually set the tab background to your own ones. On Jul 25, 12:02 am, Joseph Earl wrote: > I am not talking about the tab icon - the tab background is defined as > a few different images, e.g: > > android-s

[android-developers] Re: Is it possible for my Activity to be notified when the external storage state changes?

2010-07-24 Thread Joseph Earl
(action.equals(Intent.ACTION_UMS_CONNECTED)) >          { >          Toast.makeText(context, "connected",Toast.LENGTH_LONG).show(); >          } else if(action.equals(Intent.ACTION_UMS_DISCONNECTED)) { >          Toast.makeText(context, "disconnected",Toast.LENGTH_LONG).show(); &g

[android-developers] Re: Did selected tab background colors change in 2.1 ?

2010-07-24 Thread Joseph Earl
that helps. On Jul 24, 11:53 pm, GJTorikian wrote: > If I'm reading your response correctly, this has nothing to do with > the drawables/tab icon. I am talking about the background color of a > selected tab. > > On Jul 24, 12:26 pm, Joseph Earl wrote: > > > Quite

[android-developers] Re: Is it possible for my Activity to be notified when the external storage state changes?

2010-07-24 Thread Joseph Earl
Cheers On Jul 24, 11:25 pm, Streets Of Boston wrote: > Search for "ACTION_MEDIA_EJECT" on this forum. > > On Jul 24, 1:02 pm, Joseph Earl wrote: > > > I would like my Activity to be informed when the SD card is removed, > > since it relies on files from the S

[android-developers] Re: Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-24 Thread Joseph Earl
rote: > Ergh...  that may be a bug. :(  To be clear, when doing the update your > internal data is not being erased, but the data on the SD card is? > > On Sat, Jul 24, 2010 at 10:11 AM, Joseph Earl wrote: > > > > > I have an application which resides on the phone me

[android-developers] Re: What is a WeakReference?

2010-07-24 Thread Joseph Earl
reference, it should make a strong > > reference to the same object, allowing this latter reference to either > > go out of scope or be set to null when it is done. > > You are referring to the code that Joseph Earl wrote above.  That code > snippet is NOT a proper way to use weak re

[android-developers] Re: use of fadeScrollbars

2010-07-24 Thread Joseph Earl
Try changing android:scrollbarStyle and see if that gives you the effect you want. Valid values are insideOverlay, insideInset, outsideOverlay, outsideInset See here: http://developer.android.com/reference/android/view/View.html#attr_android:scrollbarStyle for more info. On Jul 24, 10:07 pm, Mar

[android-developers] Re: How to update pre-installed apps

2010-07-24 Thread Joseph Earl
If it's possible, please give the user an option to remove the program if they want, since it's well... kind of their phone and I think users (quite rightly) expect a degree of control. Some of the apps that come with phones I love and use to this day, and some I don't. I really don't care about pr

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
saging apps (and HTC have changed theirs so this is probably expected) On Jul 24, 9:30 pm, Joseph Earl wrote: > Ahh I think I've got it, my main activity has launchMode="singleTask" > which seems to cause all other activities above it in the stack to be > destroyed. > A

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
e and are returning to the > > task to begin something new. > > > On Jul 24, 7:01 pm, RichardC wrote: > > > It's documented to do that (go to the base activity on the stack) > > > after a period of time (unspecified) in the background as the user has > &

[android-developers] Re: How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
ng interesting on those views that might result > in it working for you? > > On Jul 24, 12:45 pm, Joseph Earl wrote: > > > I use something like: > > > http://schemas.android.com/apk/res/android";> > >     > >     > android:drawable="@drawabl

[android-developers] Re: Did selected tab background colors change in 2.1 ?

2010-07-24 Thread Joseph Earl
Quite possibly. You should import the desired drawables from the SDK/platforms folder into your own drawables folder and reference those in order to ensure a consistent look. Remember carriers also modify their own versions which means the default styles can be quite different to the ones on the e

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Now all I need to do is to find the reference so you know I am not > > making this up :) > > > ... > > > On Jul 24, 4:41 pm, Joseph Earl wrote: > > > > I'm now very tempted to revert my Nexus One to 2.1-update 1 just to > > > verify that I am indeed los

[android-developers] Re: Maps don't show in my app

2010-07-24 Thread Joseph Earl
wrong when I generated the API Key. Can it be > the problem? > > On 24 jul, 14:32, Joseph Earl wrote: > > > Have you obtained a maps API key? > > > On Jul 24, 6:30 pm, coy wrote: > > > > Hi, > > > I'm just trying to run MapsDemo who is in 'sam

[android-developers] Re: How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
ou could show the default press state when the selected item is pressed. On Jul 24, 6:23 pm, Joseph Earl wrote: > Try moving your state_selected statement above your state_pressed item > and see if it works. > > On Jul 24, 6:07 pm, Mark Nuetzmann wrote: > > > I have a gallery

[android-developers] Re: tattoo apps on market

2010-07-24 Thread Joseph Earl
Have you got any other market filters in your manifest that might be preventing the Tattoo from seeing it? On Jul 24, 11:03 am, Martins Streņģis wrote: > Hi there! > in my manifest file i added > >               android:largeScreens="true" >         android:normalScreens="true" >         android:

[android-developers] Re: Set a panel transparent

2010-07-24 Thread Joseph Earl
You are using innerPaint.setARGB(255, 75, 75, 75); //gray Since you are setting the Alpha to 255 you will have an opaque image. If you want some transparency change that value to somewhere between 0 and 255. On Jul 24, 5:41 pm, Pedro Teixeira wrote: > Hi, > > I have a class to make a transparent

[android-developers] Re: Maps don't show in my app

2010-07-24 Thread Joseph Earl
Have you obtained a maps API key? On Jul 24, 6:30 pm, coy wrote: > Hi, > I'm just trying to run MapsDemo who is in 'samples' of the SDK, but > consider this:http://i.imagehost.org/0829/mapss_don_t_show.png > > the google maps is working > perfectlyhttp://j.imagehost.org/0640/google_maps.png > ):

[android-developers] Re: How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
Try moving your state_selected statement above your state_pressed item and see if it works. On Jul 24, 6:07 pm, Mark Nuetzmann wrote: > I have a gallery that displays TextViews where the background of each > view is the following: > > > http://schemas.android.com/apk/res/android";> >          

[android-developers] Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-24 Thread Joseph Earl
I have an application which resides on the phone memory but downloads large data to the SD card on first launch (the app needs to be able to work without an internet connection most of the time) When using the recommend directory given in Froyo it seems all files on the SD card are deleted when I

[android-developers] Is it possible for my Activity to be notified when the external storage state changes?

2010-07-24 Thread Joseph Earl
I would like my Activity to be informed when the SD card is removed, since it relies on files from the SD card (to keep apk size down) but for compatibility reasons is not targeted at Froyo. I'd like to close the application when the SD card is removed/mounted (giving the user a dialog message to

[android-developers] Re: Getting a FileDescriptor from a Socket

2010-07-24 Thread Joseph Earl
For accessing a private member you'd have to use Reflection. Can't help you on the first point though I'm afraid. On Jul 23, 4:39 pm, Alexandre Ferrieux wrote: > Hi, > > The documentation for FileDescriptor says it is "The lowest-level > representation of a file, device, or socket". > I see that

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
I'm now very tempted to revert my Nexus One to 2.1-update 1 just to verify that I am indeed losing part of my sanity. If anyone still has a Nexus One running 2.1 could you tell me quickly how it behaves? On Jul 24, 4:30 pm, Joseph Earl wrote: > I apologize. Seems I was dreaming about th

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
I apologize. Seems I was dreaming about the way it worked having changed, the emulator seems to function this way on earlier versions. For some reason it just seemed to me like it had changed on my Nexus One since the 2.2 update... On Jul 24, 4:21 pm, Joseph Earl wrote: > The recent apps disp

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Actually maybe I was dreaming about the way it worked on 2.1 and earlier. Will go check. On Jul 24, 4:21 pm, Joseph Earl wrote: > The recent apps display seems to function quite differently from > earlier versions on 2.2. > > Try the following for instance: > 1) Open an ap

[android-developers] Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
The recent apps display seems to function quite differently from earlier versions on 2.2. Try the following for instance: 1) Open an app 2) Click on something that takes you to another activity in the same app 3) Press the home button 4) Press and hold the home button to get the recent list of app

[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
Ah OK. My bad. On Jul 24, 2:49 pm, Paul Turchenko wrote: > Threads are not getting killed when activity is destroyed. > > On Jul 24, 4:10 pm, Joseph Earl wrote: > > > Yup. Use a service for long running background tasks that do not > > require an Activity to be present

[android-developers] Re: How do you approach the various devices your application runs on?

2010-07-24 Thread Joseph Earl
ion-x wrote: > I can tell you from experience that just because an app will run in > the emulator... it doesn't mean it will run on the device. The rest of > your advice is stellar. :) I don't have 500k installs either. > > On Jul 23, 3:18 pm, Joseph Earl wrote: > >

[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
A notification has a contentIntent which is of type PendingIntent. To launch your activity when the notification is pressed you need to set the contentIntent with a PendingIntent pointing to your Activity. On Jul 24, 2:05 pm, sasq wrote: > I need the activty to create a PendingIntent for the Noti

[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
Yup. Use a service for long running background tasks that do not require an Activity to be present. Threads started by an Activity are killed anyway when your Activity is destroyed (or at least that's how it seems to me). You can bind to your service from your Activity to control it. On Jul 24, 1:

[android-developers] Re: Jerky Scrolling when using SimpleCursorAdapter with ListView

2010-07-23 Thread Joseph Earl
For images loading from your drawable folder you shouldn't have too much of a problem and there isn't too much you can do about it (apart from perhaps not load any thumbnails while the user is scrolling - as per the Contacts app on 2.1+) For HTTP images, and possibly images from the SD card depend

[android-developers] Re: How do you approach the various devices your application runs on?

2010-07-23 Thread Joseph Earl
1) Set a whole suit of AVD devices with all the possible screen-size/ resolution/OS version combinations 2) When developing, test on your main target devices and a few AVDs 3) When you are nearing completion, do a full test of your app on all of your AVDs - automatic testing can help take a lot of

[android-developers] Re: How to update pre-installed apps

2010-07-23 Thread Joseph Earl
What happens if you upload a newer version to Android Market with same package name? Does the Market app get there's an update? On Jul 23, 9:45 am, Albert wrote: > Hi all, > > I am working on an app that will be shipped on some phones. I have > been thinking about how to update them once a new ve

[android-developers] Re: What is a WeakReference?

2010-07-23 Thread Joseph Earl
d by > > yet another call to the garbage collector. That is, instead of simply > > continuing to use the soft/weak reference, it should make a strong > > reference to the same object, allowing this latter reference to either > > go out of scope or be set to null when it is

[android-developers] Re: Have a problem in ListView please help ?

2010-07-23 Thread Joseph Earl
List. >    Please help me with this > > Thanks, > Sagar > > On Jul 22, 11:11 pm, Joseph Earl wrote: > > > Okay: > > > A ListView must have it's height set to fill_parent - the only way to > > have multiple ListViews in a single activity is to

[android-developers] Re: How could I avoid others to get my used pictures in my application?

2010-07-23 Thread Joseph Earl
1) If you store your images in your drawable folder, then they shouldn't be accessible outside of your application 2) If you store images on the SD card then they will be available to all applications that know where they are On Jul 23, 12:04 am, Frank Weiss wrote: > The way I look at it is that

[android-developers] Re: dithering gradient on different devices

2010-07-23 Thread Joseph Earl
I generally use a 'proxy' XML drawable to add dithering. Suppose your drawable above was named grad.xml, I'd then create something like: http://schemas.android.com/apk/res/android"; android:src="@drawable/grad" android:dither="true" /> and name it grad_proxy.xml. Then use @drawable/grad_

[android-developers] Re: TouchEvent... A BIG problem

2010-07-23 Thread Joseph Earl
> PackageManager. > > On Thu, Jul 22, 2010 at 1:41 PM, Joseph Earl wrote: > > > > > API Level 4 and below support only a single touch pointer officially. > > API Level 5 - 7 support multiple indistinguishable touch points (for > > instance if you place one finge

[android-developers] Re: TouchEvent... A BIG problem

2010-07-23 Thread Joseph Earl
imitations (some > screen sensors don't support two completely separate touches at the same > time).  You can determine this based on the feature defined in > PackageManager. > > On Thu, Jul 22, 2010 at 1:41 PM, Joseph Earl wrote: > > > > > API Level 4 and below supp

[android-developers] Re: WebView in ListView

2010-07-23 Thread Joseph Earl
Yup. Just don't do it. You can parse HTML into a TextView using Html.fromHtml(String string) if you are loading data from HTML content, or use a RelativeLayout to layout a bunch of Text/ImageViews etc. On Jul 23, 6:36 am, Kumar Bibek wrote: > WebViews are pretty heavy components. I don't see a si

[android-developers] Re: Android 2d canvas game: FPS Jitter problem

2010-07-23 Thread Joseph Earl
Just what I was thinking. For games you should never use frame-based animation, and for time-based animation FPS changes shouldn't matter too match since you just draw more or less frames depending on how much the device can handle. On Jul 22, 11:43 pm, Robert Green wrote: > Cameron, > > Are you

[android-developers] Re: Necessary to close SQLite database?

2010-07-23 Thread Joseph Earl
; external entity. > > You need to close the database as you cannot pass an open database > connection between activities, as far as I can tell. > > On Jul 23, 6:32 am, Joseph Earl wrote: > > > I agree it's not well documented what to do when opening/closing the > >

[android-developers] Re: Reflection of class members

2010-07-23 Thread Joseph Earl
1) You should never need reflect for your own classes, just add getter and setter methods 2) If you need reflect for the APIs to enable a feature a non-critical feature on newer devices see http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html On Jul 23, 9:37 am, N

[android-developers] Re: What is a WeakReference?

2010-07-22 Thread Joseph Earl
activity is killed, but in the blog post example he tries to declare > it in the AsyncTask even though the activity is long gone. > > Am I on the right track here? > > David Shellabargerwww.nightshadelabs.com > > On Jul 22, 4:09 pm, Joseph Earl wrote: > > > I am confuse

[android-developers] Re: Calling onResume in Activity

2010-07-22 Thread Joseph Earl
Use the TabHost.OnTabChangeListener to be informed when the user changes tabs. On Jul 22, 8:33 am, Girish Gaitonde wrote: > Hi all, > > I am developing an application , with 3 tabs. > when i am revisiting any particular tab for the second time, i want an > functionality to be fired. > > How can a

[android-developers] Re: Necessary to close SQLite database?

2010-07-22 Thread Joseph Earl
I agree it's not well documented what to do when opening/closing the DB from within an activity. Instead implement a ContentProvider which opens your database and provides access to it. Your activities will then never need to worry about opening/closing the DB. On Jul 22, 3:54 pm, Doug Gordon wr

[android-developers] Re: Eclipse + Android SDK

2010-07-22 Thread Joseph Earl
There isn't really a layout editor - try searching for Droid draw for a third party solution, although it's not yet mature. However just spend a bit of time learning to write the layout XML code, it's not too hard and will give you more control than any of the currently available programs. On Jul

[android-developers] Re: Android Freezes

2010-07-22 Thread Joseph Earl
See this page for an introduction on the topic http://developer.android.com/guide/practices/design/responsiveness.html Basically anything you do which takes up a considerable amount of time should be done a different thread to the UI thread. You can do this by using an AsyncTask, extending the Thre

[android-developers] Re: SQLiteOpenHelper per activity??

2010-07-22 Thread Joseph Earl
Use a ContentProvider, together with an SQLiteOpenHelper wrapper around your database. Your activities will then never need to worry about opening or closing the database at all. On Jul 22, 4:18 pm, ecforu wrote: > But what's the reason for not keeping it open?  Or actually a better > question is

[android-developers] Re: Send Touch Events to Foreground Activity

2010-07-22 Thread Joseph Earl
If you want to do unit testing etc take a look at 1) http://developer.android.com/resources/tutorials/testing/helloandroid_test.html and 2) http://developer.android.com/resources/tutorials/testing/activity_test.html which should help you out. On Jul 21, 9:14 pm, Matt Rusiniak wrote: > Hi everyon

[android-developers] Re: TouchEvent... A BIG problem

2010-07-22 Thread Joseph Earl
API Level 4 and below support only a single touch pointer officially. API Level 5 - 7 support multiple indistinguishable touch points (for instance if you place one finger down, then a second one, then raise one of your fingers Android can detect a finger has been raised, but does not know which on

[android-developers] Re: Android Freezes

2010-07-22 Thread Joseph Earl
Are you running the loop on the UI thread? Calling sleep() on the UI thread is bound to cause you problems. Apart from that remember it may take some time for hardware to become active or inactive. On Jul 21, 7:37 pm, ranjan ar wrote: > Hello, I am trying to toggle the microphone of Android mobil

[android-developers] Re: Finding out the screensize and using my own canvases

2010-07-22 Thread Joseph Earl
It is most likely that Lunar Lander is compiled for SDK level 3 or below, and thus only supports HVGA medium-density screens. Thus when running on a high-resolution device the Android OS puts the app as a 'postage stamp' in the middle of a larger window. Take a look at http://developer.android.com

[android-developers] Re: What is a WeakReference?

2010-07-22 Thread Joseph Earl
;s not the case? > > David Shellabargerwww.nightshadelabs.com > > On Jul 22, 3:49 pm, Joseph Earl wrote: > > > When your UI activity is killed as far as I am aware the GC will > > collect your Views. The problem is (I think) if the GC closes your UI > > thread while the downloader is still ru

[android-developers] Re: What is a WeakReference?

2010-07-22 Thread Joseph Earl
memory leak. I thought the garbage > collector would clean up ImageView if its activity gets killed. > Am I wrong? > > David Shellabargerwww.nightshadelabs.com > > On Jul 22, 3:06 pm, Joseph Earl wrote: > > > No. I'm unsure as to what to use a WeakReference for exa

[android-developers] Re: Testing activity which uses Intent.CATEGORY_INFO

2010-07-22 Thread Joseph Earl
Thanks for the info. Might come in handy in future. On Jul 22, 8:24 pm, Al wrote: > To answer my own question and if anyone else was wondering the same > thing, the solution is to the install the apk file via the package > installer activity. > > Al wrote: > > I have an app I'd like to publish on

[android-developers] Re: i can't send email in UncaughtExceptionHandler for Service

2010-07-22 Thread Joseph Earl
Scratch that. My mistake. I missed the Intent.createChooser line. Have you taken a look at: http://www.anddev.org/email_send_intent_intentchooser-t3295.html ? I don't see any immediate errors in your code. On Jul 22, 8:30 pm, Joseph Earl wrote: > You email is not getting sent because

[android-developers] Re: i can't send email in UncaughtExceptionHandler for Service

2010-07-22 Thread Joseph Earl
You email is not getting sent because you are not doing anything with your sendIntent. You create it but then never use it. On Jul 21, 7:32 am, codefish <92soc...@gmail.com> wrote: > i want to handle exceptions in Service. > my exception handler sends error report email. > so i add FLAG_ACTIVITY_NE

[android-developers] Re: LOCK_PATTERN_ENABLED on API 8 (Froyo)

2010-07-22 Thread Joseph Earl
It is working correctly. LOCK_PATTERN_ENABLED tells you only about if the lock pattern is enabled. It has nothing to do with the password as far as I am aware. I'm afraid I do not know how to tell if the password lock is enabled or not, a quick scan of the docs didn't reveal anything to me. On Jul

[android-developers] Re: ListView with lazy loading of images

2010-07-22 Thread Joseph Earl
Take a look at this post on Stack Overflow http://stackoverflow.com/questions/541966/android-how-do-i-do-a-lazy-load-of-images-in-listview On Jul 22, 10:06 am, Tabman wrote: > Hi Davide, > > see the logic for calling two functions in the following code (private > void updateBookCovers() & private

[android-developers] Re: Understanding how Activities work

2010-07-22 Thread Joseph Earl
As TreKing said - it is perfectly fine and normal for an activity to finish() itself in circumstances where that is required. On Jul 22, 7:56 pm, TreKing wrote: > On Thu, Jul 22, 2010 at 1:35 PM, RichardC > wrote: > > > There is usually no need to call finish(). > > > If you have avoided doing a

  1   2   >