Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

android - How to add metadata dynamically (Not in manifest but inside code)?

I want to set app meta data using code. Is it possible in Android ? Trying to set Facebook app id into code not inside manifest.

meta-data android:name="com.facebook.sdk.ApplicationId"android:value="@string/applicationId" 

Please help me.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I want to set app meta data using code.Is it possible in android ?

No, it's not possible. The manifest get's parsed at compile time -> you can't add meta-data at runtime.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...