I saw this android app called Lyrics App. It provides the lyrics of the song currently played but needs internet connection always. Now, I wanted to make a similar app, that it gets the lyrics from the web for the first time and then saves it to my android device, so that next time a song is played, it'll get the lyrics from the device instead of the web.. no need for constant internet connection.
I've searched already but I can't find the right one for my case. I checked webview, but I think it's just for displaying webcontent, not extracting.
I am new to this, so please bear with me.
Internal storage, external storage, shared preferences, database, and shared storage are some of the storage options offered by Android.
On devices that run Android 9 (API level 28) or lower, your app can access the app-specific files that belong to other apps, provided that your app has the appropriate storage permissions.
For normal apps, there are stored in internal memory in /data/app. Some of the encrypted apps, the files are stored in /data/app-private. For apps stored in the external memory, files are stored in /mnt/sdcard/Android/data.
Try...
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("http://www.someplace.com");
ResponseHandler<String> resHandler = new BasicResponseHandler();
String page = httpClient.execute(httpGet, resHandler);
This can be used to grab the whole webpage as a string of html, i.e., "<html>...</html>"
EDIT: Note, you need to declare the following 'uses-permission' in the android manifest xml file...
<uses-permission android:name="android.permission.INTERNET" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With