Android Studio 如何在没有互联网的情况下集成Android OfllineMap

kokeuurv  于 2023-10-23  发布在  Android
关注(0)|答案(1)|浏览(102)

如何集成离线Map?我在尝试这个?
private class AsyncTask<String,Void,String> {

// Downloading data in non-ui thread
    @Override
    protected String doInBackground(String... url) {

        // For storing data from web service
        String data = "";

        try {
            // Fetching the data from web service
            data = downloadUrl(url[0]);
            Log.d("DownloadTask", "DownloadTask : " + data);
        } catch (Exception e) {
            Log.d("Background Task", e.toString());
        }
        return data;
    }

    // Executes in UI thread, after the execution of
    // doInBackground()
    @Override
    protected void onPostExecute(String result) {
        super.onPostExecute(result);

        ParserTask parserTask = new ParserTask();

        // Invokes the thread for parsing the JSON data
        parserTask.execute(result);
    }
}

相关问题