PhoneGap ile bir başlatıcı uygulaması oluşturmaya çalışıyorum. Ben bu hat üzerinde şaşırıp:Phonegap Hatası - "Android undefined özelliği 'yakalama' okunamıyor"
navigator.device.capture.captureAudio(onSuccess, onError, {limits:1, duration:5});
O iOS üzerinde çalışıyor ancak Android emülatörünüzde bu hatayı atar:
tanımsız
malı 'yakalama' okunamıyor İşte navigator
nesne hatasının anda var
device
mülkiyet yoktur)
{
"language": "en-US",
"product": "Gecko",
"mimeTypes": {
"length": 0
},
"appVersion": "5.0 (Linux; U; Android 4.0.3; en-us; sdk Build/MR1) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
"plugins": {
"length": 0
},
"onLine": true,
"connection": {
"type": 0
},
"platform": "Linux armv7l",
"vendor": "Google Inc.",
"appCodeName": "Mozilla",
"geolocation": {},
"cookieEnabled": true,
"appName": "Netscape",
"productSub": "20030107",
"userAgent": "Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; sdk Build/MR1) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30",
"vendorSub": ""
}
Ve burada Phonegap.js
yüklendikten hemen sonra PhoneGap
nesne var
{
"commandQueue": [],
"commandQueueFlushing": false,
"_constructors": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
],
"documentEventHandler": {},
"windowEventHandler": {},
"resources": {
"base": true,
"debugconsole": true,
"position": true,
"acceleration": true,
"accelerometer": true,
"battery": true,
"camera": true,
"device": true,
"capture": true,
"contact": true,
"file": true,
"filetransfer": true,
"geolocation": true,
"compass": true,
"media": true,
"notification": true,
"orientation": true,
"sms": true,
"telephony": true,
"network": true,
"splashscreen": true
},
"available": false,
"sessionKey": 0,
"callbackId": 0,
"callbacks": {},
"callbackStatus": {
"NO_RESULT": 0,
"OK": 1,
"CLASS_NOT_FOUND_EXCEPTION": 2,
"ILLEGAL_ACCESS_EXCEPTION": 3,
"INSTANTIATION_EXCEPTION": 4,
"MALFORMED_URL_EXCEPTION": 5,
"IO_EXCEPTION": 6,
"INVALID_ACTION": 7,
"JSON_EXCEPTION": 8,
"ERROR": 9
},
"mediaObjects": {}
}
Herhangi bir fikir nasıl bu geçmiş olsun (o device: true
diyor dikkat edin)?
sen [PhoneGap API] içinde sayfaya işaret Could (http://docs.phonegap.com/en/1.3.0/index.html) nerede 'navigator.device' nesnesini ve PhoneGap'in nasıl artırıldığını açıklar ...? –
O (http://docs.phonegap.com/en/1.3.0/phonegap_media_capture_capture.md.html#capture.captureAudio) – Mrchief
ses yakalama işlevi simülatörü mevcut olmalı [buradan] var? Aygıtta sınayın ve aynı sonucu alıp almadığınızı görün – sciritai