I have an async task that downloads a file from the web, it works fine when i preset the URL.
URL url = new URL("http://www.mylocalweather.org.uk/ribblehead/clientraw.txt")
However when i try and use a method defined in an other activity to return a URL it fails.
URL url = null;
url = splash.gps();
The method has worked fine in the past and when called from other activities, and the download function works fine when the URL is hardcoded into the async therefore it much be a problem with calling the method from an Async task, whats the work around for this?
this is the error that it comes up with
E/AndroidRuntime(16426): Caused by: java.lang.IllegalStateException: System services not available to Activities before onCreate()
Any help would be appreciated
many thanks