openEventsPlatformApp/plugins/cordova-plugin-device/doc/pl/README.md
plugins/cordova-plugin-device/doc/pl/README.mdRaw
1<!--
2# license: Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18-->
19
20# cordova-plugin-device
21
22[](https://travis-ci.org/apache/cordova-plugin-device)
23
24Ten plugin określa globalne `device` obiekt, który opisuje urządzenia sprzętowe i programowe. Mimo, że obiekt jest w globalnym zasięgu, nie jest dostępne dopiero po `deviceready` zdarzenie.
25
26 document.addEventListener("deviceready", onDeviceReady, false);
27 function onDeviceReady() {
28 console.log(device.cordova);
29 }
30
31
32## Instalacja
33
34 cordova plugin add cordova-plugin-device
35
36
37## Właściwości
38
39 * device.cordova
40 * device.model
41 * device.platform
42 * device.uuid
43 * device.version
44
45## device.cordova
46
47Pobierz wersję Cordova działa na urządzeniu.
48
49### Obsługiwane platformy
50
51 * Amazon Fire OS
52 * Android
53 * BlackBerry 10
54 * Przeglądarka
55 * Firefox OS
56 * iOS
57 * Tizen
58 * Windows Phone 7 i 8
59 * Windows 8
60
61## device.model
62
63`device.model`Zwraca nazwę modelu lub produktu. Wartość jest zestaw przez producenta urządzenia i mogą się różnić między wersjami tego samego produktu.
64
65### Obsługiwane platformy
66
67 * Android
68 * BlackBerry 10
69 * Przeglądarka
70 * iOS
71 * Tizen
72 * Windows Phone 7 i 8
73 * Windows 8
74
75### Szybki przykład
76
77 // Android: Nexus One returns "Passion" (Nexus One code name)
78 // Motorola Droid returns "voles"
79 // BlackBerry: Torch 9800 returns "9800"
80 // Browser: Google Chrome returns "Chrome"
81 // Safari returns "Safari"
82 // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model;
83
84
85### Dziwactwa Androida
86
87 * Pobiera [nazwę produktu](http://developer.android.com/reference/android/os/Build.html#PRODUCT) zamiast [nazwy modelu](http://developer.android.com/reference/android/os/Build.html#MODEL), który często jest nazwą kod produkcji. Na przykład, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`.
88
89### Dziwactwa Tizen
90
91 * Zwraca modelu urządzenia przypisane przez dostawcę, na przykład,`TIZEN`
92
93### Windows Phone 7 i 8 dziwactwa
94
95 * Zwraca modelu urządzenia, określonej przez producenta. Na przykład Samsung ostrości zwraca`SGH-i917`.
96
97## device.platform
98
99Uzyskać nazwę systemu operacyjnego urządzenia.
100
101 var string = device.platform;
102
103
104### Obsługiwane platformy
105
106 * Android
107 * BlackBerry 10
108 * Browser4
109 * Firefox OS
110 * iOS
111 * Tizen
112 * Windows Phone 7 i 8
113 * Windows 8
114
115### Szybki przykład
116
117 // Depending on the device, a few examples are:
118 // - "Android"
119 // - "BlackBerry 10"
120 // - Browser: returns "MacIntel" on Mac
121 // returns "Win32" on Windows
122 // - "iOS"
123 // - "WinCE"
124 // - "Tizen"
125 var devicePlatform = device.platform;
126
127
128### Dziwactwa Windows Phone 7
129
130Urządzenia Windows Phone 7 raport platformy jako`WinCE`.
131
132### Windows Phone 8 dziwactwa
133
134Urządzenia Windows Phone 8 raport platformy jako`Win32NT`.
135
136## device.uuid
137
138Się urządzenia uniwersalnie unikatowy identyfikator ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
139
140 var string = device.uuid;
141
142
143### Opis
144
145Szczegóły jak UUID jest generowane są określane przez producenta urządzenia i są specyficzne dla platformy lub modelu urządzenia.
146
147### Obsługiwane platformy
148
149 * Android
150 * BlackBerry 10
151 * iOS
152 * Tizen
153 * Windows Phone 7 i 8
154 * Windows 8
155
156### Szybki przykład
157
158 // Android: Returns a random 64-bit integer (as a string, again!)
159 // The integer is generated on the device's first boot
160 //
161 // BlackBerry: Returns the PIN number of the device
162 // This is a nine-digit unique integer (as a string, though!)
163 //
164 // iPhone: (Paraphrased from the UIDevice Class documentation)
165 // Returns a string of hash values created from multiple hardware identifies.
166 // It is guaranteed to be unique for every device and can't be tied
167 // to the user account.
168 // Windows Phone 7 : Returns a hash of device+current user,
169 // if the user is not defined, a guid is generated and will persist until the app is uninstalled
170 // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
171 // unique to every GSM and UMTS mobile phone.
172 var deviceID = device.uuid;
173
174
175### iOS dziwactwo
176
177`uuid`Na iOS nie jest przypisany do urządzenia, ale różni się dla każdej aplikacji, dla każdej instalacji. Zmienia się jeśli możesz usunąć i ponownie zainstalować aplikację, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartości.
178
179### Windows Phone 7 i 8 dziwactwa
180
181`uuid`Dla Windows Phone 7 wymaga uprawnień `ID_CAP_IDENTITY_DEVICE` . Microsoft będzie prawdopodobnie potępiać ten wkrótce. Jeśli funkcja nie jest dostępna, aplikacja generuje trwałe identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urządzeniu.
182
183## device.version
184
185Pobierz wersję systemu operacyjnego.
186
187 var string = device.version;
188
189
190### Obsługiwane platformy
191
192 * Android 2.1 +
193 * BlackBerry 10
194 * Przeglądarka
195 * iOS
196 * Tizen
197 * Windows Phone 7 i 8
198 * Windows 8
199
200### Szybki przykład
201
202 // Android: Froyo OS would return "2.2"
203 // Eclair OS would return "2.1", "2.0.1", or "2.0"
204 // Version can also return update level "2.1-update1"
205 //
206 // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
207 //
208 // Browser: Returns version number for the browser
209 //
210 // iPhone: iOS 3.2 returns "3.2"
211 //
212 // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
213 // Tizen: returns "TIZEN_20120425_2"
214 var deviceVersion = device.version;