Android Question how change AddReplacement from code?

i used admob like this:
also i use this code in manifest for admob:
AddReplacement($ADMOB_APP_ID$, ca-app-pub-3940256099942544~3347511713)

and i want change this Replacement from code and set new app id for admob
i want use this because I want to use this later and I do not have the app_id now and I also do not want to update the app later because of admob

i found this link for java:

please help me , Thanks.