Automate app local notification by intercepting and manipulating the request and response

Hello All,

I am looking for a solution to manipulate response from server to the app using charles proxy programmatically to trigger the local notification in the native android app.

I spent more time finding the solution in the internet and failed with no luck.

If anyone have done this kind of work and sharing your knowledge is very much helpful.

I want to know, is it possible to launch charles using java and map local the request in java program?

Appreciating your timely help. Thank you in advance.