【发布时间】:2020-03-01 21:01:20
【问题描述】:
当我尝试在 ionic 中获取 ram 信息和存储信息时,我得到了 null 值。这是代码
import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
@IonicPage()
@Component({
selector: 'page-location',
templateUrl: 'location.html',
})
export class LocationPage {
DeviceInfo={
Ram:'',
Storage:''}
constructor(private extendedDeviceInformation: ExtendedDeviceInformation,public navCtrl: NavController, public navParams: NavParams) {
console.log('The Memory is: ' + this.extendedDeviceInformation.memory);
console.log('The Memory is: ' + this.extendedDeviceInformation.totalstorage);
}}
【问题讨论】:
标签: cordova ionic-framework ionic-native