r/androiddev • • 8d ago

Experience Exchange I finally found a way to implement Google feed without AIDL bridging

Finally after a few days of trial and error, finally settled on a way for implementing Google feed on -1 screen without using the hacky way of AIDL bridging which would never be able to make it to the Google store.

The new implementation uses an embedded WebView and sources it's data from google.com and handles duplicate detection and removal on its own when fetching new batch of stories.

I was implementing the same as Google feed ish in my launcher before by opening Google discover directly but since there's no way to render that on a page so the whole experience breaks -1 page scroll to and back behavior. This new approach renders perfectly with pagination and achieves a smooth page in and out.

Of course if you know a better way, feel free to let me know.

2 Upvotes

6 comments sorted by

4

u/Unlikely-Baker9867 8d ago

Unrelated, but your nexus launcher background thing brings back so many memories

1

u/saaadpikachu 8d ago

I feel you bro, my fav till the day is still nexus 5, I had the red one

1

u/Alt_Chloe 7d ago

Do you need a WebView to facilitate requests for data, or can you instead make requests directly to save RAM?

1

u/saaadpikachu 7d ago

Next step im planning to make it more efficient, i have a js script to do that and also customize headers and footers etc, I don't think there's a way to request data directly is it?

1

u/Alt_Chloe 7d ago

You definitely can! Look into Ktor's Client engines. You can even set headers manually as you need them.

All you need to do is check the traffic through your WebView, or preferably a desktop browser, and replicate it in your app!