[android-developers] Re: AsyncTask, Runnable Thread, ???

2011-07-01 Thread netlander
AsyncTask is designed to run with Android API (activity, service,
etc...) so that would be my preferred choice if I was using it within
an activity say. The class has a well designed lifecycle and makes
code more readable than the thread/handler idiom.

On Jul 1, 3:02 pm, Jorge Luis  wrote:
> I need to retrieve a few JSON URLS and put then in the UI... which is the
> best way to do it?
> AsyncTask, Thread+Handler, any other?
>
> In addition could you give an example, or tell me where do i get a nice
> tutorial to do it?
>
> Thx.
>
> --
> Jorge Luis Ferrari Cé
> Desenvolvedor / Web Designer
> Siga @JLFerrari

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: Request a webpage and display in app

2011-03-10 Thread netlander
Try using WebView in your activity.

http://developer.android.com/reference/android/webkit/WebView.html

Llies

On Mar 10, 2:24 pm, Raghav Sood  wrote:
> Hi everyone,
>
> I am trying to create an app that take an URl as a user input and displays
> the webpage below the textbox. I would like to know how to get and dipslay
> the webpage and how to pass the URL to the webpage method.
>
> Thanks
> --
> Raghav Soodhttp://www.raghavsood.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: Honeycomb SDK

2011-01-26 Thread netlander
Good point spiral123, it would be in line with android openness to
make this sort of information available to developers as early as
possible, something that would greatly benefit the platform, no doubt.

However this wasn't the case (and still isn't) with Google TV. Let's
hope that with the change of CEO comes a return to traditions for
Google.



On Jan 17, 6:08 pm, Kumar Bibek  wrote:
> I guess,  there might be more than just documentation that would be
> required, since the changes seem to be substantial. A beta SDK would
> be definitely better, but I don't think we will have that. So, keep
> waiting.
>
> On Jan 17, 10:40 pm, Spiral123  wrote:
>
>
>
> > Hi there...
>
> > a quick request/plea to any Google employees that happen to be lurking
> > around the group at the moment.
>
> > Many of us here will have seen the CES preview video of Honeycomb and
> > probably like myself are super excited about the possibilities for a
> > future Android tablet version of our own apps.  Judging by the apps
> > already delivered in Honeycomb versions (at least GMail and Books by
> > my reckoning) the SDK is probably reasonably stable.
>
> > Is there any chance that a Beta version of the SDK could be released
> > so that we have the chance to play with it?  If not a Beta SDK, how
> > about access to the Beta Documentation?  It would be incredibly
> > helpful to us ordinary developers to have at least some idea about the
> > design opportunities that are ahead of us.  I'm sure Google want to
> > encourage us all to enhance our apps to take advantage of all the cool
> > new stuff that is coming in Honeycomb rather than just do the minimum
> > required to port to the new version.
>
> > So, how about it?  Any chance of some advocacy with the Higher Ups on
> > behalf of us little guys?
>
> > Thanks.
>
> > Nick

-- 
You received this message because you are subscribed to the Google
Groups "Android 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: ContentProvider blank screen

2010-09-17 Thread netlander
Thanks for your prompt answer Brion,

Managed to put the time consuming portion of the code in an AsyncTask
inside the ContentProvider. It seems to be doing the job, my main
activity is not hanging.

Now I have two questions which I need to answer:

(1) Is this a correct usage of the API? i.e. is it ok to use an
AsyncTask inside the ContentProvider?
(2) Is there a way for my main activity to get notification when the
ContentProvider has finished initialising?

Input from the Android dev team would be highly appreciated.

Many thanks

