Back to project page androiddevice.info.
The source code is released under:
GNU General Public License
If you think the Android project androiddevice.info listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package info.androiddevice.deviceinventory.info; // w w w . ja v a 2 s .c o m import android.content.pm.FeatureInfo; import android.content.pm.PackageManager; import org.json.JSONArray; import info.androiddevice.deviceinventory.Application; public class FeaturesProperty implements Property { @Override public Object getProperty() { JSONArray jsonArray = new JSONArray(); PackageManager pm = Application.getContext().getPackageManager(); FeatureInfo[] features = pm != null ? pm.getSystemAvailableFeatures() : new FeatureInfo[0]; for(FeatureInfo feature: features) { jsonArray.put(feature.name); } return jsonArray; } @Override public String getName() { return "feature"; } }