Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
In android if we want to set property from cpp file how it can be done. what headers can be included and what api we can call directly to set property.
Tried executing setprop command from cpp file that works but wanted different approach.
setprop
we can set property directly by including the below header in cpp file
#include <cutils/properties.h>
and setting property using below command
property_set("ro.myprop.server", "1");
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.