On Sep 16, 5:56 pm, Brion Emde  wrote:
> You should perhaps kick off an IntentService or a Service with an
> AsyncTask that reads your data files and updates the ContentProvider
> in the background. Then you could publish your progress via the
> AsyncTask's methods for doing that.
>
> On Sep 16, 12:03 pm, netlander  wrote:
>
> > Hi,
>
> > My app has one activity and one ContentProvider, the activity is
> > simple in that it's just a splash screen at the moment with no other
> > logic in it (I do intend to have more activities in the app). The
> > ContentProvider uses SQLite as a back end and loads some static data
> > from files on first install, a slow process due to file sizes and
> > database initialisation.
>
> > My problem is that I want the activity to show up as soon as the
> > install starts and maybe display a progress bar or dialog to show the
> > user progress about the install. At the moment I get a blank (white)
> > screen while the ContentProvider is initialising the data which takes
> > quite a long time and I get "Activity idle timeout for history record"
> > warning in LogCat. My splash screen only shows when the
> > ContentProvider is done, from the app standpoint this is undesirable
> > behaviour.
>
> > One potential solutions would be to manually start the provider via an
> > AsyncTask but I have a feeling that this is a bad approach due to the
> > fact that if the activity is interupted and restarted while the
> > install is underway and a new AsyncTast is created through the
> > activity's onCreate() then I'll have worst problems on my hands.
>
> > Is there a way to start the content provider in the background and
> > display my splash screen activity straight after the app is started?
> > Note that this problem is only an issue on first install.
>
> > Many 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] ContentProvider blank screen

2010-09-16 Thread netlander
Hi,

My app has one activity and one ContentProvider, the activity is
simple in that it's just a splash screen at the moment with no other
logic in it (I do intend to have more activities in the app). The
ContentProvider uses SQLite as a back end and loads some static data
from files on first install, a slow process due to file sizes and
database initialisation.

My problem is that I want the activity to show up as soon as the
install starts and maybe display a progress bar or dialog to show the
user progress about the install. At the moment I get a blank (white)
screen while the ContentProvider is initialising the data which takes
quite a long time and I get "Activity idle timeout for history record"
warning in LogCat. My splash screen only shows when the
ContentProvider is done, from the app standpoint this is undesirable
behaviour.

One potential solutions would be to manually start the provider via an
AsyncTask but I have a feeling that this is a bad approach due to the
fact that if the activity is interupted and restarted while the
install is underway and a new AsyncTast is created through the
activity's onCreate() then I'll have worst problems on my hands.

Is there a way to start the content provider in the background and
display my splash screen activity straight after the app is started?
Note that this problem is only an issue on first install.

Many 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: Chilling news: Oracle sues Google over Android

2010-08-14 Thread netlander
There's far too much written on Java vs whatever other language people
think is better. The bottom line is java has hit the right balance
between performance/ease of coding/maintenance/scalability and what
not, and that's why there's overwhelming adoption for it out there.
This also allowed for a huge number of opensource initiatives to
flourish.

These facts combined make it the best overall choice for the vast
majority of projects, corporate or otherwise, and I congratulate
Google for choosing java as the primary language for app development,
which in turn is allowing our ecosystem to grow at an unprecedented
pace (while keeping the competition at bay).

Now! can anyone (Google guys?) enlighten us on what's the lawsuit
about?

Thanks

Llies Meridja
Founder/Lead architect
@errayaneLabs


-- 
You received this message because you are subscribed to the Google
Groups "Android 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] Stopping GPS inside an activity

2010-08-12 Thread netlander
Hi,

Currently working on a simple app to allow users to find various
things around them. When the activity that shows the Google map is
active I can see the GPS icon on the status bar, which is normal. But
I need to be able to stop the GPS hardware when my user navigates away
from the activity, and switch the GPS back on when the activity is
shown.

Is there a simple way to stop GPS when a user navigate away from an
activity? I have tried the LocationManager's removeUpdates() but this
doesn't actually stop the GPS (the icon is still flashing on the
status bar and draining the battery).

What I'm looking for is a simple way to programatically stop the GPS
hardware.

Many thanks

Llies


-- 
You received this message because you are subscribed to the Google
Groups "Android 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