Alex Rivera | Logout

How can I hide my Google Maps API Key when sharing my code on github?

Asked 2012-02-20T19:59:00.540
9

My Android application is OpenSource, and I am a little bit afraid to share the code on Github, because my API keys were also shared.

I can git ignore my strings.xml file, but I really hope there is an alternative and I will be able to do something clever, so I wont have to worry about it.

Any idea or suggestion?

Edit
Report

1 Answer

2

Put the key in a separate file and read it from there, and only commit a placeholder file to the repository.

answered 2012-02-20T20:03:02.000

Your Answer