I want to fetch live status from Whatsapp into my android activity. Is it possible to do this? If yes your guidance will be really appreciated.
Please see the image i want to make an activity containing all the statuses. Just like the image
Thanks
WhatsApp store showed status to your device memory or sd card WhatsApp/Media/.Statuses folder. This folder is hidden. You can fetch data from there.
For Kotlin Lover
companion object {
const val WHATSAPP_STATUS_FOLDER_PATH = "/WhatsApp/Media/.Statuses/"
}
fun getImagePath(): ArrayList<String> {
// image path list
val list: ArrayList<String> = ArrayList()
// fetching file path from storage
val file = File(Environment.getExternalStorageDirectory().toString() + WHATSAPP_STATUS_FOLDER_PATH)
val listFile = file.listFiles()
if (listFile != null && listFile.isNullOrEmpty()) {
Arrays.sort(listFile, LastModifiedFileComparator.LASTMODIFIED_REVERSE)
}
if (listFile != null) {
for (imgFile in listFile) {
if (
imgFile.name.endsWith(".jpg")
|| imgFile.name.endsWith(".jpeg")
|| imgFile.name.endsWith(".png")
) {
val model = imgFile.absolutePath
list.add(model)
}
}
}
// return imgPath List
return list
}
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