0

I'm in a situation where I could really use functionality to change meta-data in manifest at run-time in my Flutter app. As per my understanding, the androidmanifest.xml elements are only set at compile-time. While trying to find some solution, I came across this and this which says otherwise.

Now I'm curious to know if it is really possible to update these meta-data(s) at runtime? If yes then how to implement this functionality on Flutter?

VipiN Negi
  • 2,994
  • 3
  • 24
  • 47

1 Answers1

1

Yes, updating meta-data is possible in Android, but it's limited to some tags.

About modifying them via Flutter, just like any other platform-specific API, you should use channels:

https://flutter.dev/docs/development/platform-integration/platform-channels

It looks complex but easy to use. Check the battery level reading sample above, it's quite clear.

AVEbrahimi
  • 17,993
  • 23
  • 107
  • 210
  • Thank you for answering this. I hope it works for my usecase i.e. updating AdMob ID(similar to first hyper-linked example). – VipiN Negi Apr 06 '21 at 05:16