在shell级别我使用:
String productname = System.getProperty("ro.product.name")
获取属性 如果我必须在应用程序级别获取属性信息,我应该使用哪个命令。 我试过了
const callApiMiddleware = store => next => action => {
// skip everything which is not API call
const callAPI = action[CALL_API]
if (typeof callAPI === 'undefined') {
return next(action);
}
// the session info from store
const session = store.getState().session;
// perform request
const {endpoint, headers, method} = callAPI;
return fetch(endpoint, {
headers: Object.assign({
Authorization: `Bearer ${session && session.token}`
// you can add more default headers there if you would like so
}, headers),
method
});
};
并且没有错误,但它没有返回正确的值可能是什么原因。
答案 0 :(得分:0)
String deviceName = android.os.Build.MODEL;
String deviceMan = android.os.Build.MANUFACTURER;
请参阅this了解更多