mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-24 11:15:18 +02:00
Compare commits
897 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 008fa88012 | |||
| 4c49497577 | |||
| 8dd3741fa7 | |||
| 5572e07b34 | |||
| 3f5589b655 | |||
| 48abfdd621 | |||
| 06088b807b | |||
| 21e47d8ce0 | |||
| c39ab2fda2 | |||
| 4197120d92 | |||
| da7bd0f4ea | |||
| 21ac283355 | |||
| 153f638e03 | |||
| 9156735aa0 | |||
| b8ad90a4cb | |||
| 36f7ba71f9 | |||
| b1af2089a4 | |||
| 2b50a314a5 | |||
| 376d02cce2 | |||
| 9e5204934f | |||
| 1ffd77595d | |||
| dac6a362f2 | |||
| 6d29b5140b | |||
| 2c5414a8e7 | |||
| 2fa325dbf3 | |||
| 969a677d7d | |||
| 90470342e7 | |||
| a4e762fb01 | |||
| da2d732041 | |||
| 6a5acee438 | |||
| 49cd5014d2 | |||
| 522882c0cc | |||
| 7e8b4dc4b9 | |||
| 8e673f6634 | |||
| 05e6018bd1 | |||
| e1a845d49f | |||
| 2deded2d88 | |||
| af550a7104 | |||
| e68d7eb12d | |||
| a186e68ca0 | |||
| 81c60ca6f2 | |||
| bd9347afd7 | |||
| 9023cdf726 | |||
| 9caef87899 | |||
| c9d9c065a2 | |||
| c024c8d87b | |||
| 850a0d988a | |||
| 7bd3128e8f | |||
| 43a1ec60ce | |||
| d04d83b972 | |||
| 89516c41e3 | |||
| 4f9b6535fb | |||
| 6ab1f6158a | |||
| bb8e6a51f4 | |||
| 7a8ea2666b | |||
| 3029c6d10c | |||
| 9bb0ba2953 | |||
| 0e22eaf7c3 | |||
| 53ee9d31bc | |||
| 7134edf2f2 | |||
| e4da671cbc | |||
| 8cde2420e7 | |||
| 3c4c215931 | |||
| eb6cdd0fc0 | |||
| 0b1c24e55c | |||
| 057c2d69a9 | |||
| 79c2cf90cf | |||
| 20cbdccbf6 | |||
| 5d05d71210 | |||
| 08294e8ada | |||
| 41f7262280 | |||
| 6aa361b801 | |||
| 9281e0adf3 | |||
| ace10fc511 | |||
| 0ac923e104 | |||
| 082aa0a34a | |||
| acf5c0931f | |||
| ee204f35ef | |||
| e885224855 | |||
| d48eccc0e4 | |||
| 21012b305f | |||
| a79e322eff | |||
| b5a1cf1b10 | |||
| 40ebd7bc2c | |||
| ef37ee0f38 | |||
| 49033bf952 | |||
| d9725240a6 | |||
| cb5518a261 | |||
| ac71d8aa2a | |||
| 62c9af5cba | |||
| a4f16a1f30 | |||
| 1b595ee7fe | |||
| fa556e4e33 | |||
| 391d718909 | |||
| 2ce14e443d | |||
| cdf0a3a3e7 | |||
| f00f9a5277 | |||
| 7112642e89 | |||
| 3714c21f97 | |||
| 24c49b7f2f | |||
| b16429f3f8 | |||
| 27734495f4 | |||
| 097b338d19 | |||
| cbb8450435 | |||
| 3b7e0a91bd | |||
| d9a1e56282 | |||
| b63e74369c | |||
| 4d0ba06cba | |||
| c4369dc237 | |||
| 99dd212496 | |||
| 6e41033ed6 | |||
| 90a5cb7aae | |||
| bccfbaa03b | |||
| e32ff7116d | |||
| 00214843cb | |||
| dd4054c4fc | |||
| 0b40b92340 | |||
| 60a3c41003 | |||
| f501c60de1 | |||
| b985a935b0 | |||
| a2f1790db2 | |||
| 5784ab63cc | |||
| fd857c2586 | |||
| 29df8762e2 | |||
| 32e13c3495 | |||
| e6151b3b71 | |||
| 6823b08651 | |||
| b588bb02f4 | |||
| faf7b6efa2 | |||
| 03492da2cd | |||
| 8abfc2ada0 | |||
| a262a2ef71 | |||
| 435a38f1d1 | |||
| 91d7db7c01 | |||
| e298c88728 | |||
| d58e7a58d0 | |||
| e530412ef0 | |||
| 1d5e2dc4d5 | |||
| d0b5faf266 | |||
| 76e8a39276 | |||
| 66fe8e694f | |||
| abd8a230b4 | |||
| 565662a8aa | |||
| 0f00e71b5e | |||
| 44fea0117d | |||
| b9b39a24f7 | |||
| 358fb87683 | |||
| f0ef73d150 | |||
| 1d2297a5fc | |||
| 862736bba4 | |||
| e30dac7cc2 | |||
| f97d5fa232 | |||
| e909616aff | |||
| be219bbee6 | |||
| 17c1c81b4e | |||
| bf0a16c707 | |||
| 86a54feb41 | |||
| 2c923470f8 | |||
| 5d26250b45 | |||
| 6d90e0bf51 | |||
| 51df795a8c | |||
| 9ee053e4f9 | |||
| 4044185ab3 | |||
| f4fe825162 | |||
| cb785b89f0 | |||
| 8289128399 | |||
| e9146f5fc1 | |||
| bc7de458d3 | |||
| 4aa44331f0 | |||
| eada19f516 | |||
| 63677b1451 | |||
| 5789d96a3d | |||
| 0afdeb9bcc | |||
| 79dd8f4e49 | |||
| 93f204ba22 | |||
| 98ad96115a | |||
| ae4ce12c17 | |||
| b8767042b4 | |||
| 200e5f3373 | |||
| ebb68cccfe | |||
| cc4be23802 | |||
| 9f44b1695d | |||
| 94344deff3 | |||
| a41994cb41 | |||
| eee6a713fa | |||
| aed28fe503 | |||
| 7bc72e683b | |||
| 31e386de44 | |||
| 31737efd87 | |||
| be096b9657 | |||
| 3e773ef94b | |||
| 111adc917b | |||
| 6a1b2861f3 | |||
| ed3ff01c22 | |||
| 73e4af98cc | |||
| 84835428ba | |||
| 9f3099ef2b | |||
| 412eed51cd | |||
| bd20d1af02 | |||
| a15932cc7f | |||
| 8942c31a5c | |||
| 90fe6921e2 | |||
| e8a872d351 | |||
| a16ae846ae | |||
| 38de0e352f | |||
| eeaa50ddcb | |||
| 16b0d4eb24 | |||
| 053fb403c5 | |||
| 1d70d4bca0 | |||
| bba04ba1bd | |||
| e926180605 | |||
| 958b62f8c7 | |||
| d238a9e9dd | |||
| 1588c25fba | |||
| fb993a7060 | |||
| 6b375614ca | |||
| da928fb549 | |||
| f657c2f1d1 | |||
| 594cc0f06d | |||
| d712bb1988 | |||
| d00c92ef99 | |||
| 59a30238eb | |||
| cb75c6fbe6 | |||
| 8056b66714 | |||
| e09501d779 | |||
| 70192222ad | |||
| cc253d4b33 | |||
| 7d3918a1c6 | |||
| e759a14909 | |||
| fd5a1c5b4b | |||
| c95dc12a96 | |||
| 70ef5912c2 | |||
| 79bb9db3b9 | |||
| d3791ea99b | |||
| 5982fed0b8 | |||
| 1254df2db1 | |||
| 8a23af8581 | |||
| 9cabb27c39 | |||
| 5c17437ba6 | |||
| 520c3659d2 | |||
| 962374b765 | |||
| 8fcc809299 | |||
| 8eac101082 | |||
| b1605ac44e | |||
| 90afc1e221 | |||
| adeba81340 | |||
| 8c10b7ba04 | |||
| 8aae77ff70 | |||
| 7eeacc6268 | |||
| 06e02781d2 | |||
| 3b5625c663 | |||
| ea47f93bc1 | |||
| c33c2de18b | |||
| f125a798bf | |||
| 84d7281002 | |||
| d98a53ec43 | |||
| ee3026233e | |||
| 8fb0b69a79 | |||
| 03ce6c05a9 | |||
| 1d3a03909b | |||
| 7020b78faa | |||
| f1746b41a2 | |||
| 22b96e4b24 | |||
| ddf684f6c6 | |||
| cc9d327ea0 | |||
| 47e23e3463 | |||
| 8feb903021 | |||
| 124172e4d7 | |||
| 9d4367cfac | |||
| 6cd9dfce8c | |||
| 4a3dbe4d60 | |||
| 062ab5045a | |||
| ba472d3b7b | |||
| 82adcf37f4 | |||
| 4f23690ab4 | |||
| 17481aeb38 | |||
| 26adbb1717 | |||
| ffd2785499 | |||
| 5c6d160cbf | |||
| 28a5c5b343 | |||
| 3501fff7fc | |||
| 1988337598 | |||
| be2fdd5cfa | |||
| ef0837c514 | |||
| 252f88e362 | |||
| 8ba9b47141 | |||
| f984339b13 | |||
| a1ff1d2585 | |||
| 3bbe7d0322 | |||
| 3fd729f1a2 | |||
| 375b75c422 | |||
| 340a1e3e3a | |||
| 8d3ab8f93b | |||
| 8dc52de871 | |||
| 6ff39be4bf | |||
| e2548ac9e2 | |||
| 0ce94ada82 | |||
| 77a4c4be70 | |||
| 9616084769 | |||
| 163a246c58 | |||
| 31efcb4a86 | |||
| 1faea596f8 | |||
| cd5cb9093c | |||
| 9f1bd89a0c | |||
| 0908053881 | |||
| 910068bcf5 | |||
| d9ae0ff1bf | |||
| 4bea1a6e70 | |||
| e7873b0fa0 | |||
| 7cd44c853a | |||
| 818b42b97e | |||
| 5870ba98b4 | |||
| 19939c985a | |||
| 7d65a9ef22 | |||
| eb45f7c3bc | |||
| 90a89c9224 | |||
| e59b52dcac | |||
| 07d4edef4e | |||
| b76c2f7b8d | |||
| be414510a4 | |||
| e4b2052231 | |||
| 5066b23603 | |||
| 86de9830b4 | |||
| 758b5e4810 | |||
| 79e2c55c34 | |||
| 802cf51cf9 | |||
| 55d4a90041 | |||
| cf535a2f8f | |||
| ba38964e8a | |||
| c943e5dd43 | |||
| 65f44da4c9 | |||
| 24c51afa40 | |||
| e6739adb35 | |||
| 06fceb07cc | |||
| c87029254c | |||
| d52aca1d3d | |||
| 26af05cd01 | |||
| f7750f2a2c | |||
| 675b4f55c1 | |||
| a322439a83 | |||
| f7a1046c67 | |||
| c17593d932 | |||
| 109d2969a5 | |||
| 2d3c463bf3 | |||
| 74073b641f | |||
| 426033f835 | |||
| a9ad1e22d6 | |||
| 903aa014e4 | |||
| e058854c3f | |||
| c16ce866dc | |||
| f9eba950e0 | |||
| 3eb53d3195 | |||
| 2a5921d3d0 | |||
| 440c711335 | |||
| 7ea573123b | |||
| 7f5ce45fad | |||
| bd16542e25 | |||
| b95a696a5a | |||
| b8f40e8314 | |||
| 0bbeff0b5b | |||
| 5828e16421 | |||
| 8497d2efba | |||
| b578d2ced0 | |||
| 239b461f75 | |||
| c7db7c0926 | |||
| e107766a61 | |||
| 05a0b6c615 | |||
| 7ada8f18fb | |||
| 887a77f4a3 | |||
| 97bde67b1d | |||
| 33c3668175 | |||
| 0158fc3a7a | |||
| 72bb2ddb08 | |||
| 01c1a37fa2 | |||
| 35aa51d6a9 | |||
| ada42ee57d | |||
| fe9b27ecf2 | |||
| e03f120a00 | |||
| 59344f540d | |||
| e829f1fc1b | |||
| d9904eb5f1 | |||
| 10cd26af5e | |||
| c1f649fc83 | |||
| a4865f860d | |||
| 14fce8edfe | |||
| 6826e3567d | |||
| 250e8625a7 | |||
| 58530d6f72 | |||
| 823fb3fca7 | |||
| 29302c0891 | |||
| 03570ebd43 | |||
| 2a4a0d38e3 | |||
| 9be9127ad1 | |||
| 66dd1c01f0 | |||
| d8dce7938d | |||
| 0701f5885e | |||
| ea3f660999 | |||
| 95a21ffe8a | |||
| 89d2cf8340 | |||
| 0eb676d3cd | |||
| ac1a762fa8 | |||
| 59a05262a1 | |||
| 5f91d187c8 | |||
| 8d8bf311ed | |||
| 69545c8a56 | |||
| a1868c0205 | |||
| 12bc4f0da8 | |||
| 510b887042 | |||
| ff7171daa2 | |||
| 5b0dbd5d30 | |||
| 9c7fb25a94 | |||
| 2e24eab5ad | |||
| 8135ad4424 | |||
| 6ffa40e40d | |||
| bc120176ca | |||
| d50d4ae1c9 | |||
| d34aa61e95 | |||
| 04578a4ed1 | |||
| 3e5282a06d | |||
| f86cadb802 | |||
| c4fe4d87db | |||
| 7e5deeaab3 | |||
| 36c425d699 | |||
| a2c69c6144 | |||
| 58e3c0604d | |||
| 7408849eb5 | |||
| b42142f692 | |||
| ddafdcf392 | |||
| 95cbaf1993 | |||
| 43aa3c857d | |||
| 964e0d6f41 | |||
| 5a1c52d3b5 | |||
| 02c374b61e | |||
| f2094e049a | |||
| 8ff2b3b090 | |||
| eeaa363132 | |||
| 43e51848fc | |||
| 8b17117220 | |||
| a4e06a4ce0 | |||
| 4d55f5ebdb | |||
| 268f3c77c2 | |||
| ce73718620 | |||
| d307c58f87 | |||
| e7ec021da8 | |||
| ca94fc7a96 | |||
| 9d650c4885 | |||
| c6d9be499c | |||
| 0e78e8b3f9 | |||
| 2a99278b52 | |||
| 4a47c096f7 | |||
| bd961be055 | |||
| 525fea80b8 | |||
| 6f92ae6a59 | |||
| 8bad6c0f54 | |||
| 91cca16f40 | |||
| a0697a048d | |||
| d22c6aae79 | |||
| 83997980ba | |||
| 4d9bdd1c12 | |||
| 163a73722e | |||
| 65d17decb8 | |||
| 1aa300f97e | |||
| 8fbb30bded | |||
| 6b0f1a0c10 | |||
| 1cee590eca | |||
| 9ff370ee27 | |||
| cd0057ea5a | |||
| 2c0a294b6a | |||
| 3e09bd5c60 | |||
| 0a99d7cebb | |||
| 3138e3edc7 | |||
| 99ab34ad0b | |||
| 9b7923f8f5 | |||
| cfcbe7f107 | |||
| 5fb27ab186 | |||
| 36b1a3c020 | |||
| baccb5d12e | |||
| adc4621711 | |||
| a8d78664e9 | |||
| 9fab4eb088 | |||
| 0d0f1315ff | |||
| 555598c155 | |||
| f49fa23f69 | |||
| b732064f88 | |||
| 1f99a381eb | |||
| 81b610cc4c | |||
| b0a0bfc888 | |||
| 6221ccb53b | |||
| cbe1da2d68 | |||
| 24297e373c | |||
| 99d14a559c | |||
| 08339a1f65 | |||
| 4e3ad38087 | |||
| 63c97fadc6 | |||
| 45633ad7e8 | |||
| 8508decd5c | |||
| 315f47bf30 | |||
| 12f8d79d84 | |||
| 710690e2d2 | |||
| 03bfbe81d0 | |||
| c990fb6fe7 | |||
| 9b31cd63a4 | |||
| dee3ccdf77 | |||
| de23a32c96 | |||
| 2beb840a5c | |||
| f748d76549 | |||
| 9d9a326c2b | |||
| 9184827195 | |||
| cb533c954b | |||
| ead876036d | |||
| cfa25eccb1 | |||
| b0d6233de6 | |||
| b07b8a1aaa | |||
| a68cdaf2ba | |||
| 16641b9193 | |||
| 0469a90992 | |||
| 6dc3e5ab7a | |||
| 82012fa623 | |||
| 7ddd254bb1 | |||
| 464858cfdf | |||
| 30db23255d | |||
| 868c1ef891 | |||
| b961356b7b | |||
| 2e32d6c574 | |||
| a31e5aab79 | |||
| ae4f9565bd | |||
| f33ba10b96 | |||
| 904c519091 | |||
| a0db837910 | |||
| 51cb5db8b4 | |||
| c328728e0c | |||
| 3384ef67a6 | |||
| e89c549706 | |||
| 3c67ac73da | |||
| 656349e6c5 | |||
| df2af0185c | |||
| 913d30f2de | |||
| e96172b698 | |||
| 0c241f683d | |||
| a19097de2b | |||
| f6feeb9d1e | |||
| f205e6f9cc | |||
| 4e543e6068 | |||
| 176062f11c | |||
| 4d88191171 | |||
| 025ea1d094 | |||
| a4283d545a | |||
| 52fa2aace9 | |||
| fa711cf142 | |||
| 70bc7e53fe | |||
| 56f22aa073 | |||
| 878a87278d | |||
| c4a539d2ba | |||
| 4225e81080 | |||
| 8fd4887f10 | |||
| 0e397797b4 | |||
| e6c8458ce7 | |||
| 50ea9919af | |||
| 67f62df894 | |||
| 0da0280156 | |||
| fa713eac4a | |||
| 2c7d56ab34 | |||
| e340268dd0 | |||
| affec6720b | |||
| 5047826a74 | |||
| 33d9230442 | |||
| 607b174c5f | |||
| 6b4ea71404 | |||
| 014322c240 | |||
| b789f84151 | |||
| 19d5fe1ba6 | |||
| 93b95954c4 | |||
| fb7a2aaa32 | |||
| 3105eacd4d | |||
| 215893214f | |||
| 30e01d6700 | |||
| 94cfc5d7d6 | |||
| 471b32cce1 | |||
| 036b34e91d | |||
| 77f7f8c1ed | |||
| e6fc991d2a | |||
| 060881777d | |||
| 6e567fa725 | |||
| 7e4c01937f | |||
| 06a00e6482 | |||
| 242df42f55 | |||
| 8d78c16c8a | |||
| db2b05eb7f | |||
| 282b1090ba | |||
| 4f6c9fa866 | |||
| 9375842c71 | |||
| ea3fca0f1b | |||
| 5971d67a66 | |||
| 9f5fa880d6 | |||
| 357b68dd4f | |||
| 384f3f5698 | |||
| 4577ff9628 | |||
| e6cd9f524d | |||
| 3dad56621f | |||
| 6c9a225b64 | |||
| 3bbb9bd95d | |||
| a4f855ccd8 | |||
| 4d80af4e06 | |||
| 7abce12499 | |||
| 7b1302c011 | |||
| 66d23b7eac | |||
| dc0255509b | |||
| 6661f91eb5 | |||
| 2eb36aedeb | |||
| 0e623ebfeb | |||
| ffb73569e9 | |||
| 713cda9455 | |||
| 223721cca8 | |||
| e7479c8a93 | |||
| 224fe0069b | |||
| cb97847392 | |||
| 6a29531467 | |||
| 262e249d2c | |||
| 77479efaef | |||
| 898863a8d9 | |||
| 05d555f98d | |||
| 868092db10 | |||
| 7a738c2eca | |||
| b304dbcba6 | |||
| 6e28a5daa4 | |||
| 8f4f9660ed | |||
| 2d01535651 | |||
| e57d4669fc | |||
| f47c599dea | |||
| 7a693a90f7 | |||
| 9cf51de3f7 | |||
| 5089c20cd6 | |||
| a0da23f86a | |||
| 44d24b57c6 | |||
| c143d774d4 | |||
| 9e92240dd0 | |||
| d2c586b096 | |||
| fbfbb9408a | |||
| fb56665dec | |||
| 5b65c216b6 | |||
| 9ad98c5970 | |||
| cae9d0f2e5 | |||
| c0d267c63e | |||
| 70704b0a5e | |||
| b135275201 | |||
| 7e1eae6681 | |||
| 30f5d6dc85 | |||
| a50dd1168b | |||
| 62fa1620aa | |||
| a0d42c8b59 | |||
| a21663da61 | |||
| 67a0382942 | |||
| f5c2467d01 | |||
| a3abcc8094 | |||
| edf439f301 | |||
| 2245563250 | |||
| bca21d5515 | |||
| 89cae2e7c9 | |||
| 26c381a4c4 | |||
| 4bc5aa050c | |||
| cd44b0d180 | |||
| 59ee91ca5d | |||
| 59165a7033 | |||
| 93d242c05f | |||
| 4bbb6591e3 | |||
| 7df8025f6a | |||
| f19c52f40e | |||
| b7840779fe | |||
| 28042a8cc9 | |||
| b2907226bf | |||
| a2f46821f5 | |||
| b7385cd4cc | |||
| 718c65818c | |||
| 91e2293606 | |||
| 3c4a921f9a | |||
| d04b333126 | |||
| 0a4bef4d9a | |||
| a0f090a83a | |||
| dc8ee5943c | |||
| 9132c36aa7 | |||
| 224c0d759f | |||
| ffcaca2db1 | |||
| 409fc4a43b | |||
| 16968f3f2b | |||
| e3fd0dce21 | |||
| 53b6b6deca | |||
| 26f47a50d0 | |||
| 3cf77374c4 | |||
| a1129c3f0f | |||
| 2fe74603a3 | |||
| 54d517363d | |||
| 948fe0c0e6 | |||
| dbd8e6c0e9 | |||
| 02b5601933 | |||
| 3ed40608a2 | |||
| 36d7c2dd91 | |||
| fa7ef68851 | |||
| f84877a4fc | |||
| 261fb62e24 | |||
| 48d8aa4cd8 | |||
| 95ff0d3db6 | |||
| 2dc1d914c0 | |||
| fc06701009 | |||
| ee4f334296 | |||
| cac2395237 | |||
| 5afc3f13cf | |||
| 9030917c14 | |||
| 9905def352 | |||
| a3793aa92b | |||
| 76c8498956 | |||
| 75bd8ea5a2 | |||
| 50a5e864ac | |||
| 352fc26f7e | |||
| 44afa1623e | |||
| 14acafabfc | |||
| 773af58d03 | |||
| 352b851e9c | |||
| 8353a01082 | |||
| b70e001206 | |||
| a741bb4d55 | |||
| 24adee3d54 | |||
| 09203ffb95 | |||
| e94338f4c6 | |||
| dd9dd8ee81 | |||
| 01d6dcac59 | |||
| ad0ee6b0d6 | |||
| 769c8c228e | |||
| 50fcd67085 | |||
| 52d03e6b7d | |||
| b949cd0039 | |||
| e527170315 | |||
| ec7d210c36 | |||
| 74a4089464 | |||
| fa9e14f574 | |||
| cdbeefcd16 | |||
| ffdd5f4091 | |||
| bb60525780 | |||
| 82634af649 | |||
| 3643ed9f13 | |||
| fac59ab705 | |||
| 1e343b0d12 | |||
| 34bb467b97 | |||
| b092525c10 | |||
| 256dac3a82 | |||
| dfe947f54d | |||
| ce09407816 | |||
| beee6af79d | |||
| c282562867 | |||
| 2aed9b3a33 | |||
| 210910f21e | |||
| 1d666318ae | |||
| 4df6095089 | |||
| d4edcce224 | |||
| d7c6761841 | |||
| 5733224f8d | |||
| 22fd5042bc | |||
| 44a6f2d448 | |||
| cd9c17f9b3 | |||
| dc07bcf0fa | |||
| 248b8fb4fd | |||
| d5ec7c3001 | |||
| 35182a1483 | |||
| 21b0a517a9 | |||
| 19a770445e | |||
| c6512f1376 | |||
| 2cb3963138 | |||
| d05c394c68 | |||
| 797de31960 | |||
| a0af1a811a | |||
| 4933b9ce54 | |||
| e81c4eb155 | |||
| b284c8bc56 | |||
| 872d2d4337 | |||
| 525f1b7781 | |||
| 2f99d8ca62 | |||
| 7781014cf7 | |||
| 2432b36f5d | |||
| 288aa015fa | |||
| 1cb8b922c3 | |||
| 41cec64bf6 | |||
| d82bda9d00 | |||
| b84da40365 | |||
| d02c947b84 | |||
| 7167a5a71e | |||
| f13c2455ea | |||
| b200b66612 | |||
| b811df8cda | |||
| 1e239b78c3 | |||
| 3a8daadd92 | |||
| f605d6fca5 | |||
| cd85e43624 | |||
| 2b94d09539 | |||
| ab82da5c75 | |||
| 8a467aa537 | |||
| 742e6b1e3e | |||
| e35e8bcdce | |||
| 5f953aa47f | |||
| e550e9aa1d | |||
| 26e2defd9e | |||
| 3b3641c69e | |||
| 56ccd518d6 | |||
| 59846280a8 | |||
| aa95e3abcd | |||
| ad6340c1a7 | |||
| 62a54aab58 | |||
| 23f1e81cf0 | |||
| d014f422d2 | |||
| 68a9f1bc46 | |||
| 798637d465 | |||
| 60ea4c5f77 | |||
| 0e119950c2 | |||
| 4be4467fc6 | |||
| 06636b2a28 | |||
| 71a36d1b25 | |||
| 9ba93ff8d2 | |||
| 4059308dd7 | |||
| 9befe8ae5f | |||
| 20e01f3b2c | |||
| 98b894ed8e | |||
| ac8b7264b3 | |||
| bf7b24ecc0 | |||
| 9f43dd2db5 | |||
| 28d868985e | |||
| cf1be26da2 | |||
| 1de9b73aa0 | |||
| 3532a6360b | |||
| beddc8e1ea | |||
| df81fba565 | |||
| 25da0d26ef | |||
| e0c34d20a8 | |||
| cc6db5b5cc | |||
| c38df03add | |||
| 63402358d1 | |||
| 3ae1de735e | |||
| a701eb0e4f | |||
| 09caf017a9 | |||
| 32b8b2093d | |||
| c84a4f1aa8 | |||
| d90c0b5431 | |||
| 94f6785f0d | |||
| f01c382807 | |||
| 6d42803dd8 | |||
| 61e908ccb5 | |||
| 236bcba2bd | |||
| 7bae8c34a7 | |||
| 3960341640 | |||
| 06e453dd05 | |||
| 0347877290 | |||
| b464526d5e | |||
| 361b1cbad4 | |||
| 56a866fca7 | |||
| 49e0d68374 | |||
| 0ccd05e605 | |||
| 916e4586c5 | |||
| c9ffd0b4bb | |||
| 1d2f6f46a4 | |||
| 4af6d856b9 | |||
| 6fd4294391 | |||
| 88b2b85f2a | |||
| 2c1dff6ac8 | |||
| 481b42f563 | |||
| 597c321009 | |||
| 76651f75d8 | |||
| 3d8bae55a1 | |||
| 4b6869e367 | |||
| 477ba7c081 | |||
| 5b6d9725b8 | |||
| 25c3cea115 | |||
| d90601276f | |||
| 4f692bc698 | |||
| d8dd02eef0 | |||
| 8ad65ae233 | |||
| eabbb4569b | |||
| 49888b771d | |||
| 2b1c1cd052 | |||
| 61884e67ec | |||
| 9a2f028843 | |||
| 2b56acf164 | |||
| 98b67dcc28 | |||
| 500dfa3107 | |||
| c4efcfd2db | |||
| 81ee6bbcf6 | |||
| e4e2e76e06 | |||
| f847862e84 | |||
| 427dbeafde | |||
| 99ac85b40e | |||
| 020388baed | |||
| 4ade79de4f | |||
| 870dda9b8b | |||
| 27dd5298f7 | |||
| 6d5d406ce9 | |||
| ffb5e7e6f7 | |||
| 0de101c89f | |||
| bd3a0766e1 | |||
| f536cc8f8a | |||
| 826c0495fc | |||
| 9eac541ce5 |
@@ -5,3 +5,7 @@ syntax:glob
|
|||||||
*/proguard/**
|
*/proguard/**
|
||||||
.metadata
|
.metadata
|
||||||
MyTracksTest/annotations.log
|
MyTracksTest/annotations.log
|
||||||
|
**/*.pyc
|
||||||
|
**/*.pyo
|
||||||
|
syntax: glob
|
||||||
|
MyTracksTest/hs_err_pid*.log
|
||||||
|
|||||||
+10
-2
@@ -3,8 +3,16 @@
|
|||||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||||
<classpathentry kind="lib" path="libs/googleloginclient-helper.jar"/>
|
<classpathentry kind="lib" path="libs/googleloginclient-helper.jar"/>
|
||||||
<classpathentry kind="lib" path="libs/google-common.jar"/>
|
<classpathentry kind="lib" path="libs/google-common.jar"/>
|
||||||
<classpathentry kind="lib" path="libs/accounts.jar"/>
|
<classpathentry kind="lib" path="libs/libGoogleAnalytics.jar"/>
|
||||||
<classpathentry kind="lib" path="libs/google-api-client-1.2.2-alpha.jar"/>
|
<classpathentry kind="lib" path="libs/google-api-client/commons-codec-1.3.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/commons-logging-1.1.1.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/google-api-client-1.5.0-beta.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/google-http-client-1.5.0-beta.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/google-oauth-client-1.5.0-beta.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/gson-1.6.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/guava-r09.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/jackson-core-asl-1.6.7.jar"/>
|
||||||
|
<classpathentry kind="lib" path="libs/google-api-client/jsr305-1.3.9.jar"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" path="gen"/>
|
<classpathentry kind="src" path="gen"/>
|
||||||
<classpathentry exported="true" kind="lib" path="/MyTracksLib/libs/protobuf-java-2.3.0-lite.jar"/>
|
<classpathentry exported="true" kind="lib" path="/MyTracksLib/libs/protobuf-java-2.3.0-lite.jar"/>
|
||||||
|
|||||||
+41
-40
@@ -1,40 +1,41 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>MyTracks</name>
|
<name>MyTracks</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
<project>MyTracksLib</project>
|
||||||
<buildSpec>
|
</projects>
|
||||||
<buildCommand>
|
<buildSpec>
|
||||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
<buildCommand>
|
||||||
<arguments>
|
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||||
</arguments>
|
<arguments>
|
||||||
</buildCommand>
|
</arguments>
|
||||||
<buildCommand>
|
</buildCommand>
|
||||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
<buildCommand>
|
||||||
<arguments>
|
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||||
</arguments>
|
<arguments>
|
||||||
</buildCommand>
|
</arguments>
|
||||||
<buildCommand>
|
</buildCommand>
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
<buildCommand>
|
||||||
<arguments>
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
</arguments>
|
<arguments>
|
||||||
</buildCommand>
|
</arguments>
|
||||||
<buildCommand>
|
</buildCommand>
|
||||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
<buildCommand>
|
||||||
<arguments>
|
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||||
</arguments>
|
<arguments>
|
||||||
</buildCommand>
|
</arguments>
|
||||||
</buildSpec>
|
</buildCommand>
|
||||||
<natures>
|
</buildSpec>
|
||||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||||
</natures>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<linkedResources>
|
</natures>
|
||||||
<link>
|
<linkedResources>
|
||||||
<name>MyTracksLib_src</name>
|
<link>
|
||||||
<type>2</type>
|
<name>MyTracksLib_src</name>
|
||||||
<locationURI>_android_MyTracksLib_e2802071/src</locationURI>
|
<type>2</type>
|
||||||
</link>
|
<locationURI>_android_MyTracksLib_e2802071/src</locationURI>
|
||||||
</linkedResources>
|
</link>
|
||||||
</projectDescription>
|
</linkedResources>
|
||||||
|
</projectDescription>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#Wed Sep 29 18:44:16 BRT 2010
|
#Thu Jul 21 03:01:59 BRT 2011
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
@@ -7,6 +7,343 @@ org.eclipse.jdt.core.compiler.compliance=1.6
|
|||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
|
||||||
|
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.format_source_code=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.comment.line_length=80
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
|
||||||
|
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
|
||||||
|
org.eclipse.jdt.core.formatter.compact_else_if=true
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation=2
|
||||||
|
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
|
||||||
|
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
|
||||||
|
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||||
|
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=true
|
||||||
|
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_empty_lines=false
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
|
||||||
|
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
|
||||||
|
org.eclipse.jdt.core.formatter.indentation.size=4
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
|
||||||
|
org.eclipse.jdt.core.formatter.join_lines_in_comments=true
|
||||||
|
org.eclipse.jdt.core.formatter.join_wrapped_lines=true
|
||||||
|
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=true
|
||||||
|
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
|
||||||
|
org.eclipse.jdt.core.formatter.lineSplit=80
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||||
|
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||||
|
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||||
|
org.eclipse.jdt.core.formatter.tabulation.size=2
|
||||||
|
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||||
|
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
|
||||||
|
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#Thu Jul 21 03:04:13 BRT 2011
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
|
||||||
|
formatter_profile=_MyTracks
|
||||||
|
formatter_settings_version=12
|
||||||
|
org.eclipse.jdt.ui.ignorelowercasenames=true
|
||||||
|
org.eclipse.jdt.ui.importorder=com;android;java;javax;org;
|
||||||
|
org.eclipse.jdt.ui.ondemandthreshold=99
|
||||||
|
org.eclipse.jdt.ui.staticondemandthreshold=99
|
||||||
|
sp_cleanup.add_default_serial_version_id=true
|
||||||
|
sp_cleanup.add_generated_serial_version_id=false
|
||||||
|
sp_cleanup.add_missing_annotations=true
|
||||||
|
sp_cleanup.add_missing_deprecated_annotations=true
|
||||||
|
sp_cleanup.add_missing_methods=false
|
||||||
|
sp_cleanup.add_missing_nls_tags=false
|
||||||
|
sp_cleanup.add_missing_override_annotations=true
|
||||||
|
sp_cleanup.add_missing_override_annotations_interface_methods=true
|
||||||
|
sp_cleanup.add_serial_version_id=false
|
||||||
|
sp_cleanup.always_use_blocks=true
|
||||||
|
sp_cleanup.always_use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.always_use_this_for_non_static_field_access=false
|
||||||
|
sp_cleanup.always_use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.convert_to_enhanced_for_loop=false
|
||||||
|
sp_cleanup.correct_indentation=false
|
||||||
|
sp_cleanup.format_source_code=false
|
||||||
|
sp_cleanup.format_source_code_changes_only=false
|
||||||
|
sp_cleanup.make_local_variable_final=false
|
||||||
|
sp_cleanup.make_parameters_final=false
|
||||||
|
sp_cleanup.make_private_fields_final=true
|
||||||
|
sp_cleanup.make_type_abstract_if_missing_method=false
|
||||||
|
sp_cleanup.make_variable_declarations_final=true
|
||||||
|
sp_cleanup.never_use_blocks=false
|
||||||
|
sp_cleanup.never_use_parentheses_in_expressions=true
|
||||||
|
sp_cleanup.on_save_use_additional_actions=false
|
||||||
|
sp_cleanup.organize_imports=true
|
||||||
|
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
|
||||||
|
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
|
||||||
|
sp_cleanup.remove_private_constructors=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces=false
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_all=true
|
||||||
|
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
|
||||||
|
sp_cleanup.remove_unnecessary_casts=true
|
||||||
|
sp_cleanup.remove_unnecessary_nls_tags=false
|
||||||
|
sp_cleanup.remove_unused_imports=false
|
||||||
|
sp_cleanup.remove_unused_local_variables=false
|
||||||
|
sp_cleanup.remove_unused_private_fields=true
|
||||||
|
sp_cleanup.remove_unused_private_members=false
|
||||||
|
sp_cleanup.remove_unused_private_methods=true
|
||||||
|
sp_cleanup.remove_unused_private_types=true
|
||||||
|
sp_cleanup.sort_members=false
|
||||||
|
sp_cleanup.sort_members_all=false
|
||||||
|
sp_cleanup.use_blocks=false
|
||||||
|
sp_cleanup.use_blocks_only_for_return_and_throw=false
|
||||||
|
sp_cleanup.use_parentheses_in_expressions=false
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access=false
|
||||||
|
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access=false
|
||||||
|
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
|
||||||
+142
-44
@@ -17,10 +17,11 @@ limitations under the License.
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.android.maps.mytracks"
|
package="com.google.android.maps.mytracks"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionCode="27"
|
android:versionCode="33"
|
||||||
android:versionName="1.1.4">
|
android:versionName="1.1.10">
|
||||||
<application android:icon="@drawable/arrow_icon"
|
<application android:icon="@drawable/arrow_icon"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:name="com.google.android.apps.mytracks.MyTracksApplication"
|
||||||
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgent">
|
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgent">
|
||||||
<uses-library android:name="com.google.android.maps" />
|
<uses-library android:name="com.google.android.maps" />
|
||||||
|
|
||||||
@@ -44,6 +45,120 @@ limitations under the License.
|
|||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.track" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.MapActivity"
|
||||||
|
android:label="MyTracks"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.TAB" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.MyMapsList"
|
||||||
|
android:label="@string/map_list_title"
|
||||||
|
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<!-- TODO: VIEW and PICK for track cursor dir -->
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.TrackList"
|
||||||
|
android:label="Recorded Tracks" />
|
||||||
|
|
||||||
|
<!-- TODO: VIEW and PICK for waypoint cursor dir -->
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.WaypointsList"
|
||||||
|
android:label="Recorded Waypoints" />
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.TrackDetails"
|
||||||
|
android:label="@string/trackdetails_title">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.EDIT" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.track" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.DeleteTrack"
|
||||||
|
android:label="@string/deletetrack_title"
|
||||||
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||||
|
android:noHistory="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.DELETE" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.track" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.WaypointDetails"
|
||||||
|
android:label="@string/waypointdetails_title">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<action android:name="android.intent.action.EDIT" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.waypoint" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.SettingsActivity"
|
||||||
|
android:label="@string/mytracks_settings" >
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.PREFERENCE" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.AggregatedStatsActivity"
|
||||||
|
android:label="@string/aggregated_stats" />
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.StatsActivity"
|
||||||
|
android:label="@string/statistics"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.TAB" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.SensorStateActivity"
|
||||||
|
android:label="@string/sensor_state" />
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.ChartActivity"
|
||||||
|
android:label="@string/elevation_label"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<category android:name="android.intent.category.TAB" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.io.sendtogoogle.SendActivity"
|
||||||
|
android:label="@string/sendtogoogle_title"
|
||||||
|
android:theme="@android:style/Theme.Translucent.NoTitleBar">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SEND" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.track" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.io.file.SaveActivity"
|
||||||
|
android:label="@string/tracklist_write_to_sd"
|
||||||
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||||
|
android:noHistory="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.SAVE" />
|
||||||
|
<data android:mimeType="vnd.android.cursor.item/vnd.google.track" />
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
|
||||||
|
<activity android:name="com.google.android.apps.mytracks.io.file.ImportActivity"
|
||||||
|
android:label="@string/import_title"
|
||||||
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||||
|
android:noHistory="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
<action android:name="android.intent.action.ATTACH_DATA" />
|
||||||
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
<data android:scheme="file" />
|
<data android:scheme="file" />
|
||||||
<data android:mimeType="application/gpx+xml" />
|
<data android:mimeType="application/gpx+xml" />
|
||||||
<data android:mimeType="application/gpx" />
|
<data android:mimeType="application/gpx" />
|
||||||
@@ -52,44 +167,6 @@ limitations under the License.
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksMap"
|
|
||||||
android:label="MyTracks"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyMapsList"
|
|
||||||
android:label="@string/map_list_title"
|
|
||||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|fontScale"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksList"
|
|
||||||
android:label="Recorded Tracks" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksWaypointsList"
|
|
||||||
android:label="Recorded Waypoints" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksDetails"
|
|
||||||
android:label="@string/trackdetails_title" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksWaypointDetails"
|
|
||||||
android:label="@string/waypointdetails_title" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.MyTracksSettings"
|
|
||||||
android:label="@string/mytracks_settings" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.AggregatedStatsActivity"
|
|
||||||
android:label="@string/aggregated_stats" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.StatsActivity"
|
|
||||||
android:label="@string/statistics"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.SensorStateActivity"
|
|
||||||
android:label="@string/sensor_state" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.ChartActivity"
|
|
||||||
android:label="@string/elevation_label"
|
|
||||||
android:exported="false" />
|
|
||||||
|
|
||||||
<activity android:name="com.google.android.apps.mytracks.WelcomeActivity"
|
<activity android:name="com.google.android.apps.mytracks.WelcomeActivity"
|
||||||
android:label="@string/welcome"
|
android:label="@string/welcome"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
@@ -101,10 +178,23 @@ limitations under the License.
|
|||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:permission="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
|
android:permission="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
|
||||||
|
|
||||||
<receiver android:name="com.google.android.apps.mytracks.MyTracksReceiver">
|
<service android:name="com.google.android.apps.mytracks.services.ControlRecordingService"
|
||||||
|
android:exported="false" />
|
||||||
|
|
||||||
|
<receiver android:name="com.google.android.apps.mytracks.BootReceiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
|
||||||
|
<receiver android:name="com.google.android.apps.mytracks.widgets.TrackWidgetProvider">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||||
|
<action android:name="com.google.android.apps.mytracks.TRACK_STARTED" />
|
||||||
|
<action android:name="com.google.android.apps.mytracks.TRACK_STOPPED" />
|
||||||
|
</intent-filter>
|
||||||
|
<meta-data android:name="android.appwidget.provider"
|
||||||
|
android:resource="@xml/track_widget_info" />
|
||||||
</receiver>
|
</receiver>
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
@@ -114,6 +204,7 @@ limitations under the License.
|
|||||||
<!-- Permissions for recording tracks and showing maps -->
|
<!-- Permissions for recording tracks and showing maps -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
@@ -142,7 +233,7 @@ limitations under the License.
|
|||||||
android:permissionGroup="android.permission-group.LOCATION"
|
android:permissionGroup="android.permission-group.LOCATION"
|
||||||
android:label="@string/notification_permission_label"
|
android:label="@string/notification_permission_label"
|
||||||
android:description="@string/notification_permission_description"
|
android:description="@string/notification_permission_description"
|
||||||
android:protectionLevel="normal" />
|
android:protectionLevel="dangerous" />
|
||||||
<!-- Permission to read raw track data (points, etc.) -->
|
<!-- Permission to read raw track data (points, etc.) -->
|
||||||
<permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA"
|
<permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA"
|
||||||
android:permissionGroup="android.permission-group.LOCATION"
|
android:permissionGroup="android.permission-group.LOCATION"
|
||||||
@@ -156,10 +247,17 @@ limitations under the License.
|
|||||||
android:description="@string/write_tracks_permission_description"
|
android:description="@string/write_tracks_permission_description"
|
||||||
android:protectionLevel="dangerous" />
|
android:protectionLevel="dangerous" />
|
||||||
|
|
||||||
|
<!-- Permission to get MyTracks broadcasts. For internal MyTracks communication. -->
|
||||||
|
<permission android:name="com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS"
|
||||||
|
android:permissionGroup="android.permission-group.LOCATION"
|
||||||
|
android:label="@string/mytracks_notifications_permission_label"
|
||||||
|
android:description="@string/mytracks_notifications_permission_description"
|
||||||
|
android:protectionLevel="signature" />
|
||||||
|
|
||||||
<!-- We read and write raw track data, obviously. -->
|
<!-- We read and write raw track data, obviously. -->
|
||||||
<uses-permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA" />
|
<uses-permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA" />
|
||||||
<uses-permission android:name="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
|
<uses-permission android:name="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
|
||||||
<uses-permission android:name="com.google.android.apps.mytracks.TRACK_NOTIFICATIONS" />
|
<uses-permission android:name="com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS" />
|
||||||
|
|
||||||
<!-- Features required -->
|
<!-- Features required -->
|
||||||
<uses-feature android:name="android.hardware.location" android:required="true"/>
|
<uses-feature android:name="android.hardware.location" android:required="true"/>
|
||||||
|
|||||||
@@ -10,10 +10,8 @@
|
|||||||
# Indicates whether an apk should be generated for each density.
|
# Indicates whether an apk should be generated for each density.
|
||||||
split.density=false
|
split.density=false
|
||||||
# Project target.
|
# Project target.
|
||||||
target=Google Inc.:Google APIs:11
|
target=Google Inc.:Google APIs:13
|
||||||
android.library.reference.1=../MyTracksLib/
|
android.library.reference.1=../MyTracksLib/
|
||||||
|
|
||||||
# ProGuard is turned off while we investigate the removal of code that
|
# Enable proguard.
|
||||||
# isn't actually dead from Fusion Tables. See issue 303 for an example of
|
proguard.config=proguard.cfg
|
||||||
# the result of that removal.
|
|
||||||
#proguard.config=proguard.cfg
|
|
||||||
|
|||||||
@@ -3,15 +3,20 @@ own licenses, which allow their usage for the My Tracks application. Any other
|
|||||||
applications that wish to use these files should consult the appropriate
|
applications that wish to use these files should consult the appropriate
|
||||||
licenses or the JAR's authors.
|
licenses or the JAR's authors.
|
||||||
|
|
||||||
References are provided to the libraries:
|
google-api-client/
|
||||||
|
- see http://code.google.com/p/google-api-java-client/.
|
||||||
|
- contains Google API client library, google-api-client-1.5.0-beta.jar, and its
|
||||||
|
dependencies.
|
||||||
|
- google-api-client-1.5.0-beta.jar depends on protobuf-java-2.2.0.jar, however,
|
||||||
|
MyTracksLib already includes protobuf-java.2.3.0-lite.jar. Thus using the
|
||||||
|
newer version, protobuf-java.2.3.0-lite.jar.
|
||||||
|
- google-api-client-1.5.0-beta.jar also depends on xpp3-1.1.4c.jar, however,
|
||||||
|
some of its classes are already included in the android framework, thus not
|
||||||
|
including xpp3-1.1.4c.jar.
|
||||||
|
|
||||||
accounts.jar (Android accounts library):
|
google-common.jar
|
||||||
http://code.google.com/p/libs-for-android/wiki/AccountsLibrary
|
|
||||||
|
|
||||||
google-api-client-*.jar (GData client):
|
googleloginclient-helper.jar
|
||||||
http://code.google.com/p/google-api-java-client/
|
|
||||||
|
|
||||||
google-common.jar,
|
libGoogleAnalytics.jar
|
||||||
googleloginclient-helper.jar,
|
- see http://code.google.com/mobile/analytics/docs/.
|
||||||
libmymaps.jar (Google My Maps upload library):
|
|
||||||
Licensed exclusively for use in My Tracks and derived Android applications.
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,10 @@
|
|||||||
-dontwarn com.google.android.gsf.**
|
-dontwarn com.google.android.gsf.**
|
||||||
-dontwarn org.codehaus.**
|
-dontwarn org.codehaus.**
|
||||||
-dontwarn com.google.appengine.**
|
-dontwarn com.google.appengine.**
|
||||||
|
-dontwarn org.apache.avalon.framework.logger.**
|
||||||
|
-dontwarn org.apache.log.**
|
||||||
|
-dontwarn org.apache.log4j.**
|
||||||
|
-dontwarn javax.servlet.**
|
||||||
|
|
||||||
# Make our stack traces useful
|
# Make our stack traces useful
|
||||||
# Line numbers will be correct, file names will be replaced by "MT" since the
|
# Line numbers will be correct, file names will be replaced by "MT" since the
|
||||||
@@ -51,3 +55,15 @@
|
|||||||
-keep class * implements android.os.Parcelable {
|
-keep class * implements android.os.Parcelable {
|
||||||
public static final android.os.Parcelable$Creator *;
|
public static final android.os.Parcelable$Creator *;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Needed by google-api-client to keep generic types and @Key annotations accessed via reflection
|
||||||
|
|
||||||
|
-keepclassmembers class * {
|
||||||
|
@com.google.api.client.util.Key <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
|
||||||
|
|
||||||
|
# Needed by Guava
|
||||||
|
|
||||||
|
-dontwarn sun.misc.Unsafe
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -40,7 +40,9 @@ limitations under the License.
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:autoText="true"
|
android:autoText="true"
|
||||||
android:capitalize="words"
|
android:capitalize="words"
|
||||||
android:selectAllOnFocus="true"/>
|
android:selectAllOnFocus="true"
|
||||||
|
android:hint="@string/trackdetails_name_hint"
|
||||||
|
android:imeOptions="actionNext"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView android:text="@string/trackdetails_category"
|
<TextView android:text="@string/trackdetails_category"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
@@ -48,7 +50,9 @@ limitations under the License.
|
|||||||
<AutoCompleteTextView android:id="@+id/trackdetails_category"
|
<AutoCompleteTextView android:id="@+id/trackdetails_category"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"/>
|
android:singleLine="true"
|
||||||
|
android:hint="@string/trackdetails_category_hint"
|
||||||
|
android:imeOptions="actionNext"/>
|
||||||
<TextView android:text="@string/trackdetails_description"
|
<TextView android:text="@string/trackdetails_description"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
@@ -61,7 +65,9 @@ limitations under the License.
|
|||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:maxLines="50"
|
android:maxLines="50"
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/trackdetails_description_hint"
|
||||||
|
android:imeOptions="actionDone"/>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
|||||||
@@ -127,26 +127,24 @@ limitations under the License.
|
|||||||
</TableLayout>
|
</TableLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/list_bar"
|
android:background="@drawable/list_bar"
|
||||||
android:padding="3dip">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="2dip"
|
||||||
|
android:paddingRight="2dip"
|
||||||
|
android:paddingTop="4dip">
|
||||||
|
<!-- left spacer -->
|
||||||
|
<LinearLayout style="@style/DialogButtonSpacer"/>
|
||||||
<Button android:id="@+id/sendtogoogle_cancel"
|
<Button android:id="@+id/sendtogoogle_cancel"
|
||||||
android:layout_width="wrap_content"
|
android:layout_gravity="left"
|
||||||
android:layout_height="48dip"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:text="@string/cancel"
|
android:text="@string/cancel"
|
||||||
android:textSize="14dip"/>
|
style="@style/DialogButton"/>
|
||||||
<TextView
|
|
||||||
android:layout_width="0dip"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
<Button android:id="@+id/sendtogoogle_send_now"
|
<Button android:id="@+id/sendtogoogle_send_now"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="48dip"
|
|
||||||
android:layout_gravity="right"
|
android:layout_gravity="right"
|
||||||
android:text="@string/sendtogoogle_send_now"
|
android:text="@string/sendtogoogle_send_now"
|
||||||
android:textSize="14dip"/>
|
style="@style/DialogButton"/>
|
||||||
|
<!-- right spacer -->
|
||||||
|
<LinearLayout style="@style/DialogButtonSpacer"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ limitations under the License.
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:autoText="true"
|
android:autoText="true"
|
||||||
android:capitalize="words"
|
android:capitalize="words"
|
||||||
android:selectAllOnFocus="true"/>
|
android:selectAllOnFocus="true"
|
||||||
|
android:hint="@string/waypointdetails_name_hint"
|
||||||
|
android:imeOptions="actionNext"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout android:id="@+id/waypointdetails_description_layout"
|
<LinearLayout android:id="@+id/waypointdetails_description_layout"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
@@ -65,7 +67,9 @@ limitations under the License.
|
|||||||
<AutoCompleteTextView android:id="@+id/waypointdetails_category"
|
<AutoCompleteTextView android:id="@+id/waypointdetails_category"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"/>
|
android:singleLine="true"
|
||||||
|
android:hint="@string/waypointdetails_category_hint"
|
||||||
|
android:imeOptions="actionNext"/>
|
||||||
<TextView android:text="@string/waypointdetails_description"
|
<TextView android:text="@string/waypointdetails_description"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
@@ -79,7 +83,9 @@ limitations under the License.
|
|||||||
android:minLines="5"
|
android:minLines="5"
|
||||||
android:maxLines="50"
|
android:maxLines="50"
|
||||||
android:gravity="top"
|
android:gravity="top"
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"
|
||||||
|
android:hint="@string/waypointdetails_description_hint"
|
||||||
|
android:imeOptions="actionDone"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TableLayout android:id="@+id/waypoint_stats"
|
<TableLayout android:id="@+id/waypoint_stats"
|
||||||
|
|||||||
@@ -125,6 +125,27 @@ limitations under the License.
|
|||||||
android:text="@string/bpm" />
|
android:text="@string/bpm" />
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
<!-- Battery Level -->
|
||||||
|
<TableRow
|
||||||
|
android:padding="1dip">
|
||||||
|
<TextView
|
||||||
|
android:layout_column="1"
|
||||||
|
android:layout_span="3"
|
||||||
|
android:text="@string/battery_level" />
|
||||||
|
</TableRow>
|
||||||
|
<TableRow
|
||||||
|
android:background="@color/stat_label_background">
|
||||||
|
<TextView
|
||||||
|
style="@style/StatsRegister.Big"
|
||||||
|
android:id="@+id/battery_level_register"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:layout_span="4" />
|
||||||
|
<TextView
|
||||||
|
style="@style/StatsUnitSolo"
|
||||||
|
android:layout_column="5"
|
||||||
|
android:text="@string/percent" />
|
||||||
|
</TableRow>
|
||||||
|
|
||||||
</TableLayout>
|
</TableLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2011 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:paddingLeft="10px"
|
||||||
|
android:paddingRight="10px"
|
||||||
|
android:paddingTop="5px"
|
||||||
|
android:paddingBottom="5px">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:background="@drawable/appwidget_background">
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/appwidget_button"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:paddingLeft="10px"
|
||||||
|
android:paddingRight="10px"
|
||||||
|
android:src="@drawable/appwidget_button_disabled" />
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/appwidget_track_statistics"
|
||||||
|
android:layout_height="fill_parent"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="15px">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText.Register"
|
||||||
|
android:id="@+id/appwidget_distance_text" />
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText"
|
||||||
|
android:text="@string/total_distance_label" />
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/appwidget_hr" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingBottom="2px">
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText.Register"
|
||||||
|
android:id="@+id/appwidget_time_text" />
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText"
|
||||||
|
android:text="@string/moving_time_label" />
|
||||||
|
</LinearLayout>
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/appwidget_hr" />
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="fill_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText.Register"
|
||||||
|
android:id="@+id/appwidget_speed_text" />
|
||||||
|
<TextView
|
||||||
|
style="@style/WidgetText"
|
||||||
|
android:text="@string/speed" />
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
@@ -112,9 +112,9 @@ limitations under the License.
|
|||||||
<item>3.1 miles (senyal GPS pobre)</item>
|
<item>3.1 miles (senyal GPS pobre)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>Sense divisió</item>
|
<item>Inactiu</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -130,8 +130,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>No splitting</item>
|
<item>Inactiu</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
@@ -284,9 +284,4 @@ limitations under the License.
|
|||||||
<item>punt de referència</item>
|
<item>punt de referència</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="sensor_type_options">
|
|
||||||
<item>Cap</item>
|
|
||||||
<item>Zephyr Bluetooth</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -152,14 +152,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Detalls de la ruta</string>
|
<string name="trackdetails_title">Detalls de la ruta</string>
|
||||||
<string name="trackdetails_name">Nom de la ruta</string>
|
<string name="trackdetails_name">Nom de la ruta</string>
|
||||||
|
<string name="trackdetails_name_hint">Nom de la ruta</string>
|
||||||
<string name="trackdetails_description">Descripció de la ruta</string>
|
<string name="trackdetails_description">Descripció de la ruta</string>
|
||||||
|
<string name="trackdetails_description_hint">Descripció de la ruta</string>
|
||||||
<string name="trackdetails_category">Tipus d\'activitat (p.e. senderisme, bicicleta, còrrer, escalada...)</string>
|
<string name="trackdetails_category">Tipus d\'activitat (p.e. senderisme, bicicleta, còrrer, escalada...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Tipus d\'activitat</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Detalls del marcador</string>
|
<string name="waypointdetails_title">Detalls del marcador</string>
|
||||||
<string name="waypointdetails_name">Nom del marcador</string>
|
<string name="waypointdetails_name">Nom del marcador</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nom del marcador</string>
|
||||||
<string name="waypointdetails_description">Descripció del marcador</string>
|
<string name="waypointdetails_description">Descripció del marcador</string>
|
||||||
|
<string name="waypointdetails_description_hint">Descripció del marcador</string>
|
||||||
<string name="waypointdetails_category">Tipus de marcador (e.g. edifici, sot, vista...)</string>
|
<string name="waypointdetails_category">Tipus de marcador (e.g. edifici, sot, vista...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Tipus de marcador</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Paràmetres de My Tracks</string>
|
<string name="mytracks_settings">Paràmetres de My Tracks</string>
|
||||||
@@ -409,4 +415,6 @@ limitations under the License.
|
|||||||
<string name="searching">S\'està cercant</string>
|
<string name="searching">S\'està cercant</string>
|
||||||
<string name="sending">S\'està enviant</string>
|
<string name="sending">S\'està enviant</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">Cap</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ limitations under the License.
|
|||||||
<item>328 Fuß</item>
|
<item>328 Fuß</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Maximum recording distance -->
|
<!-- Maximum recording distance -->
|
||||||
<string-array name="max_recording_distance_options">
|
<string-array name="max_recording_distance_options">
|
||||||
<item>50 m</item>
|
<item>50 m</item>
|
||||||
@@ -113,9 +112,9 @@ limitations under the License.
|
|||||||
<item>3,1 Meilen (sehr schlechtes GPS-Signal)</item>
|
<item>3,1 Meilen (sehr schlechtes GPS-Signal)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>Nicht zerteilen</item>
|
<item>Aus</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -132,7 +131,7 @@ limitations under the License.
|
|||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="split_frequency_options_ft">
|
||||||
<item>Nicht zerteilen</item>
|
<item>Aus</item>
|
||||||
<item>100 Meilen</item>
|
<item>100 Meilen</item>
|
||||||
<item>50 Meilen</item>
|
<item>50 Meilen</item>
|
||||||
<item>25 Meilen</item>
|
<item>25 Meilen</item>
|
||||||
|
|||||||
@@ -154,14 +154,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Trackdetails</string>
|
<string name="trackdetails_title">Trackdetails</string>
|
||||||
<string name="trackdetails_name">Name</string>
|
<string name="trackdetails_name">Name</string>
|
||||||
|
<string name="trackdetails_name_hint">Name</string>
|
||||||
<string name="trackdetails_description">Beschreibung</string>
|
<string name="trackdetails_description">Beschreibung</string>
|
||||||
|
<string name="trackdetails_description_hint">Beschreibung</string>
|
||||||
<string name="trackdetails_category">Aktivität (z. B. Wandern, Fahrradfahren, Laufen, Klettern…)</string>
|
<string name="trackdetails_category">Aktivität (z. B. Wandern, Fahrradfahren, Laufen, Klettern…)</string>
|
||||||
|
<string name="trackdetails_category_hint">Aktivität</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Wegpunktdetails</string>
|
<string name="waypointdetails_title">Wegpunktdetails</string>
|
||||||
<string name="waypointdetails_name">Wegpunktname</string>
|
<string name="waypointdetails_name">Wegpunktname</string>
|
||||||
|
<string name="waypointdetails_name_hint">Wegpunktname</string>
|
||||||
<string name="waypointdetails_description">Wegpunktbeschreibung</string>
|
<string name="waypointdetails_description">Wegpunktbeschreibung</string>
|
||||||
|
<string name="waypointdetails_description_hint">Wegpunktbeschreibung</string>
|
||||||
<string name="waypointdetails_category">Art des Wegpunktes (z. B. Gebäude, Schlagloch, Sehenswürdigkeit…)</string>
|
<string name="waypointdetails_category">Art des Wegpunktes (z. B. Gebäude, Schlagloch, Sehenswürdigkeit…)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Art des Wegpunktes</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Einstellungen für My Tracks</string>
|
<string name="mytracks_settings">Einstellungen für My Tracks</string>
|
||||||
@@ -333,6 +339,7 @@ limitations under the License.
|
|||||||
|
|
||||||
<!--string name="revolutions_per_minute">rpm</string-->
|
<!--string name="revolutions_per_minute">rpm</string-->
|
||||||
<!--string name="bpm">bpm</string-->
|
<!--string name="bpm">bpm</string-->
|
||||||
|
<string name="battery_level">Akkukapazität</string>
|
||||||
|
|
||||||
<!-- Stats Labels -->
|
<!-- Stats Labels -->
|
||||||
<string name="moving_time_label">Zeit in Bewegung</string>
|
<string name="moving_time_label">Zeit in Bewegung</string>
|
||||||
|
|||||||
@@ -143,11 +143,4 @@ limitations under the License.
|
|||||||
<item>camino</item>
|
<item>camino</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="sensor_type_options">
|
|
||||||
<item>Ninguna</item>
|
|
||||||
<item>ANT+ Sensores</item>
|
|
||||||
<item>SRM ANT+ Puente</item>
|
|
||||||
<item>Zephyr Bluetooth</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -128,4 +128,8 @@ limitations under the License.
|
|||||||
$6 : Speed units (mph) : Pace units (per mile)
|
$6 : Speed units (mph) : Pace units (per mile)
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">Ninguna</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ Sensores</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ Puente</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Apagado</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -112,9 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 miles (señal GPS débil)</item>
|
<item>3.1 miles (señal GPS débil)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>No dividir</item>
|
<item>Apagado</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -130,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>No dividir</item>
|
<item>Apagado</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
|
|||||||
@@ -25,37 +25,37 @@ limitations under the License.
|
|||||||
<string name="delete_all_tracks">Borrar todos los recorridos</string>
|
<string name="delete_all_tracks">Borrar todos los recorridos</string>
|
||||||
<string name="settings">Configuraciones</string>
|
<string name="settings">Configuraciones</string>
|
||||||
<string name="elevation">Elevación</string>
|
<string name="elevation">Elevación</string>
|
||||||
<string name="choose_track_message">Por favor seleccione el recorrido que desea ver</string>
|
<string name="choose_track_message">Por favor, seleccione el recorrido que desea ver</string>
|
||||||
<string name="current_track">Recorrido actual</string>
|
<string name="current_track">Recorrido actual</string>
|
||||||
<string name="current_segment">Último segmento</string>
|
<string name="current_segment">Último segmento</string>
|
||||||
|
|
||||||
<!-- Error messages -->
|
<!-- Error messages -->
|
||||||
<string name="error_no_location_manager">Ningún administrador de ubicación fue hallado en este aparato! </string>
|
<string name="error_no_location_manager">Ningún administrador de ubicación fue hallado en este dispositivo! </string>
|
||||||
<string name="error_no_gps_location_provider">Ningún proveedor GPS de ubicación fue hallado en este aparato.</string>
|
<string name="error_no_gps_location_provider">Ningún proveedor de ubicación GPS fue hallado en este dispositivo.</string>
|
||||||
<string name="error_sending_to_fusiontables">Hubo un error al mandar su recorrido a Google Fusion Tables. Por favor inténtelo de nuevo más tarde.</string>
|
<string name="error_sending_to_fusiontables">Se produjo un error al enviar su recorrido a Google Fusion Tables.</string>
|
||||||
<string name="error_sending_to_docs">Hubo un error al mandar su recorrido a Google Docs. Por favor inténtelo de nuevo más tarde.</string>
|
<string name="error_sending_to_docs">Se produjo un error al enviar su recorrido a Google Docs.</string>
|
||||||
<string name="error_unable_to_start_recording">No pude empezar a grabar. Por favor inténtelo de nuevo. </string>
|
<string name="error_unable_to_start_recording">No se puede iniciar la grabación. Inténtelo de nuevo. </string>
|
||||||
<string name="error_unable_to_stop_recording">No pude dejar de grabar. Por favor inténtelo de nuevo.</string>
|
<string name="error_unable_to_stop_recording">No se puede detener la grabación. Inténtelo de nuevo.</string>
|
||||||
<string name="error_unable_to_read_file">No pude leer del archivo.</string>
|
<string name="error_unable_to_read_file">No pude leer del archivo.</string>
|
||||||
<string name="error_invalid_gpx_format">El archivo no tiene un format GPX válido.</string>
|
<string name="error_invalid_gpx_format">El archivo no tiene un format GPX válido.</string>
|
||||||
<string name="error_generic">Error. Por favor inténtelo de nuevo.</string>
|
<string name="error_generic">A ocurrido un error. Por favor, inténtelo de nuevo.</string>
|
||||||
<string name="error_track_does_not_exist">El recorrido no existe.</string>
|
<string name="error_track_does_not_exist">El recorrido no existe.</string>
|
||||||
<string name="error_out_of_memory">El archivo es demasiado grande (tiene que ser menor a 500 KB). Abortando.</string>
|
<string name="error_out_of_memory">El archivo es demasiado grande (tiene que ser menor a 500 KB). Abortando.</string>
|
||||||
<string name="error_unable_to_insert_marker">No pude insertar la señal. La ubicación no esta disponible.</string>
|
<string name="error_unable_to_insert_marker">No se puede insertar el marcador. La ubicación no está disponible.</string>
|
||||||
|
|
||||||
<!-- Status messages -->
|
<!-- Status messages -->
|
||||||
<string name="wait_for_fix">Esperando una ubicación mas exacta del GPS. Asegúrese que el cielo sea visible.</string>
|
<string name="wait_for_fix">Esperando una ubicación mas exacta del GPS. Asegúrese que el cielo sea visible.</string>
|
||||||
<string name="status_now_recording">Grabando un nuevo recorrido.</string>
|
<string name="status_now_recording">Grabando un nuevo recorrido.</string>
|
||||||
<string name="status_stopped_recording">Grabacíon interrumpida.</string>
|
<string name="status_stopped_recording">Grabación interrumpida.</string>
|
||||||
<string name="status_new_fusiontable_has_been_created">Un mapa Google Fusion Tables nuevo has sido creado en google.com/fusiontables.</string>
|
<string name="status_new_fusiontable_has_been_created">Una nueva tabla de Google Fusion ha sido creada en google.com/fusiontables.</string>
|
||||||
<string name="status_tracks_have_been_uploaded">Su recorrido ha sido enviado a maps.google.com.</string>
|
<string name="status_tracks_have_been_uploaded">Su recorrido ha sido enviado a maps.google.com.</string>
|
||||||
<string name="status_tracks_have_been_uploaded_to_new_doc">Su recorrido ha sido enviado a una nueva hoja de cálculo en docs.google.com.</string>
|
<string name="status_tracks_have_been_uploaded_to_new_doc">Su recorrido ha sido enviado a una nueva hoja de cálculo de docs.google.com.</string>
|
||||||
<string name="status_tracks_have_been_uploaded_to_docs">Su recorrido ha sido enviado a docs.google.com.</string>
|
<string name="status_tracks_have_been_uploaded_to_docs">Su recorrido ha sido enviado a docs.google.com.</string>
|
||||||
<string name="status_enable_gps">Por favor presione aquí para ir al menú de Seguridad y Ubicación y asegúrese que el GPS esté habilitado. Presione el botón de regreso para regresar.</string>
|
<string name="status_enable_gps">Por favor, presione aquí para ir al menú de Seguridad y Ubicación, y asegúrese que el GPS esté habilitado. Presione el botón "atrás" para regresar.</string>
|
||||||
<string name="status_approximate_location">Nota: Una ubicación aproximada es mostrada, basada en informacion de torres de telefonía celular y red WIFI.</string>
|
<string name="status_approximate_location">Nota: Una ubicación aproximada es determinada a partir de torres de telefonía celular y redes WIFI.</string>
|
||||||
<string name="status_no_location">La ubicación actual no puede ser determinada. Habilite más fuentes de datos (vea configuraciones de Seguridad y Ubicación) y asegúrese que el cielo sea visible. Inténtelo mas tarde.</string>
|
<string name="status_no_location">No puede ser determinada la ubicación actual. Habilite más fuentes de datos (vea las configuraciones de Seguridad y Ubicación) y asegúrese que el cielo sea visible. Inténtelo mas tarde.</string>
|
||||||
<string name="status_waypoint_inserted">Una señal de recorrido fue insertada.</string>
|
<string name="status_waypoint_inserted">Un marcador de recorrido fue insertado.</string>
|
||||||
<string name="status_statistics_inserted">Una señal con estadísticas fue insertada.</string>
|
<string name="status_statistics_inserted">Un marcador de estadísticas fue insertado.</string>
|
||||||
|
|
||||||
<!-- Progress dialog -->
|
<!-- Progress dialog -->
|
||||||
<string name="progress_title">Por favor espere...</string>
|
<string name="progress_title">Por favor espere...</string>
|
||||||
@@ -138,14 +138,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Detalles del recorrido</string>
|
<string name="trackdetails_title">Detalles del recorrido</string>
|
||||||
<string name="trackdetails_name">Nombre del recorrido</string>
|
<string name="trackdetails_name">Nombre del recorrido</string>
|
||||||
|
<string name="trackdetails_name_hint">Nombre del recorrido</string>
|
||||||
<string name="trackdetails_description">Descripción del recorrido</string>
|
<string name="trackdetails_description">Descripción del recorrido</string>
|
||||||
|
<string name="trackdetails_description_hint">Descripción del recorrido</string>
|
||||||
<string name="trackdetails_category">Tipo de actividad (por ejemplo, ciclismo, alpinismo...)</string>
|
<string name="trackdetails_category">Tipo de actividad (por ejemplo, ciclismo, alpinismo...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Tipo de actividad</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Detalles de señal</string>
|
<string name="waypointdetails_title">Detalles de señal</string>
|
||||||
<string name="waypointdetails_name">Nombre de señal</string>
|
<string name="waypointdetails_name">Nombre de señal</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nombre de señal</string>
|
||||||
<string name="waypointdetails_description">Descripción de señal</string>
|
<string name="waypointdetails_description">Descripción de señal</string>
|
||||||
|
<string name="waypointdetails_description_hint">Descripción de señal</string>
|
||||||
<string name="waypointdetails_category">Tipo de señal (por ejemplo, edificio, bache, atracción...)</string>
|
<string name="waypointdetails_category">Tipo de señal (por ejemplo, edificio, bache, atracción...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Tipo de señal</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Configuraciones de My Tracks</string>
|
<string name="mytracks_settings">Configuraciones de My Tracks</string>
|
||||||
|
|||||||
@@ -0,0 +1,271 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2010 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Minimum recording distance -->
|
||||||
|
<string-array name="min_recording_distance_options">
|
||||||
|
<item>1 m</item>
|
||||||
|
<item>2 m</item>
|
||||||
|
<item>3 m</item>
|
||||||
|
<item>4 m</item>
|
||||||
|
<item>5 m (suositeltu)</item>
|
||||||
|
<item>10 m</item>
|
||||||
|
<item>100 m</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_recording_distance_options_ft">
|
||||||
|
<item>3 ft</item>
|
||||||
|
<item>6 ft</item>
|
||||||
|
<item>10 ft</item>
|
||||||
|
<item>13 ft</item>
|
||||||
|
<item>16 ft (suositeltu)</item>
|
||||||
|
<item>33 ft</item>
|
||||||
|
<item>328 ft</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Maximum recording distance -->
|
||||||
|
<string-array name="max_recording_distance_options">
|
||||||
|
<item>50 m</item>
|
||||||
|
<item>100 m</item>
|
||||||
|
<item>200 m (suositeltu)</item>
|
||||||
|
<item>500 m</item>
|
||||||
|
<item>1000 m</item>
|
||||||
|
<item>5000 m</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="max_recording_distance_options_ft">
|
||||||
|
<item>164 ft</item>
|
||||||
|
<item>328 ft</item>
|
||||||
|
<item>656 ft (suositeltu)</item>
|
||||||
|
<item>1640 ft</item>
|
||||||
|
<item>0.6 mailia</item>
|
||||||
|
<item>3.1 mailia</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Minimum recording interval -->
|
||||||
|
<string-array name="min_recording_interval_options">
|
||||||
|
<item>virransäästö (mukautuva)</item>
|
||||||
|
<item>paras tarkkuus (mukautuva)</item>
|
||||||
|
<item>nopein (suositeltu)</item>
|
||||||
|
<item>2 s</item>
|
||||||
|
<item>3 s</item>
|
||||||
|
<item>4 s</item>
|
||||||
|
<item>5 s</item>
|
||||||
|
<item>10 s</item>
|
||||||
|
<item>20 s</item>
|
||||||
|
<item>30 s</item>
|
||||||
|
<item>1 min</item>
|
||||||
|
<item>2 min</item>
|
||||||
|
<item>5 min</item>
|
||||||
|
<item>10 min</item>
|
||||||
|
<item>15 min</item>
|
||||||
|
<item>30 min</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Minimum required accuracy -->
|
||||||
|
<string-array name="min_required_accuracy_options">
|
||||||
|
<item>10 m (erinomainen GPS-signaali)</item>
|
||||||
|
<item>20 m</item>
|
||||||
|
<item>50 m</item>
|
||||||
|
<item>100 m</item>
|
||||||
|
<item>200 m (suositeltu)</item>
|
||||||
|
<item>500 m</item>
|
||||||
|
<item>1000 m</item>
|
||||||
|
<item>2000 m</item>
|
||||||
|
<item>5000 m (heikko GPS-signaali)</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_required_accuracy_options_ft">
|
||||||
|
<item>33 ft (erinomainen GPS-signaali)</item>
|
||||||
|
<item>66 ft</item>
|
||||||
|
<item>165 ft</item>
|
||||||
|
<item>328 ft</item>
|
||||||
|
<item>656 ft (suositeltu)</item>
|
||||||
|
<item>1640 ft</item>
|
||||||
|
<item>0.6 mailia</item>
|
||||||
|
<item>1.2 mailia</item>
|
||||||
|
<item>3.1 mailia (heikko GPS-signaali)</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Task frequency -->
|
||||||
|
<string-array name="task_frequency_options">
|
||||||
|
<item>Pois päältä</item>
|
||||||
|
<item>100 km</item>
|
||||||
|
<item>50 km</item>
|
||||||
|
<item>25 km</item>
|
||||||
|
<item>10 km</item>
|
||||||
|
<item>5 km</item>
|
||||||
|
<item>1 km</item>
|
||||||
|
<item>60 min</item>
|
||||||
|
<item>30 min</item>
|
||||||
|
<item>15 min</item>
|
||||||
|
<item>10 min</item>
|
||||||
|
<item>5 min</item>
|
||||||
|
<item>2 min</item>
|
||||||
|
<item>1 min</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="task_frequency_options_ft">
|
||||||
|
<item>Pois päältä</item>
|
||||||
|
<item>100 mi</item>
|
||||||
|
<item>50 mi</item>
|
||||||
|
<item>25 mi</item>
|
||||||
|
<item>10 mi</item>
|
||||||
|
<item>5 mi</item>
|
||||||
|
<item>1 mi</item>
|
||||||
|
<item>60 min</item>
|
||||||
|
<item>30 min</item>
|
||||||
|
<item>15 min</item>
|
||||||
|
<item>10 min</item>
|
||||||
|
<item>5 min</item>
|
||||||
|
<item>2 min</item>
|
||||||
|
<item>1 min</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Auto-resume track timeout -->
|
||||||
|
<string-array name="auto_resume_track_timeout_options">
|
||||||
|
<item>Ei koskaan</item>
|
||||||
|
<item>5 min</item>
|
||||||
|
<item>10 min</item>
|
||||||
|
<item>15 min</item>
|
||||||
|
<item>Aina</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Other non-preference arrays -->
|
||||||
|
<array name="activity_types">
|
||||||
|
<item>tuntematon</item>
|
||||||
|
<item>sekoitus</item>
|
||||||
|
<item>muu</item>
|
||||||
|
|
||||||
|
<item>juoksu</item>
|
||||||
|
<item>katujuoksu</item>
|
||||||
|
<item>ratajuoksu</item>
|
||||||
|
<item>maastojuoksu</item>
|
||||||
|
<item>kävely</item>
|
||||||
|
<item>hölkkä</item>
|
||||||
|
<item>patikointi</item>
|
||||||
|
<item>patikointi metsässä</item>
|
||||||
|
<item>suokävely</item>
|
||||||
|
<item>kiipeily</item>
|
||||||
|
|
||||||
|
<item>pyöräily</item>
|
||||||
|
<item>maantiepyöräily</item>
|
||||||
|
<item>maastopyöräily</item>
|
||||||
|
<item>ratapyöräily</item>
|
||||||
|
|
||||||
|
<item>luistelu</item>
|
||||||
|
<item>rullaluistelu</item>
|
||||||
|
<item>rullalautailu</item>
|
||||||
|
|
||||||
|
<item>rullahiihto (classic)</item>
|
||||||
|
<item>rullahiihto (skate)</item>
|
||||||
|
<item>maastohiihto (classic)</item>
|
||||||
|
<item>maastohiihto (skate)</item>
|
||||||
|
|
||||||
|
<item>lumikävely</item>
|
||||||
|
<item>hiihto</item>
|
||||||
|
<item>lumilautailu</item>
|
||||||
|
<item>kelkkailu</item>
|
||||||
|
<item>jääpurjehdus</item>
|
||||||
|
|
||||||
|
<item>purjehdus</item>
|
||||||
|
<item>melonta</item>
|
||||||
|
<item>soutu</item>
|
||||||
|
<item>moottoriveneily</item>
|
||||||
|
<item>lautta</item>
|
||||||
|
<item>RC-veneily</item>
|
||||||
|
<item>surffaus</item>
|
||||||
|
<item>purjelautailu</item>
|
||||||
|
<item>vesihiito</item>
|
||||||
|
<item>wake boarding</item>
|
||||||
|
|
||||||
|
<item>lentokone</item>
|
||||||
|
<item>katamaraani</item>
|
||||||
|
<item>liikennelentokone</item>
|
||||||
|
<item>helikopteri</item>
|
||||||
|
<item>kuumailmapallo</item>
|
||||||
|
<item>ilmalaiva</item>
|
||||||
|
<item>RC-lennokki</item>
|
||||||
|
<item>RC-helikopteri</item>
|
||||||
|
<item>laskuvarjohyppy</item>
|
||||||
|
<item>liitovarjo</item>
|
||||||
|
|
||||||
|
<item>ratsastus</item>
|
||||||
|
|
||||||
|
<item>autolla ajo</item>
|
||||||
|
<item>bussimatka</item>
|
||||||
|
<item>juna</item>
|
||||||
|
<item>moottoripyörä</item>
|
||||||
|
<item>maastopyörä</item>
|
||||||
|
<item>ATV</item>
|
||||||
|
|
||||||
|
<item>maapurjehdus</item>
|
||||||
|
<item>frisbee</item>
|
||||||
|
<item>ultimate frisbee</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<array name="waypoint_types">
|
||||||
|
<item>baari</item>
|
||||||
|
<item>bussipysäkki</item>
|
||||||
|
<item>cafe</item>
|
||||||
|
<item>golfrata</item>
|
||||||
|
<item>grilli</item>
|
||||||
|
<item>hotelli</item>
|
||||||
|
<item>huoltoasema</item>
|
||||||
|
<item>information</item>
|
||||||
|
<item>juomavesi</item>
|
||||||
|
<item>kahvila</item>
|
||||||
|
<item>kalastus</item>
|
||||||
|
<item>kampaamo</item>
|
||||||
|
<item>kauppa</item>
|
||||||
|
<item>kirkko</item>
|
||||||
|
<item>kohtaamispaikka</item>
|
||||||
|
<item>kuoppa</item>
|
||||||
|
<item>lautta</item>
|
||||||
|
<item>marketti</item>
|
||||||
|
<item>nuotio</item>
|
||||||
|
<item>nähtävyys</item>
|
||||||
|
<item>putoavia kiviä</item>
|
||||||
|
<item>paloasema</item>
|
||||||
|
<item>postilaatikko</item>
|
||||||
|
<item>ooppera</item>
|
||||||
|
<item>ostokset</item>
|
||||||
|
<item>pankkiautomaatti</item>
|
||||||
|
<item>pankki</item>
|
||||||
|
<item>poliisiasema</item>
|
||||||
|
<item>pysäköinti</item>
|
||||||
|
<item>posti</item>
|
||||||
|
<item>puhelin</item>
|
||||||
|
<item>puu</item>
|
||||||
|
<item>rakennus</item>
|
||||||
|
<item>ravintola</item>
|
||||||
|
<item>reittipiste</item>
|
||||||
|
<item>retkeilyreitti</item>
|
||||||
|
<item>risteys</item>
|
||||||
|
<item>ruokakauppa</item>
|
||||||
|
<item>satama</item>
|
||||||
|
<item>talo</item>
|
||||||
|
<item>tasoristeys</item>
|
||||||
|
<item>teatteri</item>
|
||||||
|
<item>tulentekopaikka</item>
|
||||||
|
<item>tunneli</item>
|
||||||
|
<item>turisti-info</item>
|
||||||
|
<item>uima-allas</item>
|
||||||
|
<item>vesiputous</item>
|
||||||
|
<item>WC</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,516 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2010 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Used by the Menu -->
|
||||||
|
<string name="start_recording">Aloita reitti</string>
|
||||||
|
<string name="stop_recording">Lopeta</string>
|
||||||
|
<string name="switch_to_sat">Satelliitti</string>
|
||||||
|
<string name="switch_to_map">Kartta</string>
|
||||||
|
<string name="mylocation">Oma sijainti</string>
|
||||||
|
<string name="list_tracks">Reitit</string>
|
||||||
|
<string name="list_markers">Merkinnät</string>
|
||||||
|
<string name="delete_all_tracks">Poista kaikki reitit</string>
|
||||||
|
<string name="settings">Asetukset</string>
|
||||||
|
<string name="elevation">Korkeus</string>
|
||||||
|
<string name="choose_track_message">Valitse näytettävä reitti</string>
|
||||||
|
<string name="current_track">Valittu reitti</string>
|
||||||
|
<string name="current_segment">Nykyinen segmentti</string>
|
||||||
|
<string name="sensor_state">Sensorien tila</string>
|
||||||
|
<string name="aggregated_stats">Yhteenlasketut tilastot</string>
|
||||||
|
|
||||||
|
<!-- Error messages -->
|
||||||
|
<string name="error_no_location_manager">Paikkatietoja ei löytynyt!</string>
|
||||||
|
<string name="error_no_gps_location_provider">GPS-palvelua ei löytynyt.</string>
|
||||||
|
<string name="error_sending_to_mymap">Virhe lähetettäessä reittiä Google My Maps-palveluun.</string>
|
||||||
|
<string name="error_sending_to_fusiontables">Virhe lähetettäessä reittiä Google Fusion Tables-palveluun.</string>
|
||||||
|
<string name="error_sending_to_docs">Virhe lähetettäessä reittiä Google Docs-palveluun..</string>
|
||||||
|
<string name="error_please_try_again_later">Yritä myöhemmin uudelleen.</string>
|
||||||
|
<string name="error_unable_to_start_recording">Tallennusta ei voitu aloittaa. Yritä uudelleen.</string>
|
||||||
|
<string name="error_unable_to_stop_recording">Tallennusta ei voitu pysäyttää. Yritä uudelleen.</string>
|
||||||
|
<string name="error_unable_to_read_file">Tiedostovirhe.</string>
|
||||||
|
<string name="error_invalid_gpx_format">Virheellinen GPX-formaatti.</string>
|
||||||
|
<string name="error_generic">Tapahtui virhe. Yritä uudelleen.</string>
|
||||||
|
<string name="error_track_does_not_exist">Reittiä ei ole olemassa.</string>
|
||||||
|
<string name="error_operation_cancelled">Tapahtuma keskeytettiin.</string>
|
||||||
|
<string name="error_out_of_memory">Liian suuri tiedosto (maksimi 500 KB). Keskeytetään.</string>
|
||||||
|
<string name="error_unable_to_insert_marker">Merkintää ei voitu lisätä. Paikkatietoa ei saatavilla.</string>
|
||||||
|
|
||||||
|
<!-- Status messages -->
|
||||||
|
<string name="wait_for_fix">Odotetaan parempaa GPS-yhteyttä. Varmista että taivas on näkyvissä.</string>
|
||||||
|
<string name="status_now_recording">Tallennetaan uutta reittiä.</string>
|
||||||
|
<string name="status_stopped_recording">Reitin tallentaminen lopetettiin.</string>
|
||||||
|
<string name="status_new_mymap_has_been_created">Uusi Google My Map on luotu osoitteeseen maps.google.com.</string>
|
||||||
|
<string name="status_new_fusiontable_has_been_created">Uusi Google Fusion taulukko on luotu osoitteeseen google.com/fusiontables.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded">Reittisi on lähetetty osoitteeseen maps.google.com.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded_to_new_doc">Reittisi on luotu taulukoksi osoitteeseen docs.google.com.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded_to_docs">Reittisi on lähetetty osoitteeseen docs.google.com.</string>
|
||||||
|
<string name="status_mymap_info">Reitin näkyminen saattaa kestää muutaman minuutin.</string>
|
||||||
|
<string name="status_enable_gps">Avaa tästä Sijainti ja suojaus -asetukset ja valitse \'Käytä GPS-satelliitteja\'. Palaa ohjelmaan painamalla Takaisin-näppäintä.</string>
|
||||||
|
<string name="status_approximate_location">Huomio: Näkyvä sijainti perustuu kännykkämastoista ja WLAN-verkoista arvioituun paikkatietoon.</string>
|
||||||
|
<string name="status_no_location">Paikkatietoa ei löydy. Aktivoi lisää paikannusmenetelmiä (katso Asetukset) ja varmista että taivas on näkyvissä. Yritä myöhemmin uudelleen.</string>
|
||||||
|
<string name="status_waypoint_inserted">Reittimerkintä lisätty.</string>
|
||||||
|
<string name="status_statistics_inserted">Tilastomerkintä lisätty.</string>
|
||||||
|
<string name="status_track_upload_status">Lähetyksen tila:</string>
|
||||||
|
|
||||||
|
<!-- Progress dialog -->
|
||||||
|
<string name="progress_title">Odota...</string>
|
||||||
|
<string name="progress_message">Lähetetään reittiä Google:n palvelimelle.</string>
|
||||||
|
<string name="progress_message_reading_track">Luetaan reittiä...</string>
|
||||||
|
<string name="progress_message_preparing_track">Valmistellaan reittiä...</string>
|
||||||
|
<string name="progress_message_authenticating_fusiontables">Todennetaan Google Fusion Tables -tiliä...</string>
|
||||||
|
<string name="progress_message_authenticating_mymaps">Todennetaan Google Maps -tiliä...</string>
|
||||||
|
<string name="progress_message_authenticating_docs">Todennetaan Google Docs -tiliä...</string>
|
||||||
|
<string name="progress_message_sending_docs">Lähetetään reittiä Google Docsiin...</string>
|
||||||
|
<string name="progress_message_sending_mymaps">Lähetetään reittiä Google Mapsiin...</string>
|
||||||
|
<string name="progress_message_creating_map">Luodaan uutta My Mapsia...</string>
|
||||||
|
<string name="progress_message_sending_fusiontables">Lähetetään reittiä Fusion Tablesiin...</string>
|
||||||
|
<string name="progress_message_creating_fusiontable">Luodaan uutta Fusion tablea...</string>
|
||||||
|
<string name="import_progress_message">Tuodaan uutta GPS-reittiä. Odota.</string>
|
||||||
|
<string name="write_progress_message">Kirjoitetaan tiedostoa SD-kortille. Odota.</string>
|
||||||
|
<string name="progress_message_updating_track">Päivitetään reitin tilastoja...</string>
|
||||||
|
|
||||||
|
<!-- Used by DeleteAllDataHandler -->
|
||||||
|
<string name="are_you_sure_question">Oletko varma?</string>
|
||||||
|
<string name="all_data_will_be_permanently_deleted">Kaikki reitit ja merkinnät poistetaan puhelimesta.</string>
|
||||||
|
<string name="track_will_be_permanently_deleted">Reitti ja se merkinnät poistetaan pysyvästi puhelimesta.</string>
|
||||||
|
<string name="marker_will_be_permanently_deleted">Merkintä poistetaan puhelimesta.</string>
|
||||||
|
|
||||||
|
<!-- Text and links when uploading to Google Fusion Tables -->
|
||||||
|
<string name="new_map_description">Created by My Tracks on Android.</string>
|
||||||
|
<string name="fusiontable_link">Created by <a href=\'http://mytracks.appspot.com\'>My Tracks</a> on Android.</string>
|
||||||
|
|
||||||
|
<!-- Text and links when uploading to Google My Maps -->
|
||||||
|
<string name="my_map_link">Created by <a href=\'http://mytracks.appspot.com\'>My Tracks</a> on Android.</string>
|
||||||
|
<string name="new_map_title">Uusi kartta</string>
|
||||||
|
|
||||||
|
<!-- Formatting of track and marker descriptions -->
|
||||||
|
<string name="points">Pisteet</string>
|
||||||
|
<string name="recorded_date">Tallennettu</string>
|
||||||
|
<string name="category">Liikunnan muoto</string>
|
||||||
|
<string name="waypoint_category">Merkinnän tyyppi</string>
|
||||||
|
<string name="part">(Osa %d)</string>
|
||||||
|
|
||||||
|
<!-- Used by the track recording service -->
|
||||||
|
<string name="recording_your_track">Tallennetaan reittiä...</string>
|
||||||
|
<string name="new_track">Reitti %d</string>
|
||||||
|
|
||||||
|
<!-- Common -->
|
||||||
|
<string name="no">Ei</string>
|
||||||
|
<string name="yes">Kyllä</string>
|
||||||
|
<string name="ok">OK</string>
|
||||||
|
<string name="error">Virhe</string>
|
||||||
|
<string name="success">Valmis</string>
|
||||||
|
<string name="waypoint">Reittipiste</string>
|
||||||
|
<string name="license">Lisenssi</string>
|
||||||
|
<string name="cancel">Peruuta</string>
|
||||||
|
<string name="close">Sulje</string>
|
||||||
|
<string name="edit">Muokkaa</string>
|
||||||
|
<string name="save">Tallenna</string>
|
||||||
|
|
||||||
|
<!-- Placemark labels for start and end of track -->
|
||||||
|
<string name="start">(Lähtö)</string>
|
||||||
|
<string name="end">(Maali)</string>
|
||||||
|
|
||||||
|
<!-- TrackList -->
|
||||||
|
<string name="tracklist_show_track">Näytä</string>
|
||||||
|
<string name="tracklist_send_to_mymaps">Lähetä Google My Mapsiin</string>
|
||||||
|
<string name="tracklist_send_to_new_mymap">Lähetä New Google My Mapiin</string>
|
||||||
|
<string name="tracklist_send_to_fusiontables">Lähetä Google Fusion Tablesiin</string>
|
||||||
|
<string name="tracklist_send_to_new_fusiontable">Lähetä New Google Fusion Tablesiin</string>
|
||||||
|
<string name="tracklist_send_to_docs">Lähetä Google Docsiin</string>
|
||||||
|
<string name="tracklist_send_to_google">Lähetä Googleen...</string>
|
||||||
|
<string name="tracklist_delete_track">Poista puhelimesta...</string>
|
||||||
|
<string name="tracklist_edit_track">Muokkaa tietoja...</string>
|
||||||
|
<string name="tracklist_write_to_sd">Kirjoita SD-kortille...</string>
|
||||||
|
<string name="tracklist_save_as_gpx">Tallenna GPX-tiedosto</string>
|
||||||
|
<string name="tracklist_save_as_kml">Tallenna KML-tiedosto</string>
|
||||||
|
<string name="tracklist_save_as_csv">Tallenna CSV-tiedosto</string>
|
||||||
|
<string name="tracklist_save_as_tcx">Tallenna TCX-tiedosto</string>
|
||||||
|
<string name="tracklist_btn_send_all_to_fusiontables">Lähetä Google Fusion Tablesiin</string>
|
||||||
|
<string name="tracklist_btn_send_all_to_mymaps">Lähetä Google My Mapsiin</string>
|
||||||
|
<string name="tracklist_btn_delete_all">Poista kaikki</string>
|
||||||
|
<!-- Export All -->
|
||||||
|
<string name="tracklist_btn_export_all">Vie kaikki</string>
|
||||||
|
<string name="export_done">Vienti tehty</string>
|
||||||
|
<string name="tracklist_pick_one">Valitse reitti. Pitkällä painalluksella lisää vaihtoehtoja.</string>
|
||||||
|
<string name="tracklist_all_tracks">Kaikki reitit:</string>
|
||||||
|
<string name="tracklist_this_track">Tämä reitti</string>
|
||||||
|
<string name="tracklist_share_track">Jaa...</string>
|
||||||
|
<string name="tracklist_share_link">Linkki karttaan</string>
|
||||||
|
<string name="tracklist_share_gpx_file">GPX-tiedosto</string>
|
||||||
|
<string name="tracklist_share_kml_file">KML-tiedosto</string>
|
||||||
|
<string name="tracklist_share_csv_file">CSV-tiedosto</string>
|
||||||
|
<string name="tracklist_share_tcx_file">TCX-tiedosto</string>
|
||||||
|
<string name="tracklist_clear_map">Tyhjennä kartta</string>
|
||||||
|
<!-- Import All -->
|
||||||
|
<string name="tracklist_btn_import_all">Tuo kaikki</string>
|
||||||
|
<!-- Format:
|
||||||
|
$1 : Successful imports
|
||||||
|
$2 : Attempted imports
|
||||||
|
$3 : MyTracks gpx path
|
||||||
|
-->
|
||||||
|
<string name="import_multi_done">Tuotu %1$d GPX-tiedostoa %2$d:sta lähteestä %3$s</string>
|
||||||
|
<string name="import_multi_empty">Lähteestä %s ei löytynyt GPX-tiedostoja. SD-kortti saattaa olla lukukelvoton tai hakemistossa ei ole GPX-tiedostoja.</string>
|
||||||
|
<string name="import_error">Virhe tuotaessa tiedostoa %s</string>
|
||||||
|
<string name="import_title">Tuo My Tracksiin</string>
|
||||||
|
<string name="import_success">%1$d reittiä tuotu.</string>
|
||||||
|
<string name="import_show_track">Näytä reitti</string>
|
||||||
|
|
||||||
|
<!-- Waypoints list -->
|
||||||
|
<string name="waypointslist_btn_delete_all">Poista kaikki merkinnät</string>
|
||||||
|
<string name="waypointslist_this_waypoint">Tämä merkintä</string>
|
||||||
|
<string name="waypointslist_delete_waypoint">Poista</string>
|
||||||
|
<string name="waypointslist_edit_waypoint">Muokkaa tietoja</string>
|
||||||
|
<string name="waypointslist_show_waypoint">Näytä kartalla</string>
|
||||||
|
<string name="waypointslist_btn_insert_waypoint">Lisää reittipiste</string>
|
||||||
|
<string name="waypointslist_btn_insert_statistics">Lisää tilastot</string>
|
||||||
|
<string name="waypointslist_pick_one">Valitse merkintä. Pitkä painallus tuo esiin lisää vaihtoehtoja.</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Details -->
|
||||||
|
<string name="trackdetails_title">Reitin tiedot</string>
|
||||||
|
<string name="trackdetails_name">Reitin nimi</string>
|
||||||
|
<string name="trackdetails_name_hint">Reitin nimi</string>
|
||||||
|
<string name="trackdetails_description">Reitin kuvaus</string>
|
||||||
|
<string name="trackdetails_description_hint">Reitin kuvaus</string>
|
||||||
|
<string name="trackdetails_category">Liikunnan muoto (esim. hölkkä, pyöräily, juoksu...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Liikunnan muoto</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Waypoint Details -->
|
||||||
|
<string name="waypointdetails_title">Merkinnän tiedot</string>
|
||||||
|
<string name="waypointdetails_name">Merkinnän nimi</string>
|
||||||
|
<string name="waypointdetails_name_hint">Merkinnän nimi</string>
|
||||||
|
<string name="waypointdetails_description">Merkinnän kuvaus</string>
|
||||||
|
<string name="waypointdetails_description_hint">Merkinnän kuvaus</string>
|
||||||
|
<string name="waypointdetails_category">Merkinnän tyyppi (esim. rakennus, kuoppa, nähtävyys...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Merkinnän tyyppi</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Settings -->
|
||||||
|
<string name="mytracks_settings">My Tracks Asetukset</string>
|
||||||
|
<string name="settings_display">Näyttö</string>
|
||||||
|
<string name="settings_recording">Tallennus</string>
|
||||||
|
<string name="settings_sharing">Jakaminen</string>
|
||||||
|
|
||||||
|
<string name="settings_not_available_summary">Ei tuettu tässä Android-versiossa</string>
|
||||||
|
<string name="settings_not_while_recording">Ei saatavilla reittiä tallennettaessa.</string>
|
||||||
|
|
||||||
|
<string name="settings_announcement_frequency">Äänimerkki</string>
|
||||||
|
<string name="settings_announcement_frequency_summary">Äänimerkkien aikaväli</string>
|
||||||
|
|
||||||
|
<string name="settings_min_recording_distance">Lyhyin piste-etäisyys</string>
|
||||||
|
<string name="settings_min_recording_distance_summary">Lyhyin sallittu reitintallennuksessa käytetty etäisyys kahden pisteen välillä</string>
|
||||||
|
|
||||||
|
<string name="settings_max_recording_distance">Pisin piste-etäisyys</string>
|
||||||
|
<string name="settings_max_recording_distance_summary">Jos edeltävä piste on valittua etäisyyttä pidemmällä reitti jaetaan</string>
|
||||||
|
|
||||||
|
<string name="settings_min_recording_interval">Lyhyin aika</string>
|
||||||
|
<string name="settings_min_recording_interval_summary">Lyhyin aikaintervalli kahden tallennetun pisteen välillä</string>
|
||||||
|
|
||||||
|
<string name="settings_min_required_accuracy">Sallittu tarkkuus</string>
|
||||||
|
<string name="settings_min_required_accuracy_summary">Reitin tallennus pysäytetään, jos tarkkuus on tätä pienempi</string>
|
||||||
|
|
||||||
|
<string name="settings_metric_units">Käytä metrijärjestelmää</string>
|
||||||
|
<string name="settings_metric_units_summary_on">Kaikki etäisyydet näytetään metrijärjestelmässä</string>
|
||||||
|
<string name="settings_metric_units_summary_off">Kaikki etäisyydet näytetään U.S yksiköitä käyttäen</string>
|
||||||
|
|
||||||
|
<string name="settings_map_public">Aseta kartat julkisiksi</string>
|
||||||
|
<string name="settings_map_public_summary_on">Lähetetyt kartat näkyvät kaikille osoitteessa maps.google.com</string>
|
||||||
|
<string name="settings_map_public_summary_off">Lähetettyjä karttoja ei näytetä julkisesti osoitteessa maps.google.com</string>
|
||||||
|
|
||||||
|
<string name="settings_report_speed_or_pace">Näytä nopeus</string>
|
||||||
|
<string name="settings_report_speed_or_pace_summary_on">Nopeus näytetään</string>
|
||||||
|
<string name="settings_report_speed_or_pace_summary_off">Tahti näytetään</string>
|
||||||
|
|
||||||
|
<string name="settings_share_url_only">Jaa vain URL</string>
|
||||||
|
<string name="settings_share_url_only_summary_on">Ainoastaan kartan URL jaetaan</string>
|
||||||
|
<string name="settings_share_url_only_summary_off">Myös reitin sisältö ja tiedot jaetaan</string>
|
||||||
|
|
||||||
|
<string name="settings_split_frequency">Reitin jaotus</string>
|
||||||
|
<string name="settings_split_frequency_summary">Etäisyys tai aika jolloin reitti jaetaan osiin</string>
|
||||||
|
|
||||||
|
<string name="settings_auto_resume_track_timeout">Reitin jatkaminen</string>
|
||||||
|
<string name="settings_auto_resume_track_timeout_summary">Aika jonka sisällä tallennettavaa reittiä jatketaan, jos puhelin käynnitetään uudelleen.</string>
|
||||||
|
|
||||||
|
<string name="settings_timestamp_track_name">Aikamerkintä nimenä</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_on">Oletusnimenä reitille käytetään aloituspäivämäärää ja aikaa</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_off">Oletusnimenä käytetään kasvavaa numerointia.</string>
|
||||||
|
|
||||||
|
<string name="settings_reset">Palauta oletusasetukset</string>
|
||||||
|
<string name="settings_reset_summary">Palauta kaikki oletusasetukset</string>
|
||||||
|
<string name="settings_reset_dialog_message">Kaikki asetuksesi poistetaan ja palautetaan oletusarvoisiksi. Tallennetut reitit säilytetään. Oletko varma?</string>
|
||||||
|
<string name="settings_reset_done">Oletusasetukset palautettu.</string>
|
||||||
|
|
||||||
|
<string name="pace_label">Tahti</string>
|
||||||
|
|
||||||
|
<string name="eclair_required">Tuettuna vain Android 2.0 tai uudemmassa</string>
|
||||||
|
<string name="settings_sensor_type">Sensorin tyyppi</string>
|
||||||
|
<string name="settings_sensor_type_summary">Sensorin tyyppi johon yhdistetään</string>
|
||||||
|
<string name="settings_heart_rate_ant_sensor_id">Resetoi ANT sykemittarin paritus</string>
|
||||||
|
<string name="settings_power_ant_sensor_id">Resetoi ANT tehomittarin paritus</string>
|
||||||
|
<string name="settings_srm_bridge_ant_sensor_id">Resetoi ANT SRM sillan paritus</string>
|
||||||
|
<string name="settings_ant_not_paired">ANT sensori ei paritettu</string>
|
||||||
|
<string name="settings_ant_paired">ANT sensori paritettu: %d</string>
|
||||||
|
<string name="bluetooth_sensor_title">Bluetooth sensori</string>
|
||||||
|
<string name="bluetooth_sensor_summary">Bluetooth-sensori johon yhdistetään</string>
|
||||||
|
<string name="settings_modular_stats_display_title">Modular Stats Display</string>
|
||||||
|
|
||||||
|
<!-- Backups -->
|
||||||
|
<string name="settings_backup">Varmuuskopioi (BETA)</string>
|
||||||
|
<string name="settings_sd_backup">Varmuuskopioi SD-kortille</string>
|
||||||
|
<string name="settings_backup_to_sd">Varmuuskopioi</string>
|
||||||
|
<string name="settings_backup_to_sd_summary">Tallenna täydellinen kopio reiteistä ja asetuksista SD-kortille</string>
|
||||||
|
<string name="settings_restore_from_sd">Palauta</string>
|
||||||
|
<string name="settings_restore_from_sd_summary">Palauta kaikki reitit ja asetukset SD-kortilta</string>
|
||||||
|
|
||||||
|
<string name="restore_overwrites_warning">Palautus SD-kortilta ylikirjoittaa kaikki nykyiset reitit ja asetukset. Jatketaanko?</string>
|
||||||
|
<string name="select_backup_to_restore">Valitse palautettava varmuuskopio</string>
|
||||||
|
<string name="no_backups">Varmuuskopioita ei löytynyt.</string>
|
||||||
|
<string name="backup_write_progress_message">Luodaan varmuuskopiota. Odota...</string>
|
||||||
|
<string name="backup_import_progress_message">Luetaan varmuuskopiota SD-kortilta. Odota...</string>
|
||||||
|
|
||||||
|
<!-- MyTracksSky -->
|
||||||
|
<string name="mytracks_sky">GPS-satelliitit</string>
|
||||||
|
|
||||||
|
<!-- My Maps -->
|
||||||
|
<string name="select_map_message">Valitse kartta tililtäsi:</string>
|
||||||
|
<string name="create_new_map">Luo uusi kartta...</string>
|
||||||
|
<string name="map_list_title">Lähetä Google My Mapsiin</string>
|
||||||
|
<string name="maps_list_loading">Ladataan karttoja...</string>
|
||||||
|
<string name="maps_list_failed">Karttoja ei voitu ladata!</string>
|
||||||
|
<string name="open_map">Valitse tämä kartta</string>
|
||||||
|
<string name="edit_map_details">Muokkaa kartan tietoja</string>
|
||||||
|
<string name="share_track">Jaa reitti</string>
|
||||||
|
<string name="delete_map">Poista kartta tililtä</string>
|
||||||
|
<string name="map_title">Kartan otsikko:</string>
|
||||||
|
<string name="map_description">Kartan kuvaus:</string>
|
||||||
|
<string name="map_searchable_edit">Näytä kartta ja sen sisältö hakutuloksissa</string>
|
||||||
|
<string name="map_not_searchable_edit">Älä näytä karttaa tai sen sisältöä hakutuloksissa. Tiedot näkyvät suoralla URL-linkillä</string>
|
||||||
|
<string name="map_searchable">Tämä kartta ja sen sisältö näkyy hakutuloksissa</string>
|
||||||
|
<string name="map_not_searchable">Kartta tai sen sisältö ei näy hakutuloksissa. Tiedot näkyvät muille kuitenkin suoralla URL-linkillä</string>
|
||||||
|
|
||||||
|
<!-- Sharing -->
|
||||||
|
<string name="share_map">Jaa kartta</string>
|
||||||
|
<string name="share_map_subject">Haluaisin jakaa kartan kanssasi</string>
|
||||||
|
<string name="share_map_body_format">Saattaisit olla kiinnostunut tästä reitistä:
|
||||||
|
|
||||||
|
%s</string>
|
||||||
|
<string name="send_track_subject">Haluaisin jakaa reitin kanssasi</string>
|
||||||
|
<string name="send_track_body_format">Saattaisit olla kiinnostunut tästä reitistä.
|
||||||
|
|
||||||
|
Käytä Google Earthia tai jotain muuta karttaohjelmistoa kartan katsomiseen.</string>
|
||||||
|
|
||||||
|
<!-- Visibility -->
|
||||||
|
<string name="public_map">Julkinen</string>
|
||||||
|
<string name="unlisted_map">Ei listattu</string>
|
||||||
|
<string name="mapslist_no_maps_available">Ei karttoja saatavilla.</string>
|
||||||
|
|
||||||
|
<!-- Statistics View -->
|
||||||
|
<!-- Average Moving -->
|
||||||
|
<string name="average_moving_speed_label">Keskinopeus (liikuttaessa)</string>
|
||||||
|
<string name="average_moving_pace_label">Tahti (liikuttaessa)</string>
|
||||||
|
|
||||||
|
<!-- Average -->
|
||||||
|
<string name="average_speed_label">Keskinopeus</string>
|
||||||
|
<string name="average_pace_label">Tahti</string>
|
||||||
|
|
||||||
|
<string name="elevation_chart_name">Korkeuskaavio</string>
|
||||||
|
<string name="elevation_gain_label">Nousu</string>
|
||||||
|
<string name="elevation_label">Korkeus</string>
|
||||||
|
<string name="latitude_label">Leveysaste</string>
|
||||||
|
<string name="longitude_label">Pituuspiiri</string>
|
||||||
|
|
||||||
|
<!-- Min -->
|
||||||
|
<string name="min_elevation_label">Min Korkeus</string>
|
||||||
|
<string name="min_grade_label">Min Kaltevuus</string>
|
||||||
|
<string name="min_pace_label">Min Tahti</string>
|
||||||
|
|
||||||
|
<!-- Max -->
|
||||||
|
<string name="max_elevation_label">Max Korkeus</string>
|
||||||
|
<string name="max_grade_label">Max Kaltevuus</string>
|
||||||
|
<string name="max_speed_label">Max Nopeus</string>
|
||||||
|
|
||||||
|
<string name="loading_track">Ladataan reittiä...</string>
|
||||||
|
|
||||||
|
<!-- Chart Settings -->
|
||||||
|
<string name="chart_settings">Kaavion asetukset</string>
|
||||||
|
<!-- X Axis -->
|
||||||
|
<string name="x_axis">X-akseli</string>
|
||||||
|
<string name="by_distance">Etäisyyden mukaan</string>
|
||||||
|
<string name="by_time">Ajan mukaan</string>
|
||||||
|
|
||||||
|
<!-- Y Axis -->
|
||||||
|
<string name="y_axis">Y-akseli</string>
|
||||||
|
|
||||||
|
<!-- Units -->
|
||||||
|
<!-- Time -->
|
||||||
|
<string name="hour">tunti</string>
|
||||||
|
<string name="hours">tuntia</string>
|
||||||
|
<string name="hr">h</string>
|
||||||
|
<string name="min">min</string>
|
||||||
|
<string name="minute">minuutti</string>
|
||||||
|
<string name="minutes">minuuttia</string>
|
||||||
|
<string name="second">sekunti</string>
|
||||||
|
<string name="seconds">sekuntia</string>
|
||||||
|
<string name="milliseconds">ms</string>
|
||||||
|
|
||||||
|
<!-- Distance -->
|
||||||
|
<string name="meter">m</string>
|
||||||
|
<string name="kilometer">km</string>
|
||||||
|
<string name="kilometers_long">kilometriä</string>
|
||||||
|
<string name="feet">ft</string>
|
||||||
|
<string name="mile">mi</string>
|
||||||
|
<string name="miles_long">mailia</string>
|
||||||
|
|
||||||
|
<!-- Speed and Pace -->
|
||||||
|
<string name="kilometer_per_hour">km/h</string>
|
||||||
|
<string name="kilometer_per_hour_long">kilometriä tunnissa</string>
|
||||||
|
<string name="min_per_kilometer">min/km</string>
|
||||||
|
<string name="per_kilometer">per kilometri</string>
|
||||||
|
<string name="mile_per_hour">mi/h</string>
|
||||||
|
<string name="mile_per_hour_long">mailia tunnissa</string>
|
||||||
|
<string name="min_per_mile">min/mi</string>
|
||||||
|
<string name="per_mile">per maili</string>
|
||||||
|
|
||||||
|
<!-- Sensors -->
|
||||||
|
<string name="watts">W</string>
|
||||||
|
<string name="revolutions_per_minute">rpm</string>
|
||||||
|
<string name="bpm">bpm</string>
|
||||||
|
<string name="battery_level">Akku</string>
|
||||||
|
|
||||||
|
<!-- Stats Labels -->
|
||||||
|
<string name="moving_time_label">Liikkumisaika</string>
|
||||||
|
<string name="total_time_label">Kokonaisaika</string>
|
||||||
|
<string name="time_label">Aika</string>
|
||||||
|
<string name="sd_unavail">Muistikortti ei ole käytettävissä</string>
|
||||||
|
<string name="speed">Nopeus</string>
|
||||||
|
<string name="start_trip">Sinun pitää ensin aloittaa matka.</string>
|
||||||
|
<string name="statistics">Tilastot</string>
|
||||||
|
<string name="total_distance_label">Kokonaismatka</string>
|
||||||
|
<string name="distance_label">Matka</string>
|
||||||
|
<string name="power">Teho</string>
|
||||||
|
<string name="cadence">Kadenssi</string>
|
||||||
|
<string name="heart_rate">Syke</string>
|
||||||
|
<string name="max_heart_rate">Maksimisyke</string>
|
||||||
|
<string name="unknown">-</string>
|
||||||
|
<string name="waiting">Odotetaan...</string>
|
||||||
|
|
||||||
|
<!-- End User License Agreement -->
|
||||||
|
<string name="eula_title">End User License Agreement</string>
|
||||||
|
<string name="accept">Hyväksy</string>
|
||||||
|
<string name="decline">Hylkää</string>
|
||||||
|
|
||||||
|
<!-- About -->
|
||||||
|
<string name="about">Tietoja</string>
|
||||||
|
<string name="help">Apua</string>
|
||||||
|
<string name="about_team">Tiimi:</string>
|
||||||
|
<string name="about_version">Version:</string>
|
||||||
|
<string name="about_support">Tuki:</string>
|
||||||
|
<string name="about_privacy">Yksityisyys:</string>
|
||||||
|
|
||||||
|
<!-- Send to Google -->
|
||||||
|
<string name="sendtogoogle_title">Lähetä...</string>
|
||||||
|
<string name="sendtogoogle_google_fusiontables">Google Fusion Tables</string>
|
||||||
|
<string name="sendtogoogle_google_mymaps">Google My Maps</string>
|
||||||
|
<string name="sendtogoogle_google_docs">Google Docs</string>
|
||||||
|
<string name="sendtogoogle_send_now">Lähetä</string>
|
||||||
|
<string name="sendtogoogle_create_new_map">Luo uusi kartta</string>
|
||||||
|
<string name="sendtogoogle_pick_existing_map">Valitse kartta</string>
|
||||||
|
<string name="sendtogoogle_send_stats">Lähetä reitin statistiikka</string>
|
||||||
|
<string name="sendtogoogle_send_stats_and_points">Lähetä reitin statistiikka ja pisteet</string>
|
||||||
|
|
||||||
|
<!-- Getting the account to upload to. -->
|
||||||
|
<string name="no_account_found_title">Tiliä ei löytynyt</string>
|
||||||
|
<string name="no_account_found">Tiliä johon reitin voisi lähettää ei löytynyt.</string>
|
||||||
|
<string name="choose_account_title">Valitse tili</string>
|
||||||
|
|
||||||
|
<!-- SD card -->
|
||||||
|
<string name="io_no_external_storage_found">Ulkoista tallennusmediaa ei löytynyt. Varmista että SD-kortti on kytketty eikä puhelinta ole liitetty tietokoneeseen.</string>
|
||||||
|
<string name="io_write_failed">Kirjoitusvirhe.</string>
|
||||||
|
<string name="io_read_failed">Lukuvirhe.</string>
|
||||||
|
<string name="io_create_dir_failed">Hakemistoa ei voitu luoda SD-kortille.</string>
|
||||||
|
<string name="io_write_finished">SD-kortille kirjoitus valmis.</string>
|
||||||
|
<string name="io_read_finished">SD-kortin luku valmis.</string>
|
||||||
|
|
||||||
|
<!-- VersionChecker -->
|
||||||
|
<string name="version_check_title">Tarkista päivitykset</string>
|
||||||
|
<string name="version_check_upgrade_button">Päivitä</string>
|
||||||
|
<string name="version_check_continue_button">Ohita päivitys</string>
|
||||||
|
<string name="upgrade_required">Käytössäsi oleva versio ohjelmasta %1$s saattaa lakata toimimasta eikä ole enää tuettu. Päivitä jatkaaksesi %1$s käyttöä.</string>
|
||||||
|
<string name="upgrade_recommended">Käytössäsi oleva versio ohjelmasta %1$s saattaa lakata toimimasta. Voit päivittää sen nyt tai jatkaa käyttöä omalla riskillä. Tietyt ominaisuudet, kuten synkronointi serverin kanssa, ei välttämättä toimi ennen päivitystä.</string>
|
||||||
|
<string name="upgrade_available">%1$s uusi versio saatavilla. Voit jatkaa nykyisen version käyttöä tai päivitää uuteen versioon.</string>
|
||||||
|
|
||||||
|
<!-- Welcome -->
|
||||||
|
<string name="welcome">Tervetuloa</string>
|
||||||
|
<string name="welcome_read_later">Ok</string>
|
||||||
|
<string name="welcome_about">Tietoa My Tracksista</string>
|
||||||
|
|
||||||
|
<!-- Announcement -->
|
||||||
|
<string name="announce_no_distance">My Tracks ei etäisyyttä</string>
|
||||||
|
<!-- Format:
|
||||||
|
$1 : Distance label
|
||||||
|
$2 : Distance value (5)
|
||||||
|
$3 : Distance units (mi, km)
|
||||||
|
$4 : Time description (10 minutes 5 seconds)
|
||||||
|
$5 : Speed value (5.6) : Pace value (5 minutes 6 seconds)
|
||||||
|
$6 : Speed units (mph) : Pace units (per mile)
|
||||||
|
-->
|
||||||
|
<string name="announce_template">My Tracks %1$s %2$.2f %3$s ajassa %4$s nopeudella %5$s %6$s</string>
|
||||||
|
|
||||||
|
<!-- Check Units -->
|
||||||
|
<string name="check_units_title">Huomautus mittayksiköistä</string>
|
||||||
|
<string name="check_units_message">Oletuksena käytössä on metrijärjestelmä. Haluatko muuttaa asetuksen?</string>
|
||||||
|
|
||||||
|
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
|
||||||
|
<string name="method_bluetooth">Bluetooth</string>
|
||||||
|
<string name="bluetooth_options">Bluetooth asetukset</string>
|
||||||
|
<string name="bluetooth_pairing">Laiteparit</string>
|
||||||
|
<string name="bluetooth_pairing_summary">Avaa Androidin bluetooth-asetukset luodaksesi laitepareja</string>
|
||||||
|
<string name="sensor_bluetooth_options_key">bluetoothSensorsEnabled</string>
|
||||||
|
<string name="ant_options">ANT asetukset</string>
|
||||||
|
<string name="sensor_options">Sensorien asetukset</string>
|
||||||
|
|
||||||
|
<!-- Bluetooth Sensor -->
|
||||||
|
<string name="bluetooth_connected">Yhdistetty %s</string>
|
||||||
|
<string name="bluetooth_connecting">Yhdistetään bluetooth sensoria ...</string>
|
||||||
|
<string name="bluetooth_not_connected">Bluetooth sensoria ei ole yhdistetty</string>
|
||||||
|
|
||||||
|
<!-- Sensor State -->
|
||||||
|
<string name="sensor_data_time">Sensorin data-aika</string>
|
||||||
|
<string name="power_meter_enabled">Tehomittari käytössä</string>
|
||||||
|
<string name="heart_rate_monitor_enabled">Sykemittari käytössä</string>
|
||||||
|
<string name="no_sensor_manager">Ei sensorihallintaa</string>
|
||||||
|
<string name="enabled">Käytössä</string>
|
||||||
|
<string name="connecting">Yhdistetään</string>
|
||||||
|
<string name="connected">Yhdistetty</string>
|
||||||
|
<string name="disconnected">Katkaistu</string>
|
||||||
|
<string name="no_sensor_service">Ei sensoripalvelua</string>
|
||||||
|
<string name="searching">Etsitään</string>
|
||||||
|
<string name="sending">Lähetetään</string>
|
||||||
|
|
||||||
|
<string name="no_sensor_option">Ei sensoria</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ -sensori</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ -silta</string>
|
||||||
|
<string name="polar_bt_sensor_option">Polar bluetooth</string>
|
||||||
|
<string name="zephyr_bt_sensor_option">Zephyr bluetooth</string>
|
||||||
|
|
||||||
|
<!-- Manifest description (not seen inside the app) -->
|
||||||
|
<string name="notification_permission_label">vastaanota huomautuksia reitin tallentamisesta</string>
|
||||||
|
<string name="read_tracks_permission_label">lue tallennettua reittidataa</string>
|
||||||
|
<string name="write_tracks_permission_label">kirjoita tallennettua reittidataa, aloita/pysäytä reitin tallennus</string>
|
||||||
|
<string name="notification_permission_description">Huomauta kun reitin tallennus aloitetaan tai pysäytetään..</string>
|
||||||
|
<string name="read_tracks_permission_description">Mahdollista reittidatan lukeminen, kuten reittipisteet, merkinnät jne.</string>
|
||||||
|
<string name="write_tracks_permission_description">Mahdollista reittidatan kirjoittaminen, kuten tallennuksen aloittaminen, merkintöjen lisääminen jne.</string>
|
||||||
|
</resources>
|
||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Absent</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -112,10 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 miles (mauvais signal GPS)</item>
|
<item>3.1 miles (mauvais signal GPS)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Task frequency -->
|
||||||
<!-- Split frequency -->
|
<string-array name="task_frequency_options">
|
||||||
<string-array name="split_frequency_options">
|
<item>Absent</item>
|
||||||
<item>Pas de séparation</item>
|
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -131,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>Pas de séparation</item>
|
<item>Absent</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
@@ -304,11 +291,4 @@ limitations under the License.
|
|||||||
<item>point de passage</item>
|
<item>point de passage</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="sensor_type_options">
|
|
||||||
<item>Aucun</item>
|
|
||||||
<item>Capteur ANT+</item>
|
|
||||||
<item>Pont SRM ANT+</item>
|
|
||||||
<item>Bluetooth Zephyr</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -144,14 +144,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Détails parcours</string>
|
<string name="trackdetails_title">Détails parcours</string>
|
||||||
<string name="trackdetails_name">Nom du parcours</string>
|
<string name="trackdetails_name">Nom du parcours</string>
|
||||||
|
<string name="trackdetails_name_hint">Nom du parcours</string>
|
||||||
<string name="trackdetails_description">Description du parcours</string>
|
<string name="trackdetails_description">Description du parcours</string>
|
||||||
|
<string name="trackdetails_description_hint">Description du parcours</string>
|
||||||
<string name="trackdetails_category">Type d\'activité (randonnée, cyclisme, jogging, escalade...)</string>
|
<string name="trackdetails_category">Type d\'activité (randonnée, cyclisme, jogging, escalade...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Type d\'activité</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Details balise</string>
|
<string name="waypointdetails_title">Details balise</string>
|
||||||
<string name="waypointdetails_name">Nom de la balise</string>
|
<string name="waypointdetails_name">Nom de la balise</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nom de la balise</string>
|
||||||
<string name="waypointdetails_description">Description balise</string>
|
<string name="waypointdetails_description">Description balise</string>
|
||||||
|
<string name="waypointdetails_description_hint">Description balise</string>
|
||||||
<string name="waypointdetails_category">Nom de balise (par ex.: immeuble, boutique, point de vue...)</string>
|
<string name="waypointdetails_category">Nom de balise (par ex.: immeuble, boutique, point de vue...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Nom de balise</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Paramètres My Tracks</string>
|
<string name="mytracks_settings">Paramètres My Tracks</string>
|
||||||
@@ -160,7 +166,7 @@ limitations under the License.
|
|||||||
<string name="settings_sharing">Partage</string>
|
<string name="settings_sharing">Partage</string>
|
||||||
|
|
||||||
<string name="settings_announcement_frequency">Fréquence des annonces</string>
|
<string name="settings_announcement_frequency">Fréquence des annonces</string>
|
||||||
<string name="settings_announcement_frequency_summary">Temps minimum entre eux annonces vocales</string>
|
<string name="settings_announcement_frequency_summary">Temps minimum entre deux annonces vocales</string>
|
||||||
|
|
||||||
<string name="settings_min_recording_distance">Distance min. entre 2 points</string>
|
<string name="settings_min_recording_distance">Distance min. entre 2 points</string>
|
||||||
<string name="settings_min_recording_distance_summary">Plus petite distance entre deux enregistrements de votre position</string>
|
<string name="settings_min_recording_distance_summary">Plus petite distance entre deux enregistrements de votre position</string>
|
||||||
@@ -397,6 +403,13 @@ limitations under the License.
|
|||||||
<string name="searching">Recherche</string>
|
<string name="searching">Recherche</string>
|
||||||
<string name="sending">Envoi</string>
|
<string name="sending">Envoi</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">Aucun</string>
|
||||||
|
<string name="ant_sensor_option">Capteur ANT+</string>
|
||||||
|
<string name="ant_bridge_sensor_option">Pont SRM ANT+</string>
|
||||||
|
<string name="polar_bt_sensor_option">Bluetooth Polar</string>
|
||||||
|
<string name="zephyr_bt_sensor_option">Bluetooth Zephyr</string>
|
||||||
|
|
||||||
<!-- Manifest description (not seen inside the app) -->
|
<!-- Manifest description (not seen inside the app) -->
|
||||||
<string name="notification_permission_label">notifications lors de l\'enregistrement de parcours</string>
|
<string name="notification_permission_label">notifications lors de l\'enregistrement de parcours</string>
|
||||||
<string name="read_tracks_permission_label">lecture des parcours enregistrés</string>
|
<string name="read_tracks_permission_label">lecture des parcours enregistrés</string>
|
||||||
|
|||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Disattivato</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -112,9 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 mi (segnale GPS debole)</item>
|
<item>3.1 mi (segnale GPS debole)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>Non dividere</item>
|
<item>Disattivato</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -130,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>Non dividere</item>
|
<item>Disattivato</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
|
|||||||
@@ -147,14 +147,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Dettagli del percorso</string>
|
<string name="trackdetails_title">Dettagli del percorso</string>
|
||||||
<string name="trackdetails_name">Nome del percorso</string>
|
<string name="trackdetails_name">Nome del percorso</string>
|
||||||
|
<string name="trackdetails_name_hint">Nome del percorso</string>
|
||||||
<string name="trackdetails_description">Descrizione del percorso</string>
|
<string name="trackdetails_description">Descrizione del percorso</string>
|
||||||
|
<string name="trackdetails_description_hint">Descrizione del percorso</string>
|
||||||
<string name="trackdetails_category">Tipo di attività (ad es. escursionismo, ciclismo, corsa, arrampicata...)</string>
|
<string name="trackdetails_category">Tipo di attività (ad es. escursionismo, ciclismo, corsa, arrampicata...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Tipo di attività</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Dettagli sul segnaposto</string>
|
<string name="waypointdetails_title">Dettagli sul segnaposto</string>
|
||||||
<string name="waypointdetails_name">Nome del segnaposto</string>
|
<string name="waypointdetails_name">Nome del segnaposto</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nome del segnaposto</string>
|
||||||
<string name="waypointdetails_description">Descrizione del segnaposto</string>
|
<string name="waypointdetails_description">Descrizione del segnaposto</string>
|
||||||
|
<string name="waypointdetails_description_hint">Descrizione del segnaposto</string>
|
||||||
<string name="waypointdetails_category">Tipo di segnaposto (ad es. edificio, buca, vista...)</string>
|
<string name="waypointdetails_category">Tipo di segnaposto (ad es. edificio, buca, vista...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Tipo di segnaposto</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Impostazioni di My Tracks</string>
|
<string name="mytracks_settings">Impostazioni di My Tracks</string>
|
||||||
|
|||||||
@@ -15,19 +15,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>不使用</item>
|
|
||||||
<item>1 分</item>
|
|
||||||
<item>2 分</item>
|
|
||||||
<item>5 分</item>
|
|
||||||
<item>10 分</item>
|
|
||||||
<item>15 分</item>
|
|
||||||
<item>30 分</item>
|
|
||||||
<item>60 分</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
<item>2 m</item>
|
<item>2 m</item>
|
||||||
@@ -48,7 +36,6 @@ limitations under the License.
|
|||||||
<item>328 ft</item>
|
<item>328 ft</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Maximum recording distance -->
|
<!-- Maximum recording distance -->
|
||||||
<string-array name="max_recording_distance_options">
|
<string-array name="max_recording_distance_options">
|
||||||
<item>50 m</item>
|
<item>50 m</item>
|
||||||
@@ -68,7 +55,6 @@ limitations under the License.
|
|||||||
<item>3.1 mi</item>
|
<item>3.1 mi</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording interval -->
|
<!-- Minimum recording interval -->
|
||||||
<string-array name="min_recording_interval_options">
|
<string-array name="min_recording_interval_options">
|
||||||
<item>電源節約 (動的制御)</item>
|
<item>電源節約 (動的制御)</item>
|
||||||
@@ -89,7 +75,6 @@ limitations under the License.
|
|||||||
<item>30 分</item>
|
<item>30 分</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum required accuracy -->
|
<!-- Minimum required accuracy -->
|
||||||
<string-array name="min_required_accuracy_options">
|
<string-array name="min_required_accuracy_options">
|
||||||
<item>10 m (GPS信号強度良好)</item>
|
<item>10 m (GPS信号強度良好)</item>
|
||||||
@@ -115,10 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 mi (GPS信号強度不良)</item>
|
<item>3.1 mi (GPS信号強度不良)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Task frequency -->
|
||||||
<!-- Split frequency -->
|
<string-array name="task_frequency_options">
|
||||||
<string-array name="split_frequency_options">
|
<item>不使用</item>
|
||||||
<item>分割なし</item>
|
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -134,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 分</item>
|
<item>1 分</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>分割なし</item>
|
<item>不使用</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
@@ -288,10 +272,4 @@ limitations under the License.
|
|||||||
<item>ウェイポイント</item>
|
<item>ウェイポイント</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<array name="sensor_type_options">
|
|
||||||
<item>なし</item>
|
|
||||||
<item>ANT+ センサー</item>
|
|
||||||
<item>SRM ANT+ ブリッジ</item>
|
|
||||||
<item>Zephyr Bluetooth</item>
|
|
||||||
</array>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -154,14 +154,13 @@ limitations under the License.
|
|||||||
<string name="tracklist_clear_map">マップのクリア</string>
|
<string name="tracklist_clear_map">マップのクリア</string>
|
||||||
<!-- Import All -->
|
<!-- Import All -->
|
||||||
<string name="tracklist_btn_import_all">全てインポート</string>
|
<string name="tracklist_btn_import_all">全てインポート</string>
|
||||||
<string name="import_done">インポート終了</string>
|
|
||||||
<!-- Format:
|
<!-- Format:
|
||||||
$1 : Successful imports
|
$1 : Successful imports
|
||||||
$2 : Attempted imports
|
$2 : Attempted imports
|
||||||
$3 : MyTracks gpx path
|
$3 : MyTracks gpx path
|
||||||
-->
|
-->
|
||||||
<string name="import_done">%3$s からGPXファイル %2$d件のうち %1$d件をインポートしました</string>
|
<string name="import_multi_done">%3$s からGPXファイル %2$d件のうち %1$d件をインポートしました</string>
|
||||||
<string name="import_empty">%s ではGPXファイルがありません.SDカードを読み込めないかディレクトリにGPXファイルが無いかも知れません.</string>
|
<string name="import_multi_empty">%s ではGPXファイルがありません.SDカードを読み込めないかディレクトリにGPXファイルが無いかも知れません.</string>
|
||||||
<string name="import_error">ファイル %s のインポートエラー</string>
|
<string name="import_error">ファイル %s のインポートエラー</string>
|
||||||
|
|
||||||
<!-- Waypoints list -->
|
<!-- Waypoints list -->
|
||||||
@@ -177,14 +176,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">トラック詳細</string>
|
<string name="trackdetails_title">トラック詳細</string>
|
||||||
<string name="trackdetails_name">トラック名</string>
|
<string name="trackdetails_name">トラック名</string>
|
||||||
|
<string name="trackdetails_name_hint">トラック名</string>
|
||||||
<string name="trackdetails_description">トラック説明</string>
|
<string name="trackdetails_description">トラック説明</string>
|
||||||
|
<string name="trackdetails_description_hint">トラック説明</string>
|
||||||
<string name="trackdetails_category">活動タイプ(ハイキング, サイクリング、ランニング、登山...)</string>
|
<string name="trackdetails_category">活動タイプ(ハイキング, サイクリング、ランニング、登山...)</string>
|
||||||
|
<string name="trackdetails_category_hint">活動タイプ</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">マーカー詳細</string>
|
<string name="waypointdetails_title">マーカー詳細</string>
|
||||||
<string name="waypointdetails_name">マーカー名</string>
|
<string name="waypointdetails_name">マーカー名</string>
|
||||||
|
<string name="waypointdetails_name_hint">マーカー名</string>
|
||||||
<string name="waypointdetails_description">マーカー説明</string>
|
<string name="waypointdetails_description">マーカー説明</string>
|
||||||
|
<string name="waypointdetails_description_hint">マーカー説明</string>
|
||||||
<string name="waypointdetails_category">マーカータイプ(建物、洞穴、名所...)</string>
|
<string name="waypointdetails_category">マーカータイプ(建物、洞穴、名所...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">マーカータイプ</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">My Tracks設定</string>
|
<string name="mytracks_settings">My Tracks設定</string>
|
||||||
@@ -464,6 +469,11 @@ limitations under the License.
|
|||||||
<string name="searching">検索中</string>
|
<string name="searching">検索中</string>
|
||||||
<string name="sending">送信中</string>
|
<string name="sending">送信中</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">なし</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ センサー</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ ブリッジ</string>
|
||||||
|
|
||||||
<!-- Manifest description (not seen inside the app) -->
|
<!-- Manifest description (not seen inside the app) -->
|
||||||
<string name="notification_permission_label">トラック記録通知受信</string>
|
<string name="notification_permission_label">トラック記録通知受信</string>
|
||||||
<string name="read_tracks_permission_label">トラック読み込み</string>
|
<string name="read_tracks_permission_label">トラック読み込み</string>
|
||||||
|
|||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Brak</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -112,9 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 mili (słaby sygnał GPS)</item>
|
<item>3.1 mili (słaby sygnał GPS)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>Brak dzielenia</item>
|
<item>Brak</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -130,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>Brak dzielenia</item>
|
<item>Brak</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
@@ -146,7 +134,7 @@ limitations under the License.
|
|||||||
<item>2 min</item>
|
<item>2 min</item>
|
||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Auto-resume track timeout -->
|
<!-- Auto-resume track timeout -->
|
||||||
<string-array name="auto_resume_track_timeout_options">
|
<string-array name="auto_resume_track_timeout_options">
|
||||||
<item>Nigdy</item>
|
<item>Nigdy</item>
|
||||||
@@ -162,7 +150,7 @@ limitations under the License.
|
|||||||
<item>typ mieszany</item>
|
<item>typ mieszany</item>
|
||||||
<item>inny</item>
|
<item>inny</item>
|
||||||
|
|
||||||
<item>bieanie</item>
|
<item>bieganie</item>
|
||||||
<item>bieganie uliczne</item>
|
<item>bieganie uliczne</item>
|
||||||
<item>bieganie na torze</item>
|
<item>bieganie na torze</item>
|
||||||
<item>bieganie terenowe</item>
|
<item>bieganie terenowe</item>
|
||||||
@@ -182,10 +170,10 @@ limitations under the License.
|
|||||||
<item>łyżwiarstwo torowe</item>
|
<item>łyżwiarstwo torowe</item>
|
||||||
<item>deskorolka</item>
|
<item>deskorolka</item>
|
||||||
|
|
||||||
<item>wędrówka po sniegu</item>
|
<item>wędrówka po śniegu</item>
|
||||||
<item>narciarstwo</item>
|
<item>narciarstwo</item>
|
||||||
<item>snowboard</item>
|
<item>snowboard</item>
|
||||||
<item>saneczkastwo</item>
|
<item>saneczkarstwo</item>
|
||||||
<item>żeglarstwo lodowe</item>
|
<item>żeglarstwo lodowe</item>
|
||||||
|
|
||||||
<item>żeglowanie</item>
|
<item>żeglowanie</item>
|
||||||
@@ -249,7 +237,7 @@ limitations under the License.
|
|||||||
<item>kominek</item>
|
<item>kominek</item>
|
||||||
<item>remiza strażacka</item>
|
<item>remiza strażacka</item>
|
||||||
<item>baza wędkarska</item>
|
<item>baza wędkarska</item>
|
||||||
<item>stcja paliw</item>
|
<item>stacja paliw</item>
|
||||||
<item>pole golfowe</item>
|
<item>pole golfowe</item>
|
||||||
<item>sklep spożywczy</item>
|
<item>sklep spożywczy</item>
|
||||||
<item>fryzjer</item>
|
<item>fryzjer</item>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ limitations under the License.
|
|||||||
<string name="error_invalid_gpx_format">Plik nie jest poprawnym plikiem GPX.</string>
|
<string name="error_invalid_gpx_format">Plik nie jest poprawnym plikiem GPX.</string>
|
||||||
<string name="error_generic">Wystąpił błąd. Spróbuj ponownie.</string>
|
<string name="error_generic">Wystąpił błąd. Spróbuj ponownie.</string>
|
||||||
<string name="error_track_does_not_exist">Trasa nie istnieje.</string>
|
<string name="error_track_does_not_exist">Trasa nie istnieje.</string>
|
||||||
<string name="error_out_of_memory">Plik jest za duży (musi być mniejszy nić 500 KB). Przerywam.</string>
|
<string name="error_out_of_memory">Plik jest za duży (musi być mniejszy niż 500 KB). Przerywam.</string>
|
||||||
<string name="error_unable_to_insert_marker">Nie można wstawić markera. Brak poprawnych danych o lokalizacji.</string>
|
<string name="error_unable_to_insert_marker">Nie można wstawić markera. Brak poprawnych danych o lokalizacji.</string>
|
||||||
|
|
||||||
<!-- Status messages -->
|
<!-- Status messages -->
|
||||||
@@ -149,14 +149,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Szczegóły trasy</string>
|
<string name="trackdetails_title">Szczegóły trasy</string>
|
||||||
<string name="trackdetails_name">Nazwa trasy</string>
|
<string name="trackdetails_name">Nazwa trasy</string>
|
||||||
|
<string name="trackdetails_name_hint">Nazwa trasy</string>
|
||||||
<string name="trackdetails_description">Opis trasy</string>
|
<string name="trackdetails_description">Opis trasy</string>
|
||||||
|
<string name="trackdetails_description_hint">Opis trasy</string>
|
||||||
<string name="trackdetails_category">Typ aktywności (np. wspinanie, jazda rowerem, bieganie...)</string>
|
<string name="trackdetails_category">Typ aktywności (np. wspinanie, jazda rowerem, bieganie...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Typ aktywności</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Szczegóły znacznika</string>
|
<string name="waypointdetails_title">Szczegóły znacznika</string>
|
||||||
<string name="waypointdetails_name">Nazwa znacznika</string>
|
<string name="waypointdetails_name">Nazwa znacznika</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nazwa znacznika</string>
|
||||||
<string name="waypointdetails_description">Opis znacznika</string>
|
<string name="waypointdetails_description">Opis znacznika</string>
|
||||||
|
<string name="waypointdetails_description_hint">Opis znacznika</string>
|
||||||
<string name="waypointdetails_category">Typ znacznika (np. budynek, jaskinia, punkt widokowy...)</string>
|
<string name="waypointdetails_category">Typ znacznika (np. budynek, jaskinia, punkt widokowy...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Typ znacznika</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Ustawienia My Tracks</string>
|
<string name="mytracks_settings">Ustawienia My Tracks</string>
|
||||||
@@ -334,7 +340,6 @@ limitations under the License.
|
|||||||
<string name="about_team">Zespół:</string>
|
<string name="about_team">Zespół:</string>
|
||||||
<string name="about_version">Wersja:</string>
|
<string name="about_version">Wersja:</string>
|
||||||
<string name="about_support">Wsparcie:</string>
|
<string name="about_support">Wsparcie:</string>
|
||||||
<string name="about_bart">Bartłomiej Niechwiej</string>
|
|
||||||
|
|
||||||
<!-- Send to Google -->
|
<!-- Send to Google -->
|
||||||
<string name="sendtogoogle_title">Wyślij do...</string>
|
<string name="sendtogoogle_title">Wyślij do...</string>
|
||||||
@@ -385,4 +390,31 @@ limitations under the License.
|
|||||||
<!-- Check Units -->
|
<!-- Check Units -->
|
||||||
<string name="check_units_title">Jednostki miary</string>
|
<string name="check_units_title">Jednostki miary</string>
|
||||||
<string name="check_units_message">Domyślnie używane są jednostki metryczne. Chcesz to zmienić?</string>
|
<string name="check_units_message">Domyślnie używane są jednostki metryczne. Chcesz to zmienić?</string>
|
||||||
|
|
||||||
|
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
|
||||||
|
<string name="method_bluetooth">Bluetooth</string>
|
||||||
|
<string name="bluetooth_options">Opcje Bluetooth</string>
|
||||||
|
<string name="bluetooth_pairing">Parowanie urządzenia</string>
|
||||||
|
<string name="bluetooth_pairing_summary">Przejdź do ustawień Bluetooth Androida aby sparować urządzenie</string>
|
||||||
|
<string name="sensor_bluetooth_options_key">bluetoothSensorsEnabled</string>
|
||||||
|
<string name="ant_options">Opce ANT</string>
|
||||||
|
<string name="sensor_options">Opcje Czujników</string>
|
||||||
|
|
||||||
|
<!-- Bluetooth Sensor -->
|
||||||
|
<string name="bluetooth_connected">Połączony z %s</string>
|
||||||
|
<string name="bluetooth_connecting">Łączenie urządzenia Bluetooth w toku...</string>
|
||||||
|
<string name="bluetooth_not_connected">Urządzenie Bluetooth niepołączone</string>
|
||||||
|
|
||||||
|
<!-- Sensor State -->
|
||||||
|
<string name="sensor_data_time">Czas Danych Czujnika</string>
|
||||||
|
<string name="power_meter_enabled">Miernik mocy aktywny</string>
|
||||||
|
<string name="heart_rate_monitor_enabled">Pulsometr aktywny</string>
|
||||||
|
<string name="no_sensor_manager">Brak Ustawień Czujników</string>
|
||||||
|
<string name="enabled">Aktywny</string>
|
||||||
|
<string name="connecting">Łączenie</string>
|
||||||
|
<string name="connected">Podłączony</string>
|
||||||
|
<string name="disconnected">Rozłączony</string>
|
||||||
|
<string name="no_sensor_service">Brak Serwisu Czujników</string>
|
||||||
|
<string name="searching">Wykrywanie</string>
|
||||||
|
<string name="sending">Przesyłanie</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -15,21 +15,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<array name="task_frequency_options">
|
|
||||||
<item>Desligado</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
<item>2 m</item>
|
<item>2 m</item>
|
||||||
<item>3 m</item>
|
<item>3 m</item>
|
||||||
@@ -37,9 +24,9 @@ limitations under the License.
|
|||||||
<item>5 m (recomendada)</item>
|
<item>5 m (recomendada)</item>
|
||||||
<item>10 m</item>
|
<item>10 m</item>
|
||||||
<item>100 m</item>
|
<item>100 m</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
<array name="min_recording_distance_options_ft">
|
<string-array name="min_recording_distance_options_ft">
|
||||||
<item>3 pés</item>
|
<item>3 pés</item>
|
||||||
<item>6 pés</item>
|
<item>6 pés</item>
|
||||||
<item>10 pés</item>
|
<item>10 pés</item>
|
||||||
@@ -47,31 +34,29 @@ limitations under the License.
|
|||||||
<item>16 pés (recomendado)</item>
|
<item>16 pés (recomendado)</item>
|
||||||
<item>33 pés</item>
|
<item>33 pés</item>
|
||||||
<item>328 pés</item>
|
<item>328 pés</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Maximum recording distance -->
|
<!-- Maximum recording distance -->
|
||||||
<array name="max_recording_distance_options">
|
<string-array name="max_recording_distance_options">
|
||||||
<item>50 m</item>
|
<item>50 m</item>
|
||||||
<item>100 m</item>
|
<item>100 m</item>
|
||||||
<item>200 m (recomendado)</item>
|
<item>200 m (recomendado)</item>
|
||||||
<item>500 m</item>
|
<item>500 m</item>
|
||||||
<item>1000 m</item>
|
<item>1000 m</item>
|
||||||
<item>5000 m</item>
|
<item>5000 m</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
<array name="max_recording_distance_options_ft">
|
<string-array name="max_recording_distance_options_ft">
|
||||||
<item>164 pés</item>
|
<item>164 pés</item>
|
||||||
<item>328 pés</item>
|
<item>328 pés</item>
|
||||||
<item>656 pés (recomendado)</item>
|
<item>656 pés (recomendado)</item>
|
||||||
<item>1640 pés</item>
|
<item>1640 pés</item>
|
||||||
<item>0.6 milhas</item>
|
<item>0.6 milhas</item>
|
||||||
<item>3.1 milhas</item>
|
<item>3.1 milhas</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording interval -->
|
<!-- Minimum recording interval -->
|
||||||
<array name="min_recording_interval_options">
|
<string-array name="min_recording_interval_options">
|
||||||
<item>economia de bateria (adaptativo)</item>
|
<item>economia de bateria (adaptativo)</item>
|
||||||
<item>alta precisão (adaptativo)</item>
|
<item>alta precisão (adaptativo)</item>
|
||||||
<item>máxima (recomendada)</item>
|
<item>máxima (recomendada)</item>
|
||||||
@@ -88,11 +73,10 @@ limitations under the License.
|
|||||||
<item>10 min</item>
|
<item>10 min</item>
|
||||||
<item>15 min</item>
|
<item>15 min</item>
|
||||||
<item>30 min</item>
|
<item>30 min</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum required accuracy -->
|
<!-- Minimum required accuracy -->
|
||||||
<array name="min_required_accuracy_options">
|
<string-array name="min_required_accuracy_options">
|
||||||
<item>10 m (sinal de GPS excelente)</item>
|
<item>10 m (sinal de GPS excelente)</item>
|
||||||
<item>20 m</item>
|
<item>20 m</item>
|
||||||
<item>50 m</item>
|
<item>50 m</item>
|
||||||
@@ -102,9 +86,9 @@ limitations under the License.
|
|||||||
<item>1000 m</item>
|
<item>1000 m</item>
|
||||||
<item>2000 m</item>
|
<item>2000 m</item>
|
||||||
<item>5000 m (sinal de GPS ruim)</item>
|
<item>5000 m (sinal de GPS ruim)</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
<array name="min_required_accuracy_options_ft">
|
<string-array name="min_required_accuracy_options_ft">
|
||||||
<item>33 pés (sinal de GPS excelente)</item>
|
<item>33 pés (sinal de GPS excelente)</item>
|
||||||
<item>66 pés</item>
|
<item>66 pés</item>
|
||||||
<item>165 pés</item>
|
<item>165 pés</item>
|
||||||
@@ -114,12 +98,11 @@ limitations under the License.
|
|||||||
<item>0.6 milhas</item>
|
<item>0.6 milhas</item>
|
||||||
<item>1.2 milhas</item>
|
<item>1.2 milhas</item>
|
||||||
<item>3.1 milhas (sinal de GPS ruim)</item>
|
<item>3.1 milhas (sinal de GPS ruim)</item>
|
||||||
</array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Task frequency -->
|
||||||
<!-- Split frequency -->
|
<string-array name="task_frequency_options">
|
||||||
<string-array name="split_frequency_options">
|
<item>Desligado</item>
|
||||||
<item>Sem divisões</item>
|
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -135,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>Sem divisões</item>
|
<item>Desligado</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ limitations under the License.
|
|||||||
<!-- Common -->
|
<!-- Common -->
|
||||||
<string name="no">Não</string>
|
<string name="no">Não</string>
|
||||||
<string name="yes">Sim</string>
|
<string name="yes">Sim</string>
|
||||||
|
<!-- KEEP_PARENT name="ok" rev="7cbb95c69f35" -->
|
||||||
<string name="error">Erro</string>
|
<string name="error">Erro</string>
|
||||||
<string name="success">Successo</string>
|
<string name="success">Successo</string>
|
||||||
<string name="waypoint">Ponto de passagem</string>
|
<string name="waypoint">Ponto de passagem</string>
|
||||||
@@ -143,14 +144,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Detalhes do Caminho</string>
|
<string name="trackdetails_title">Detalhes do Caminho</string>
|
||||||
<string name="trackdetails_name">Nome do Caminho</string>
|
<string name="trackdetails_name">Nome do Caminho</string>
|
||||||
|
<string name="trackdetails_name_hint">Nome do Caminho</string>
|
||||||
<string name="trackdetails_description">Descrição do Caminho</string>
|
<string name="trackdetails_description">Descrição do Caminho</string>
|
||||||
|
<string name="trackdetails_description_hint">Descrição do Caminho</string>
|
||||||
<string name="trackdetails_category">Tipo de Atividade (por ex. caminhada, ciclismo, escalada...)</string>
|
<string name="trackdetails_category">Tipo de Atividade (por ex. caminhada, ciclismo, escalada...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Tipo de Atividade</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Detalhes do Marcador</string>
|
<string name="waypointdetails_title">Detalhes do Marcador</string>
|
||||||
<string name="waypointdetails_name">Nome do Marcador</string>
|
<string name="waypointdetails_name">Nome do Marcador</string>
|
||||||
|
<string name="waypointdetails_name_hint">Nome do Marcador</string>
|
||||||
<string name="waypointdetails_description">Descrição do Marcador</string>
|
<string name="waypointdetails_description">Descrição do Marcador</string>
|
||||||
|
<string name="waypointdetails_description_hint">Descrição do Marcador</string>
|
||||||
<string name="waypointdetails_category">Tipo do Marcador (por ex. Prédio, Mirante, Cachoeira...)</string>
|
<string name="waypointdetails_category">Tipo do Marcador (por ex. Prédio, Mirante, Cachoeira...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Tipo do Marcador</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">Configurações do My Tracks</string>
|
<string name="mytracks_settings">Configurações do My Tracks</string>
|
||||||
|
|||||||
Executable
+275
@@ -0,0 +1,275 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2010 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Minimum recording distance -->
|
||||||
|
<string-array name="min_recording_distance_options">
|
||||||
|
<item>1 м</item>
|
||||||
|
<item>2 м</item>
|
||||||
|
<item>3 м</item>
|
||||||
|
<item>4 м</item>
|
||||||
|
<item>5 м (рекомендуется)</item>
|
||||||
|
<item>10 м</item>
|
||||||
|
<item>100 м</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_recording_distance_options_ft">
|
||||||
|
<item>3 фута</item>
|
||||||
|
<item>6 футов</item>
|
||||||
|
<item>10 футов</item>
|
||||||
|
<item>13 футов</item>
|
||||||
|
<item>16 футов (рекомендуется)</item>
|
||||||
|
<item>33 фута</item>
|
||||||
|
<item>328 футов</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Maximum recording distance -->
|
||||||
|
<string-array name="max_recording_distance_options">
|
||||||
|
<item>50 м</item>
|
||||||
|
<item>100 м</item>
|
||||||
|
<item>200 м (рекомендуется)</item>
|
||||||
|
<item>500 м</item>
|
||||||
|
<item>1000 м</item>
|
||||||
|
<item>5000 м</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="max_recording_distance_options_ft">
|
||||||
|
<item>164 фута</item>
|
||||||
|
<item>328 футов</item>
|
||||||
|
<item>656 фута (рекомендуется)</item>
|
||||||
|
<item>1640 футов</item>
|
||||||
|
<item>0,6 мили</item>
|
||||||
|
<item>3,1 мили</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Minimum recording interval -->
|
||||||
|
<string-array name="min_recording_interval_options">
|
||||||
|
<item>экономия батареи (адаптивная)</item>
|
||||||
|
<item>высокая точность (адаптивная)</item>
|
||||||
|
<item>высочайшая точность (рекомендуется)</item>
|
||||||
|
<item>2 с</item>
|
||||||
|
<item>3 с</item>
|
||||||
|
<item>4 с</item>
|
||||||
|
<item>5 с</item>
|
||||||
|
<item>10 с</item>
|
||||||
|
<item>20 с</item>
|
||||||
|
<item>30 с</item>
|
||||||
|
<item>1 мин</item>
|
||||||
|
<item>2 мин</item>
|
||||||
|
<item>5 мин</item>
|
||||||
|
<item>10 мин</item>
|
||||||
|
<item>15 мин</item>
|
||||||
|
<item>30 мин</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Minimum required accuracy -->
|
||||||
|
<string-array name="min_required_accuracy_options">
|
||||||
|
<item>10 м (отличный сигнал GPS)</item>
|
||||||
|
<item>20 м</item>
|
||||||
|
<item>50 м</item>
|
||||||
|
<item>100 м</item>
|
||||||
|
<item>200 м (рекомендуется)</item>
|
||||||
|
<item>500 м</item>
|
||||||
|
<item>1000 м</item>
|
||||||
|
<item>2000 м</item>
|
||||||
|
<item>5000 м (плохой сигнал GPS)</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_required_accuracy_options_ft">
|
||||||
|
<item>33 фута (отличный сигнал GPS)</item>
|
||||||
|
<item>66 футов</item>
|
||||||
|
<item>165 футов</item>
|
||||||
|
<item>328 футов</item>
|
||||||
|
<item>656 футов (рекомендуется)</item>
|
||||||
|
<item>1640 футов</item>
|
||||||
|
<item>0,6 мили</item>
|
||||||
|
<item>1,2 мили</item>
|
||||||
|
<item>3,1 мили (плохой сигнал GPS)</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Task frequency -->
|
||||||
|
<string-array name="task_frequency_options">
|
||||||
|
<item>Выкл.</item>
|
||||||
|
<item>100 км</item>
|
||||||
|
<item>50 км</item>
|
||||||
|
<item>25 км</item>
|
||||||
|
<item>10 км</item>
|
||||||
|
<item>5 км</item>
|
||||||
|
<item>1 км</item>
|
||||||
|
<item>60 мин</item>
|
||||||
|
<item>30 мин</item>
|
||||||
|
<item>15 мин</item>
|
||||||
|
<item>10 мин</item>
|
||||||
|
<item>5 мин</item>
|
||||||
|
<item>2 мин</item>
|
||||||
|
<item>1 мин</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="task_frequency_options_ft">
|
||||||
|
<item>Выкл.</item>
|
||||||
|
<item>100 миль</item>
|
||||||
|
<item>50 миль</item>
|
||||||
|
<item>25 миль</item>
|
||||||
|
<item>10 миль</item>
|
||||||
|
<item>5 миль</item>
|
||||||
|
<item>1 миля</item>
|
||||||
|
<item>60 мин</item>
|
||||||
|
<item>30 мин</item>
|
||||||
|
<item>15 мин</item>
|
||||||
|
<item>10 мин</item>
|
||||||
|
<item>5 мин</item>
|
||||||
|
<item>2 мин</item>
|
||||||
|
<item>1 мин</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Auto-resume track timeout -->
|
||||||
|
<string-array name="auto_resume_track_timeout_options">
|
||||||
|
<item>Никогда</item>
|
||||||
|
<item>5 мин</item>
|
||||||
|
<item>10 мин</item>
|
||||||
|
<item>15 мин</item>
|
||||||
|
<item>Всегда</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<!-- Other non-preference arrays -->
|
||||||
|
<array name="activity_types">
|
||||||
|
<item>не определен</item>
|
||||||
|
<item>смешанного типа</item>
|
||||||
|
<item>другое</item>
|
||||||
|
|
||||||
|
<item>бег</item>
|
||||||
|
<item>бег по улице</item>
|
||||||
|
<item>бег по треку</item>
|
||||||
|
<item>бег по тропе</item>
|
||||||
|
<item>ходьба</item>
|
||||||
|
<item>быстрая ходьба</item>
|
||||||
|
<item>пешая прогулка</item>
|
||||||
|
<item>прогулка по туристической тропе</item>
|
||||||
|
<item>прогулка по бездорожью</item>
|
||||||
|
<item>восхождение</item>
|
||||||
|
|
||||||
|
<item>велосипедная прогулка</item>
|
||||||
|
<item>шоссейный велосипед</item>
|
||||||
|
<item>горный велосипед</item>
|
||||||
|
<item>велотрек</item>
|
||||||
|
|
||||||
|
<item>катание на коньках</item>
|
||||||
|
<item>катания на роликовых коньках</item>
|
||||||
|
<item>катания на роликовых коньках</item>
|
||||||
|
|
||||||
|
<item>прогулка на снегоступах</item>
|
||||||
|
<item>лыжи</item>
|
||||||
|
<item>сноубординг</item>
|
||||||
|
<item>сани</item>
|
||||||
|
<item>ледяной парусный спорт</item>
|
||||||
|
|
||||||
|
<item>парусный спорт</item>
|
||||||
|
<item>гребля</item>
|
||||||
|
<item>каякинг</item>
|
||||||
|
<item>академическая гребля</item>
|
||||||
|
<item>моторная лодка</item>
|
||||||
|
<item>паром</item>
|
||||||
|
<item>RC лодка</item>
|
||||||
|
<item>серфинг</item>
|
||||||
|
<item>виндсерфинг</item>
|
||||||
|
<item>кайтсерфинг</item>
|
||||||
|
<item>водные лыжи</item>
|
||||||
|
<item>вейкбординг</item>
|
||||||
|
|
||||||
|
<item>самолет</item>
|
||||||
|
<item>гидроплан</item>
|
||||||
|
<item>коммерческий самолет</item>
|
||||||
|
<item>вертолет</item>
|
||||||
|
<item>воздушный шар</item>
|
||||||
|
<item>дирижабль</item>
|
||||||
|
<item>RC самолет</item>
|
||||||
|
<item>RC вертолет</item>
|
||||||
|
<item>прыжки</item>
|
||||||
|
<item>планеризм</item>
|
||||||
|
<item>дельтаплан</item>
|
||||||
|
<item>парный планеризм</item>
|
||||||
|
|
||||||
|
<item>верховая езда</item>
|
||||||
|
<item>катание на лошадях</item>
|
||||||
|
<item>прогулка на осле</item>
|
||||||
|
|
||||||
|
<item>вождение автомобиля</item>
|
||||||
|
<item>вождение автобуса</item>
|
||||||
|
<item>поезд</item>
|
||||||
|
<item>мотоцикл</item>
|
||||||
|
<item>Байк</item>
|
||||||
|
<item>ATV</item>
|
||||||
|
|
||||||
|
<item>парусный спорт на земле</item>
|
||||||
|
<item>фрисби</item>
|
||||||
|
<item>алтимат фризби</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<array name="waypoint_types">
|
||||||
|
<item>банкомат</item>
|
||||||
|
<item>банк</item>
|
||||||
|
<item>бар</item>
|
||||||
|
<item>барбекю</item>
|
||||||
|
<item>здание</item>
|
||||||
|
<item>автобусная остановка</item>
|
||||||
|
<item>кафе</item>
|
||||||
|
<item>костер</item>
|
||||||
|
<item>лагерь</item>
|
||||||
|
<item>церковь</item>
|
||||||
|
<item>кофейня</item>
|
||||||
|
<item>удобный магазин</item>
|
||||||
|
<item>питьевая вода</item>
|
||||||
|
<item>оползень</item>
|
||||||
|
<item>паром</item>
|
||||||
|
<item>камин</item>
|
||||||
|
<item>пожарная станция</item>
|
||||||
|
<item>рыболовство</item>
|
||||||
|
<item>автозаправочная станция</item>
|
||||||
|
<item>поле для гольфа</item>
|
||||||
|
<item>продуктовый магазин</item>
|
||||||
|
<item>парикмахерская</item>
|
||||||
|
<item>гавань</item>
|
||||||
|
<item>тропа</item>
|
||||||
|
<item>отель</item>
|
||||||
|
<item>дом</item>
|
||||||
|
<item>информация</item>
|
||||||
|
<item>пересечение</item>
|
||||||
|
<item>почтовый ящик</item>
|
||||||
|
<item>рынок</item>
|
||||||
|
<item>место встречи</item>
|
||||||
|
<item>опера</item>
|
||||||
|
<item>парковка</item>
|
||||||
|
<item>почтовое отделение</item>
|
||||||
|
<item>выбоина</item>
|
||||||
|
<item>полицейский участок</item>
|
||||||
|
<item>железнодорожный переезд</item>
|
||||||
|
<item>ресторан</item>
|
||||||
|
<item>покупки</item>
|
||||||
|
<item>вид</item>
|
||||||
|
<item>магазин</item>
|
||||||
|
<item>бассейн</item>
|
||||||
|
<item>телефон</item>
|
||||||
|
<item>театр</item>
|
||||||
|
<item>туалет</item>
|
||||||
|
<item>туристическая информация</item>
|
||||||
|
<item>туннель</item>
|
||||||
|
<item>дерево</item>
|
||||||
|
<item>водопад</item>
|
||||||
|
<item>фонтан</item>
|
||||||
|
<item>путевая точка</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@@ -0,0 +1,511 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2010 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Used by the Menu -->
|
||||||
|
<string name="start_recording">Запись трека</string>
|
||||||
|
<string name="stop_recording">Остановить запись</string>
|
||||||
|
<string name="switch_to_sat">Режим спутника</string>
|
||||||
|
<string name="switch_to_map">Режим карты</string>
|
||||||
|
<string name="mylocation">Мое местоположение</string>
|
||||||
|
<string name="list_tracks">Треки</string>
|
||||||
|
<string name="list_markers">Маркеры</string>
|
||||||
|
<string name="delete_all_tracks">Удалить все треки</string>
|
||||||
|
<string name="settings">Настройки</string>
|
||||||
|
<string name="elevation">Высота</string>
|
||||||
|
<string name="choose_track_message">Пожалуйста, выберите трек для просмотра</string>
|
||||||
|
<string name="current_track">Текущий трек</string>
|
||||||
|
<string name="current_segment">Последний сегмент</string>
|
||||||
|
<string name="sensor_state">Состояние датчика</string>
|
||||||
|
<string name="aggregated_stats">Совокупная статистика</string>
|
||||||
|
|
||||||
|
<!-- Error messages -->
|
||||||
|
<string name="error_no_location_manager">На этом устройстве не был обнаружен диспетчер местоположения!</string>
|
||||||
|
<string name="error_no_gps_location_provider">На этом устройстве не был обнаружен поставщик GPS местоположения.</string>
|
||||||
|
<string name="error_sending_to_mymap">Ошибка при отправке вашего трека в Google \"Мои карты\".</string>
|
||||||
|
<string name="error_sending_to_fusiontables">Ошибка при отправке вашего трека в Google Fusion Tables.</string>
|
||||||
|
<string name="error_sending_to_docs">Ошибка при отправке вашего трека в Google Документы.</string>
|
||||||
|
<string name="error_please_try_again_later">Пожалуйста, повторите попытку позже.</string>
|
||||||
|
<string name="error_unable_to_start_recording">Не удалось начать запись. Попробуйте еще раз.</string>
|
||||||
|
<string name="error_unable_to_stop_recording">Не удалось остановить запись. Попробуйте еще раз.</string>
|
||||||
|
<string name="error_unable_to_read_file">Не удалось прочитать из файла.</string>
|
||||||
|
<string name="error_invalid_gpx_format">Неверный формат GPX файла.</string>
|
||||||
|
<string name="error_generic">Произошла ошибка. Пожалуйста, попробуйте еще раз.</string>
|
||||||
|
<string name="error_track_does_not_exist">Трек не существует.</string>
|
||||||
|
<string name="error_out_of_memory">Этот файл слишком большой (должен быть меньше, чем 500 КБ). Прервано.</string>
|
||||||
|
<string name="error_unable_to_insert_marker">Невозможно вставить маркер. Местоположение неизвестно.</string>
|
||||||
|
|
||||||
|
<!-- Status messages -->
|
||||||
|
<string name="wait_for_fix">Ожидание сигнала GPS. Убедитесь в том, что вы находитесь под открытым небом.</string>
|
||||||
|
<string name="status_now_recording">Записывается новый трек.</string>
|
||||||
|
<string name="status_stopped_recording">Запись вашего трека остановлена.</string>
|
||||||
|
<string name="status_new_mymap_has_been_created">Новая Google \"Мои карты\" была создана на maps.google.com.</string>
|
||||||
|
<string name="status_new_fusiontable_has_been_created">Новая таблица Google Fusion была создана на google.com/fusiontables.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded">Твой трек был отправлен на maps.google.com.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded_to_new_doc">Ваш трек был отправлен в новую электронную таблицу на docs.google.com.</string>
|
||||||
|
<string name="status_tracks_have_been_uploaded_to_docs">Ваш трек был отправлен в docs.google.com.</string>
|
||||||
|
<string name="status_mymap_info">Это может занять несколько минут, прежде чем появятся новые треки.</string>
|
||||||
|
<string name="status_enable_gps">Пожалуйста, нажмите здесь для перехода к разделу настроек Координаты и отметьте пункт \"Спутники GPS\". Для возвращения нажмите кнопку Назад.</string>
|
||||||
|
<string name="status_approximate_location">Примечание: приблизительное местоположение определено относительно вышек сотовой связи и беспроводных сетей.</string>
|
||||||
|
<string name="status_no_location">В настоящее время местоположение не может быть определено. Включите больше источников местоположение (см. раздел настроек Координаты) и убедитесь в том, что находитесь под открытым небом. Повторите попытку позднее.</string>
|
||||||
|
<string name="status_waypoint_inserted">Маркер путевой точки был вставлен.</string>
|
||||||
|
<string name="status_statistics_inserted">Маркер статистики был вставлен.</string>
|
||||||
|
<string name="status_track_upload_status">Статус загрузки:</string>
|
||||||
|
|
||||||
|
<!-- Progress dialog -->
|
||||||
|
<string name="progress_title">Пожалуйста, подождите...</string>
|
||||||
|
<string name="progress_message">Отправка вашего трека в Google.</string>
|
||||||
|
<string name="progress_message_reading_track">Чтение трека...</string>
|
||||||
|
<string name="progress_message_preparing_track">Подготовка трека...</string>
|
||||||
|
<string name="progress_message_authenticating_fusiontables">Аутентификация на Google Fusion Tables...</string>
|
||||||
|
<string name="progress_message_authenticating_mymaps">Аутентификация на Google Карты...</string>
|
||||||
|
<string name="progress_message_authenticating_docs">Аутентификация в Google Документы...</string>
|
||||||
|
<string name="progress_message_sending_docs">Отправка трека в Google Документы...</string>
|
||||||
|
<string name="progress_message_sending_mymaps">Отправка трека в Google Карты...</string>
|
||||||
|
<string name="progress_message_creating_map">Создание новой \"Моей карты\" ...</string>
|
||||||
|
<string name="progress_message_sending_fusiontables">Отправка трека в Fusion Tables...</string>
|
||||||
|
<string name="progress_message_creating_fusiontable">Создание новой Fusion table...</string>
|
||||||
|
<string name="import_progress_message">Импорт GPS трека. Это может занять некоторое время.</string>
|
||||||
|
<string name="write_progress_message">Запись файла на SD карту. Это может занять некоторое время.</string>
|
||||||
|
<string name="progress_message_updating_track">Обновление статистики трека...</string>
|
||||||
|
|
||||||
|
<!-- Used by DeleteAllDataHandler -->
|
||||||
|
<string name="are_you_sure_question">Вы уверены?</string>
|
||||||
|
<string name="all_data_will_be_permanently_deleted">Все треки и маркеры будут удалены с этого телефона.</string>
|
||||||
|
<string name="track_will_be_permanently_deleted">Трек и его маркеры будут удалены из этого телефона.</string>
|
||||||
|
<string name="marker_will_be_permanently_deleted">Маркер будет удален с этого телефона.</string>
|
||||||
|
|
||||||
|
<!-- Text and links when uploading to Google Fusion Tables -->
|
||||||
|
<string name="new_map_description">Создано My Tracks на Android.</string>
|
||||||
|
<string name="fusiontable_link">Создано <a href=\'http://mytracks.appspot.com\'>My Tracks</a> на Android.</string>
|
||||||
|
|
||||||
|
<!-- Text and links when uploading to Google My Maps -->
|
||||||
|
<string name="my_map_link">Создано <a href=\'http://mytracks.appspot.com\'>My Tracks</a> на Android.</string>
|
||||||
|
<string name="new_map_title">Новая карта</string>
|
||||||
|
|
||||||
|
<!-- Formatting of track and marker descriptions -->
|
||||||
|
<string name="points">Точки</string>
|
||||||
|
<string name="recorded_date">Записан</string>
|
||||||
|
<string name="category">Тип деятельности</string>
|
||||||
|
<string name="waypoint_category">Тип маркера</string>
|
||||||
|
<string name="part">(Часть %d)</string>
|
||||||
|
|
||||||
|
<!-- Used by the track recording service -->
|
||||||
|
<string name="recording_your_track">Запись трека...</string>
|
||||||
|
<string name="new_track">Трек %d</string>
|
||||||
|
|
||||||
|
<!-- Common -->
|
||||||
|
<string name="no">Нет</string>
|
||||||
|
<string name="yes">Да</string>
|
||||||
|
<string name="ok">ОК</string>
|
||||||
|
<string name="error">Ошибка</string>
|
||||||
|
<string name="success">Готово</string>
|
||||||
|
<string name="waypoint">Путевая точка</string>
|
||||||
|
<string name="license">Лицензия</string>
|
||||||
|
<string name="cancel">Отмена</string>
|
||||||
|
<string name="close">Закрыть</string>
|
||||||
|
<string name="edit">Правка</string>
|
||||||
|
<string name="save">Сохранить</string>
|
||||||
|
|
||||||
|
<!-- Placemark labels for start and end of track -->
|
||||||
|
<string name="start">(Старт)</string>
|
||||||
|
<string name="end">(Конец)</string>
|
||||||
|
|
||||||
|
<!-- TrackList -->
|
||||||
|
<string name="tracklist_show_track">Показать</string>
|
||||||
|
<string name="tracklist_send_to_mymaps">Отправить в Google \"Мои карты\"</string>
|
||||||
|
<string name="tracklist_send_to_new_mymap">Отправить в новый Google \"Мои карты\"</string>
|
||||||
|
<string name="tracklist_send_to_fusiontables">Отправить в Google Fusion Tables</string>
|
||||||
|
<string name="tracklist_send_to_new_fusiontable">Отправить в новую Google Fusion Table</string>
|
||||||
|
<string name="tracklist_send_to_docs">Отправить в Google Документы</string>
|
||||||
|
<string name="tracklist_send_to_google">Отправить в Google ...</string>
|
||||||
|
<string name="tracklist_delete_track">Удалить из телефона...</string>
|
||||||
|
<string name="tracklist_edit_track">Править детали</string>
|
||||||
|
<string name="tracklist_write_to_sd">Записать на SD карту...</string>
|
||||||
|
<string name="tracklist_save_as_gpx">Сохранить файл GPX</string>
|
||||||
|
<string name="tracklist_save_as_kml">Сохранить файл KML</string>
|
||||||
|
<string name="tracklist_save_as_csv">Сохранить файл CSV</string>
|
||||||
|
<string name="tracklist_save_as_tcx">Сохранить файл TCX</string>
|
||||||
|
<string name="tracklist_btn_send_all_to_fusiontables">Отправить в Google Fusion Tables</string>
|
||||||
|
<string name="tracklist_btn_send_all_to_mymaps">Отправить в Google \"Мои карты\"</string>
|
||||||
|
<string name="tracklist_btn_delete_all">Удалить все</string>
|
||||||
|
<!-- Export All -->
|
||||||
|
<string name="tracklist_btn_export_all">Экспорт всех</string>
|
||||||
|
<string name="export_done">Экспорт закончен</string>
|
||||||
|
<string name="tracklist_pick_one">Выберите трек. Нажмите и удерживайте для получения дополнительных возможностей.</string>
|
||||||
|
<string name="tracklist_all_tracks">Все треки:</string>
|
||||||
|
<string name="tracklist_this_track">Этот трек</string>
|
||||||
|
<string name="tracklist_share_track">Поделиться с друзьями...</string>
|
||||||
|
<string name="tracklist_share_link">Ссылка на карту</string>
|
||||||
|
<string name="tracklist_share_gpx_file">Файл GPX</string>
|
||||||
|
<string name="tracklist_share_kml_file">Файл KML</string>
|
||||||
|
<string name="tracklist_share_csv_file">Файла CSV</string>
|
||||||
|
<string name="tracklist_share_tcx_file">Файл TCX</string>
|
||||||
|
<string name="tracklist_clear_map">Очистить карту</string>
|
||||||
|
<!-- Import All -->
|
||||||
|
<string name="tracklist_btn_import_all">Импорт всех</string>
|
||||||
|
<!-- Format:
|
||||||
|
$1 : Successful imports
|
||||||
|
$2 : Attempted imports
|
||||||
|
$3 : MyTracks gpx path
|
||||||
|
-->
|
||||||
|
<string name="import_multi_done">Импортировано %1$d из %2$d GPX файлов с %3$s</string>
|
||||||
|
<string name="import_multi_empty">GPX файлы не найденны в %s. Возможно не читается SD-карта или каталог не содержит GPX файлы.</string>
|
||||||
|
<string name="import_error">Ошибка импорта файла %s</string>
|
||||||
|
|
||||||
|
<!-- Waypoints list -->
|
||||||
|
<string name="waypointslist_btn_delete_all">Удалить все маркеры</string>
|
||||||
|
<string name="waypointslist_this_waypoint">Этот маркер</string>
|
||||||
|
<string name="waypointslist_delete_waypoint">Удалить</string>
|
||||||
|
<string name="waypointslist_edit_waypoint">Править детали</string>
|
||||||
|
<string name="waypointslist_show_waypoint">Показать на карте</string>
|
||||||
|
<string name="waypointslist_btn_insert_waypoint">Вставить путевую точку</string>
|
||||||
|
<string name="waypointslist_btn_insert_statistics">Вставить статистику</string>
|
||||||
|
<string name="waypointslist_pick_one">Выберите маркер. Нажмите и удерживайте для получения дополнительных возможностей.</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Details -->
|
||||||
|
<string name="trackdetails_title">Трек детали</string>
|
||||||
|
<string name="trackdetails_name">Название трека</string>
|
||||||
|
<string name="trackdetails_name_hint">Название трека</string>
|
||||||
|
<string name="trackdetails_description">Описание трека</string>
|
||||||
|
<string name="trackdetails_description_hint">Описание трека</string>
|
||||||
|
<string name="trackdetails_category">Тип деятельности (например: пешая прогулка, велосипедная прогулка, бег, восхождение...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Тип деятельности</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Waypoint Details -->
|
||||||
|
<string name="waypointdetails_title">Маркер детали</string>
|
||||||
|
<string name="waypointdetails_name">Имя маркера</string>
|
||||||
|
<string name="waypointdetails_name_hint">Имя маркера</string>
|
||||||
|
<string name="waypointdetails_description">Описание маркера</string>
|
||||||
|
<string name="waypointdetails_description_hint">Описание маркера</string>
|
||||||
|
<string name="waypointdetails_category">Тип маркера (например: здание, выбоина, достопримечательность...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Тип маркера</string>
|
||||||
|
|
||||||
|
<!-- MyTracks Settings -->
|
||||||
|
<string name="mytracks_settings">Настройки My Tracks</string>
|
||||||
|
<string name="settings_display">Отображение</string>
|
||||||
|
<string name="settings_recording">Запись</string>
|
||||||
|
<string name="settings_sharing">Обмен</string>
|
||||||
|
|
||||||
|
<string name="settings_not_available_summary">Не доступен в вашем версии Android</string>
|
||||||
|
<string name="settings_not_while_recording">Не доступно во время записи трека</string>
|
||||||
|
|
||||||
|
<string name="settings_announcement_frequency">Частота объявлений</string>
|
||||||
|
<string name="settings_announcement_frequency_summary">Минимальное время между двумя голосовыми объявлениями</string>
|
||||||
|
|
||||||
|
<string name="settings_min_recording_distance">Минимальное расстояние между точками</string>
|
||||||
|
<string name="settings_min_recording_distance_summary">Наименьшее расстояние между двумя записями вашей позиции</string>
|
||||||
|
|
||||||
|
<string name="settings_max_recording_distance">Максимальное расстояние между точками</string>
|
||||||
|
<string name="settings_max_recording_distance_summary">Если два пункта находятся дальше, чем указано, то трек будет разделен</string>
|
||||||
|
|
||||||
|
<string name="settings_min_recording_interval">Минимальное время между точками</string>
|
||||||
|
<string name="settings_min_recording_interval_summary">Наименьший интервал времени между двумя записями вашей позиции</string>
|
||||||
|
|
||||||
|
<string name="settings_min_required_accuracy">Минимальная точность</string>
|
||||||
|
<string name="settings_min_required_accuracy_summary">Запись будет приостановлена, если ваша позиция не является достаточно точной</string>
|
||||||
|
|
||||||
|
<string name="settings_metric_units">Использовать метрические единицы</string>
|
||||||
|
<string name="settings_metric_units_summary_on">Все расстояния будут отображаться в метрических единицах</string>
|
||||||
|
<string name="settings_metric_units_summary_off">Все расстояния будут отображаться в имперских единицах</string>
|
||||||
|
|
||||||
|
<string name="settings_map_public">Обнародовать карты</string>
|
||||||
|
<string name="settings_map_public_summary_on">Загруженные карты будут общедоступны на maps.google.com</string>
|
||||||
|
<string name="settings_map_public_summary_off">Загруженные карты не будут перечислены публично на maps.google.com</string>
|
||||||
|
|
||||||
|
<string name="settings_report_speed_or_pace">Отображать скорость</string>
|
||||||
|
<string name="settings_report_speed_or_pace_summary_on">Скорость будет отображаться</string>
|
||||||
|
<string name="settings_report_speed_or_pace_summary_off">Темп будет отображаться</string>
|
||||||
|
|
||||||
|
<string name="settings_share_url_only">Поделиться только URL</string>
|
||||||
|
<string name="settings_share_url_only_summary_on">При обмене будет отправлен только URL-адрес</string>
|
||||||
|
<string name="settings_share_url_only_summary_off">Содержимое трека будет также включено при обмене</string>
|
||||||
|
|
||||||
|
<string name="settings_split_frequency">Частота деления</string>
|
||||||
|
<string name="settings_split_frequency_summary">Максимальное время или расстояние, после которого будет вставлен новый маркер деления</string>
|
||||||
|
|
||||||
|
<string name="settings_auto_resume_track_timeout">Автоматическое возобновление трек тайм-аут</string>
|
||||||
|
<string name="settings_auto_resume_track_timeout_summary">Максимальное время в минутах, после которого предыдущая запись трека не будет возобновлена на перезагруженном телефоне</string>
|
||||||
|
|
||||||
|
<string name="settings_timestamp_track_name">Штамп времени как название дорожки</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_on">По умолчанию имя трека будет складываться из даты и времени старта трека</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_off">Названия треков будут иметь прирост чисел для каждого нового трека.</string>
|
||||||
|
|
||||||
|
<string name="settings_reset">Восстановить значения по умолчанию</string>
|
||||||
|
<string name="settings_reset_summary">Восстановить значения по умолчанию во всех настройках</string>
|
||||||
|
<string name="settings_reset_dialog_message">Все ваши настройки будут стерты и восстановлены значения по умолчанию. Записанные треки будут сохранены. Вы уверены?</string>
|
||||||
|
<string name="settings_reset_done">Все настройки были возвращены к значениям по умолчанию.</string>
|
||||||
|
|
||||||
|
<string name="pace_label">Темп</string>
|
||||||
|
|
||||||
|
<string name="eclair_required">Поддерживается только в Android 2.0 или выше</string>
|
||||||
|
<string name="settings_sensor_type">Тип датчика</string>
|
||||||
|
<string name="settings_sensor_type_summary">Тип подключенного датчика</string>
|
||||||
|
<string name="settings_heart_rate_ant_sensor_id">Очистить ANT подсоединенного датчика пульса</string>
|
||||||
|
<string name="settings_power_ant_sensor_id">Очистить ANT подсоединенного датчика мощности</string>
|
||||||
|
<string name="settings_srm_bridge_ant_sensor_id">Очистить ANT подсоединенного датчика SRM</string>
|
||||||
|
<string name="settings_ant_not_paired">ANT датчик не подсоединен</string>
|
||||||
|
<string name="settings_ant_paired">ANT датчик подсоединен с: %d</string>
|
||||||
|
<string name="bluetooth_sensor_title">Bluetooth датчик</string>
|
||||||
|
<string name="bluetooth_sensor_summary">Подключенный bluetooth датчик</string>
|
||||||
|
<string name="settings_modular_stats_display_title">Отображение модульной статистики</string>
|
||||||
|
|
||||||
|
<!-- Backups -->
|
||||||
|
<string name="settings_backup">Резервное копирование (BETA)</string>
|
||||||
|
<string name="settings_sd_backup">Резервное копирование SD карты</string>
|
||||||
|
<string name="settings_backup_to_sd">Резервировать</string>
|
||||||
|
<string name="settings_backup_to_sd_summary">Создать полную копию всех ваших треков и настроек на SD карту</string>
|
||||||
|
<string name="settings_restore_from_sd">Восстановить</string>
|
||||||
|
<string name="settings_restore_from_sd_summary">Восстановить все треки и параметры с SD карты</string>
|
||||||
|
|
||||||
|
<string name="restore_overwrites_warning">Восстановление резервной копии с SD карты ПЕРЕЗАПИШЕТ все текущие треки и настройки. Вы уверены?</string>
|
||||||
|
<string name="select_backup_to_restore">Выберите резервную копию для восстановления</string>
|
||||||
|
<string name="no_backups">Резервные копии не найдены.</string>
|
||||||
|
<string name="backup_write_progress_message">Запись на SD-карту всех треков и настроек. Это может занять некоторое время...</string>
|
||||||
|
<string name="backup_import_progress_message">Чтение всех треков и настроек с SD-карты. Это может занять некоторое время...</string>
|
||||||
|
|
||||||
|
<!-- MyTracksSky -->
|
||||||
|
<string name="mytracks_sky">Спутники GPS</string>
|
||||||
|
|
||||||
|
<!-- My Maps -->
|
||||||
|
<string name="select_map_message">Выберите карту из вашей учетной записи:</string>
|
||||||
|
<string name="create_new_map">Создать новую карту...</string>
|
||||||
|
<string name="map_list_title">Отправить в Google \"Мои карты\"</string>
|
||||||
|
<string name="maps_list_loading">Загрузка карты ...</string>
|
||||||
|
<string name="maps_list_failed">Ваши карты не могут быть загружены в данный момент!</string>
|
||||||
|
<string name="open_map">Выберите эту карту</string>
|
||||||
|
<string name="edit_map_details">Править детали карты</string>
|
||||||
|
<string name="share_track">Поделиться треком</string>
|
||||||
|
<string name="delete_map">Удалить Карту из вашей учетной записи</string>
|
||||||
|
<string name="map_title">Название карты:</string>
|
||||||
|
<string name="map_description">Описание карты:</string>
|
||||||
|
<string name="map_searchable_edit">Сделать чтобы карта и ее содержимое отображались в результатах поиска</string>
|
||||||
|
<string name="map_not_searchable_edit">Не позволить этой карте или ее содержимому отображаться в результатах поиска, хотя они все еще могут просматриваться другими через прямой URL-адрес</string>
|
||||||
|
<string name="map_searchable">Эта карта и ее содержимое будут отображаться в результатах поиска</string>
|
||||||
|
<string name="map_not_searchable">Ни эта карта, ни ее содержимое не будут отображаться в результатах поиска, но их могут по-прежнему просматривать другие через прямую ссылку</string>
|
||||||
|
|
||||||
|
<!-- Sharing -->
|
||||||
|
<string name="share_map">Поделиться картой с друзьями</string>
|
||||||
|
<string name="share_map_subject">Я хотел бы поделиться с вами треком</string>
|
||||||
|
<string name="share_map_body_format">Я думаю, вы можете быть заинтересованы в этом треке:
|
||||||
|
|
||||||
|
%s</string>
|
||||||
|
<string name="send_track_subject">Я хотел бы поделиться с вами треком</string>
|
||||||
|
<string name="send_track_body_format">Я думаю, вы можете быть заинтересованы в этом треке.
|
||||||
|
|
||||||
|
Просмотреть трек можно с помощью Google Планета Земля или другого программного обоспечения для карт.</string>
|
||||||
|
|
||||||
|
<!-- Visibility -->
|
||||||
|
<string name="public_map">Общественные</string>
|
||||||
|
<string name="unlisted_map">Частные</string>
|
||||||
|
<string name="mapslist_no_maps_available">У вас пока еще нет карт.</string>
|
||||||
|
|
||||||
|
<!-- Statistics View -->
|
||||||
|
<!-- Average Moving -->
|
||||||
|
<string name="average_moving_speed_label">Средняя скорость движения</string>
|
||||||
|
<string name="average_moving_pace_label">Средний темп движения</string>
|
||||||
|
|
||||||
|
<!-- Average -->
|
||||||
|
<string name="average_speed_label">Средняя скорость</string>
|
||||||
|
<string name="average_pace_label">Средний темп</string>
|
||||||
|
|
||||||
|
<string name="elevation_chart_name">Диаграмма высоты</string>
|
||||||
|
<string name="elevation_gain_label">Набор высоты</string>
|
||||||
|
<string name="elevation_label">Высота</string>
|
||||||
|
<string name="latitude_label">Широта</string>
|
||||||
|
<string name="longitude_label">Долгота</string>
|
||||||
|
|
||||||
|
<!-- Min -->
|
||||||
|
<string name="min_elevation_label">Минимальная высота</string>
|
||||||
|
<string name="min_grade_label">Минимальный уклон</string>
|
||||||
|
<string name="min_pace_label">Минимальный темп</string>
|
||||||
|
|
||||||
|
<!-- Max -->
|
||||||
|
<string name="max_elevation_label">Максимальная высота</string>
|
||||||
|
<string name="max_grade_label">Максимальный уклон</string>
|
||||||
|
<string name="max_speed_label">Максимальная скорость</string>
|
||||||
|
|
||||||
|
<string name="loading_track">Загрузка трека...</string>
|
||||||
|
|
||||||
|
<!-- Chart Settings -->
|
||||||
|
<string name="chart_settings">Настройки диаграммы</string>
|
||||||
|
<!-- X Axis -->
|
||||||
|
<string name="x_axis">Ось X</string>
|
||||||
|
<string name="by_distance">По расстоянию</string>
|
||||||
|
<string name="by_time">По времени</string>
|
||||||
|
|
||||||
|
<!-- Y Axis -->
|
||||||
|
<string name="y_axis">Ось Y</string>
|
||||||
|
|
||||||
|
<!-- Units -->
|
||||||
|
<!-- Time -->
|
||||||
|
<string name="hour">час</string>
|
||||||
|
<string name="hours">часов</string>
|
||||||
|
<string name="hr">ч</string>
|
||||||
|
<string name="min">мин</string>
|
||||||
|
<string name="minute">минута</string>
|
||||||
|
<string name="minutes">минут</string>
|
||||||
|
<string name="second">секунда</string>
|
||||||
|
<string name="seconds">секунд</string>
|
||||||
|
<string name="milliseconds">мс</string>
|
||||||
|
|
||||||
|
<!-- Distance -->
|
||||||
|
<string name="meter">м</string>
|
||||||
|
<string name="kilometer">км</string>
|
||||||
|
<string name="kilometers_long">километров</string>
|
||||||
|
<string name="feet">футов</string>
|
||||||
|
<string name="mile">миль</string>
|
||||||
|
<string name="miles_long">мили</string>
|
||||||
|
|
||||||
|
<!-- Speed and Pace -->
|
||||||
|
<string name="kilometer_per_hour">км/ч</string>
|
||||||
|
<string name="kilometer_per_hour_long">километров в час</string>
|
||||||
|
<string name="min_per_kilometer">мин/км</string>
|
||||||
|
<string name="per_kilometer">за километр</string>
|
||||||
|
<string name="mile_per_hour">миль/ч</string>
|
||||||
|
<string name="mile_per_hour_long">миль в час</string>
|
||||||
|
<string name="min_per_mile">мин/миля</string>
|
||||||
|
<string name="per_mile">за милю</string>
|
||||||
|
|
||||||
|
<!-- Sensors -->
|
||||||
|
<string name="watts">Вт</string>
|
||||||
|
|
||||||
|
<string name="revolutions_per_minute">об/мин</string>
|
||||||
|
<string name="bpm">bpm</string>
|
||||||
|
|
||||||
|
<!-- Stats Labels -->
|
||||||
|
<string name="moving_time_label">Время движения</string>
|
||||||
|
<string name="total_time_label">Общее время</string>
|
||||||
|
<string name="time_label">Время</string>
|
||||||
|
<string name="sd_unavail">SD карта недоступна</string>
|
||||||
|
<string name="speed">Скорость</string>
|
||||||
|
<string name="start_trip">Вы должны начать путешествие.</string>
|
||||||
|
<string name="statistics">Статистика</string>
|
||||||
|
<string name="total_distance_label">Общее расстояние</string>
|
||||||
|
<string name="distance_label">Расстояние</string>
|
||||||
|
<string name="power">Мощность</string>
|
||||||
|
<string name="cadence">Каденс</string>
|
||||||
|
<string name="heart_rate">Пульс</string>
|
||||||
|
<string name="max_heart_rate">Максимальный пульс</string>
|
||||||
|
<string name="unknown">-</string>
|
||||||
|
<string name="waiting">Ожидание...</string>
|
||||||
|
|
||||||
|
<!-- End User License Agreement -->
|
||||||
|
<string name="eula_title">Лицензионное соглашение</string>
|
||||||
|
<string name="accept">Принять</string>
|
||||||
|
<string name="decline">Отклонить</string>
|
||||||
|
|
||||||
|
<!-- About -->
|
||||||
|
<string name="about">О программе</string>
|
||||||
|
<string name="help">Справка</string>
|
||||||
|
<string name="about_team">Команда:</string>
|
||||||
|
<string name="about_version">Версия:</string>
|
||||||
|
<string name="about_support">Поддержка:</string>
|
||||||
|
<string name="about_privacy">Приватность:</string>
|
||||||
|
|
||||||
|
<!-- Send to Google -->
|
||||||
|
<string name="sendtogoogle_title">Отправить...</string>
|
||||||
|
<string name="sendtogoogle_google_fusiontables">Google Fusion Tables</string>
|
||||||
|
<string name="sendtogoogle_google_mymaps">Google \"Мои карты\"</string>
|
||||||
|
<string name="sendtogoogle_google_docs">Google Документы</string>
|
||||||
|
<string name="sendtogoogle_send_now">Отправить</string>
|
||||||
|
<string name="sendtogoogle_create_new_map">Создать новую карту</string>
|
||||||
|
<string name="sendtogoogle_pick_existing_map">Выбрать существующую карту</string>
|
||||||
|
<string name="sendtogoogle_send_stats">Отправить статистику трека</string>
|
||||||
|
<string name="sendtogoogle_send_stats_and_points">Отправить статистику и точки</string>
|
||||||
|
|
||||||
|
<!-- Getting the account to upload to. -->
|
||||||
|
<string name="no_account_found_title">Учетная запись не найдена</string>
|
||||||
|
<string name="no_account_found">Не найдена учетная запись для загрузки треков.</string>
|
||||||
|
<string name="choose_account_title">Выбор учетной записи</string>
|
||||||
|
|
||||||
|
<!-- SD card -->
|
||||||
|
<string name="io_no_external_storage_found">Не обнаружено внешнее устройство хранения данных. Убедитесь, что SD карта вставлена, и что ваш телефон не подключен к компьютеру.</string>
|
||||||
|
<string name="io_write_failed">Невозможно записать файл.</string>
|
||||||
|
<string name="io_read_failed">Невозможно прочитать из файла.</string>
|
||||||
|
<string name="io_create_dir_failed">Невозможно создать папку на SD карте.</string>
|
||||||
|
<string name="io_write_finished">Запись на SD карту закончена.</string>
|
||||||
|
<string name="io_read_finished">Чтение с SD карты закончено.</string>
|
||||||
|
|
||||||
|
<!-- VersionChecker -->
|
||||||
|
<string name="version_check_title">Проверить обновления</string>
|
||||||
|
<string name="version_check_upgrade_button">Обновить сейчас</string>
|
||||||
|
<string name="version_check_continue_button">Продолжить без обновления</string>
|
||||||
|
<string name="upgrade_required">Ваша версия %1$S больше не может работать должным образом, и больше не поддерживается. Обновите %1$s для продолжения использования.</string>
|
||||||
|
<string name="upgrade_recommended">Ваша версия %1$S больше не может работать должным образом. Вы можете обновить ее сейчас, либо продолжать использовать ее на свой страх и риск. Некоторые функции, такие как синхронизация с сервером может не функционировать до обновления.</string>
|
||||||
|
<string name="upgrade_available">Доступна новая версия %1$s. Вы можете продолжать использовать текущую версию без проблем, но вы не получите новейшие функции, до тех пор, пока не обновитесь.</string>
|
||||||
|
|
||||||
|
<!-- Welcome -->
|
||||||
|
<string name="welcome">Добро пожаловать</string>
|
||||||
|
<string name="welcome_read_later">Ок</string>
|
||||||
|
<string name="welcome_about">О My Tracks</string>
|
||||||
|
|
||||||
|
<!-- Announcement -->
|
||||||
|
<string name="announce_no_distance">My Tracks нет расстояния</string>
|
||||||
|
<!-- Format:
|
||||||
|
$1 : Distance label
|
||||||
|
$2 : Distance value (5)
|
||||||
|
$3 : Distance units (mi, km)
|
||||||
|
$4 : Time description (10 minutes 5 seconds)
|
||||||
|
$5 : Speed value (5.6) : Pace value (5 minutes 6 seconds)
|
||||||
|
$6 : Speed units (mph) : Pace units (per mile)
|
||||||
|
-->
|
||||||
|
<string name="announce_template">Мои треки %1$s %2$.2f %3$s в %4$s на %5$s %6$s</string>
|
||||||
|
|
||||||
|
<!-- Check Units -->
|
||||||
|
<string name="check_units_title">Единицы измерения обратите внимание</string>
|
||||||
|
<string name="check_units_message">По умолчанию используются метрические единицы. Вы хотели бы изменить этот параметр?</string>
|
||||||
|
|
||||||
|
<!-- Fake preference keys - never saved, but show options in the preferences screen -->
|
||||||
|
<string name="method_bluetooth">Bluetooth</string>
|
||||||
|
<string name="bluetooth_options">Параметры Bluetooth</string>
|
||||||
|
<string name="bluetooth_pairing">Подключение устройства</string>
|
||||||
|
<string name="bluetooth_pairing_summary">Открыть настройки Android по bluetooth для подключения устройства</string>
|
||||||
|
<string name="sensor_bluetooth_options_key">bluetoothSensorsEnabled</string>
|
||||||
|
<string name="ant_options">Параметры ANT</string>
|
||||||
|
<string name="sensor_options">Параметры датчика</string>
|
||||||
|
|
||||||
|
<!-- Bluetooth Sensor -->
|
||||||
|
<string name="bluetooth_connected">Подключен к %s</string>
|
||||||
|
<string name="bluetooth_connecting">Подключение Bluetooth датчика...</string>
|
||||||
|
<string name="bluetooth_not_connected">Bluetooth датчик не подключен</string>
|
||||||
|
|
||||||
|
<!-- Sensor State -->
|
||||||
|
<string name="sensor_data_time">Датчик времени</string>
|
||||||
|
<string name="power_meter_enabled">Измеритель мощности включен</string>
|
||||||
|
<string name="heart_rate_monitor_enabled">Монитор пульса включен</string>
|
||||||
|
<string name="no_sensor_manager">Нет диспетчера датчиков</string>
|
||||||
|
<string name="enabled">Включено</string>
|
||||||
|
<string name="connecting">Подключение</string>
|
||||||
|
<string name="connected">Подключено</string>
|
||||||
|
<string name="disconnected">Отключено</string>
|
||||||
|
<string name="no_sensor_service">Нет службы датчиков</string>
|
||||||
|
<string name="searching">Поиск</string>
|
||||||
|
<string name="sending">Отправка</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">Нет</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ Датчик</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ Bridge</string>
|
||||||
|
|
||||||
|
<!-- Manifest description (not seen inside the app) -->
|
||||||
|
<string name="notification_permission_label">получать уведомления о записи трека</string>
|
||||||
|
<string name="read_tracks_permission_label">чтение записанных данных трека</string>
|
||||||
|
<string name="write_tracks_permission_label">запись данных трека, старт/стоп записи треков</string>
|
||||||
|
<string name="notification_permission_description">Получать уведомления, при старте или останове записи трека.</string>
|
||||||
|
<string name="read_tracks_permission_description">Иметь возможность читать данные трека, такие как точки и путевые точки.</string>
|
||||||
|
<string name="write_tracks_permission_description">Иметь возможность записать данные трека, такие как начало записи или добавление путевых точек.</string>
|
||||||
|
</resources>
|
||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Av</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -67,7 +55,6 @@ limitations under the License.
|
|||||||
<item>3.1 miles</item>
|
<item>3.1 miles</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording interval -->
|
<!-- Minimum recording interval -->
|
||||||
<string-array name="min_recording_interval_options">
|
<string-array name="min_recording_interval_options">
|
||||||
<item>batterioptimerad (anpassningsbar)</item>
|
<item>batterioptimerad (anpassningsbar)</item>
|
||||||
@@ -113,9 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 miles (dålig GPS-signal)</item>
|
<item>3.1 miles (dålig GPS-signal)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>Ingen delning</item>
|
<item>Av</item>
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -131,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>Ingen delning</item>
|
<item>Av</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
|
|||||||
@@ -149,14 +149,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Spårdetaljer</string>
|
<string name="trackdetails_title">Spårdetaljer</string>
|
||||||
<string name="trackdetails_name">Spårnamn</string>
|
<string name="trackdetails_name">Spårnamn</string>
|
||||||
|
<string name="trackdetails_name_hint">Spårnamn</string>
|
||||||
<string name="trackdetails_description">Spårbeskrivning</string>
|
<string name="trackdetails_description">Spårbeskrivning</string>
|
||||||
|
<string name="trackdetails_description_hint">Spårbeskrivning</string>
|
||||||
<string name="trackdetails_category">Aktivitetstyp (t ex vandring, cyckling, löpning, klättring...)</string>
|
<string name="trackdetails_category">Aktivitetstyp (t ex vandring, cyckling, löpning, klättring...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Aktivitetstyp</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Markördetaljer</string>
|
<string name="waypointdetails_title">Markördetaljer</string>
|
||||||
<string name="waypointdetails_name">Markörnamn</string>
|
<string name="waypointdetails_name">Markörnamn</string>
|
||||||
|
<string name="waypointdetails_name_hint">Markörnamn</string>
|
||||||
<string name="waypointdetails_description">Markörbeskrivning</string>
|
<string name="waypointdetails_description">Markörbeskrivning</string>
|
||||||
|
<string name="waypointdetails_description_hint">Markörbeskrivning</string>
|
||||||
<string name="waypointdetails_category">Markörtyp (e.g. byggnad, grop, sevärdhet...)</string>
|
<string name="waypointdetails_category">Markörtyp (e.g. byggnad, grop, sevärdhet...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Markörtyp</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">My Tracks inställningar</string>
|
<string name="mytracks_settings">My Tracks inställningar</string>
|
||||||
|
|||||||
@@ -15,18 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>关闭</item>
|
|
||||||
<item>1 分钟</item>
|
|
||||||
<item>2 分钟</item>
|
|
||||||
<item>5 分钟</item>
|
|
||||||
<item>10 分钟</item>
|
|
||||||
<item>15 分钟</item>
|
|
||||||
<item>30 分钟</item>
|
|
||||||
<item>60 分钟</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 米</item>
|
<item>1 米</item>
|
||||||
@@ -112,9 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 英里 (糟糕的 GPS 信号)</item>
|
<item>3.1 英里 (糟糕的 GPS 信号)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Split frequency -->
|
<!-- Task frequency -->
|
||||||
<string-array name="split_frequency_options">
|
<string-array name="task_frequency_options">
|
||||||
<item>不分割</item>
|
<item>关闭</item>
|
||||||
<item>100 千米</item>
|
<item>100 千米</item>
|
||||||
<item>50 千米</item>
|
<item>50 千米</item>
|
||||||
<item>25 千米</item>
|
<item>25 千米</item>
|
||||||
@@ -130,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 分钟</item>
|
<item>1 分钟</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>不分割</item>
|
<item>关闭</item>
|
||||||
<item>100 英里</item>
|
<item>100 英里</item>
|
||||||
<item>50 英里</item>
|
<item>50 英里</item>
|
||||||
<item>25 英里</item>
|
<item>25 英里</item>
|
||||||
@@ -155,6 +143,7 @@ limitations under the License.
|
|||||||
<item>15 分钟</item>
|
<item>15 分钟</item>
|
||||||
<item>总是</item>
|
<item>总是</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Other non-preference arrays -->
|
<!-- Other non-preference arrays -->
|
||||||
<array name="activity_types">
|
<array name="activity_types">
|
||||||
<item>未知</item>
|
<item>未知</item>
|
||||||
@@ -181,6 +170,11 @@ limitations under the License.
|
|||||||
<item>轮滑</item>
|
<item>轮滑</item>
|
||||||
<item>滑板</item>
|
<item>滑板</item>
|
||||||
|
|
||||||
|
<item>滚轮滑雪 (传统)</item>
|
||||||
|
<item>滚轮滑雪 (滑板)</item>
|
||||||
|
<item>越野滑雪 (传统)</item>
|
||||||
|
<item>越野滑雪 (滑板)</item>
|
||||||
|
|
||||||
<item>雪攀</item>
|
<item>雪攀</item>
|
||||||
<item>滑雪</item>
|
<item>滑雪</item>
|
||||||
<item>雪板</item>
|
<item>雪板</item>
|
||||||
|
|||||||
@@ -29,19 +29,23 @@ limitations under the License.
|
|||||||
<string name="choose_track_message">请选择要查看的轨迹</string>
|
<string name="choose_track_message">请选择要查看的轨迹</string>
|
||||||
<string name="current_track">当前轨迹</string>
|
<string name="current_track">当前轨迹</string>
|
||||||
<string name="current_segment">上一段轨迹</string>
|
<string name="current_segment">上一段轨迹</string>
|
||||||
|
<string name="sensor_state">感应器状态</string>
|
||||||
<string name="aggregated_stats">累积统计</string>
|
<string name="aggregated_stats">累积统计</string>
|
||||||
|
|
||||||
<!-- Error messages -->
|
<!-- Error messages -->
|
||||||
<string name="error_no_location_manager">此设备上没有位置管理器!</string>
|
<string name="error_no_location_manager">此设备上没有位置管理器!</string>
|
||||||
<string name="error_no_gps_location_provider">此设备上没有 GPS 定位装置.</string>
|
<string name="error_no_gps_location_provider">此设备上没有 GPS 定位装置.</string>
|
||||||
<string name="error_sending_to_fusiontables">发送你的轨迹到 Google Fusion Tables 时发生错误. 请稍后重试.</string>
|
<string name="error_sending_to_mymap">发送轨迹到 Google My Map 时发生错误.</string>
|
||||||
<string name="error_sending_to_docs">发送你的轨迹到 Google Docs 时发生错误. 请稍后重试.</string>
|
<string name="error_sending_to_fusiontables">发送轨迹到 Google Fusion Tables 时发生错误. 请稍后重试.</string>
|
||||||
|
<string name="error_sending_to_docs">发送轨迹到 Google Docs 时发生错误. 请稍后重试.</string>
|
||||||
|
<string name="error_please_try_again_later">请稍后再试.</string>
|
||||||
<string name="error_unable_to_start_recording">无法开始记录. 请重试.</string>
|
<string name="error_unable_to_start_recording">无法开始记录. 请重试.</string>
|
||||||
<string name="error_unable_to_stop_recording">无法停止记录. 请重试.</string>
|
<string name="error_unable_to_stop_recording">无法停止记录. 请重试.</string>
|
||||||
<string name="error_unable_to_read_file">无法读取文件.</string>
|
<string name="error_unable_to_read_file">无法读取文件.</string>
|
||||||
<string name="error_invalid_gpx_format">文件不是有效的 GPX 格式.</string>
|
<string name="error_invalid_gpx_format">文件不是有效的 GPX 格式.</string>
|
||||||
<string name="error_generic">发生错误. 请重试.</string>
|
<string name="error_generic">发生错误. 请重试.</string>
|
||||||
<string name="error_track_does_not_exist">轨迹不存在.</string>
|
<string name="error_track_does_not_exist">轨迹不存在.</string>
|
||||||
|
<string name="error_operation_cancelled">操作已被取消.</string>
|
||||||
<string name="error_out_of_memory">文件太大 (必须小于 500 KB). 中止操作.</string>
|
<string name="error_out_of_memory">文件太大 (必须小于 500 KB). 中止操作.</string>
|
||||||
<string name="error_unable_to_insert_marker">无法插入标记. 定位尚未完成.</string>
|
<string name="error_unable_to_insert_marker">无法插入标记. 定位尚未完成.</string>
|
||||||
|
|
||||||
@@ -49,15 +53,18 @@ limitations under the License.
|
|||||||
<string name="wait_for_fix">等待更准确的 GPS 定位. 请确定可以看见天空.</string>
|
<string name="wait_for_fix">等待更准确的 GPS 定位. 请确定可以看见天空.</string>
|
||||||
<string name="status_now_recording">现在开始记录新的轨迹.</string>
|
<string name="status_now_recording">现在开始记录新的轨迹.</string>
|
||||||
<string name="status_stopped_recording">停止记录你的轨迹.</string>
|
<string name="status_stopped_recording">停止记录你的轨迹.</string>
|
||||||
|
<string name="status_new_mymap_has_been_created">已在 maps.google.com 创建了新的 Google My Map.</string>
|
||||||
<string name="status_new_fusiontable_has_been_created">已在 google.com/fusiontables 创建新 Google Fusion Table.</string>
|
<string name="status_new_fusiontable_has_been_created">已在 google.com/fusiontables 创建新 Google Fusion Table.</string>
|
||||||
<string name="status_tracks_have_been_uploaded">你的轨迹已经发送到 maps.google.com.</string>
|
<string name="status_tracks_have_been_uploaded">你的轨迹已经发送到 maps.google.com.</string>
|
||||||
<string name="status_tracks_have_been_uploaded_to_new_doc">你的轨迹已经作为新的电子表格发送到 docs.google.com.</string>
|
<string name="status_tracks_have_been_uploaded_to_new_doc">你的轨迹已经作为新的电子表格发送到 docs.google.com.</string>
|
||||||
<string name="status_tracks_have_been_uploaded_to_docs">你的轨迹已经发送到 docs.google.com.</string>
|
<string name="status_tracks_have_been_uploaded_to_docs">你的轨迹已经发送到 docs.google.com.</string>
|
||||||
|
<string name="status_mymap_info">可能需要等待几分钟才能看见新的轨迹.</string>
|
||||||
<string name="status_enable_gps">请点击这里进入\'安全和位置设置\'并勾选上\'启用 GPS 卫星\'. 然后用后退键返回.</string>
|
<string name="status_enable_gps">请点击这里进入\'安全和位置设置\'并勾选上\'启用 GPS 卫星\'. 然后用后退键返回.</string>
|
||||||
<string name="status_approximate_location">注意: 当前显示的位置是根据无线信号和无线网络计算的近似位置.</string>
|
<string name="status_approximate_location">注意: 当前显示的位置是根据无线信号和无线网络计算的近似位置.</string>
|
||||||
<string name="status_no_location">目前无法定位. 请启用更多的位置来源 (在\'安全和位置设置\'中) 并确认天空是可见的. 再重试.</string>
|
<string name="status_no_location">目前无法定位. 请启用更多的位置来源 (在\'安全和位置设置\'中) 并确认天空是可见的. 再重试.</string>
|
||||||
<string name="status_waypoint_inserted">插入了一个路点标记.</string>
|
<string name="status_waypoint_inserted">插入了一个路点标记.</string>
|
||||||
<string name="status_statistics_inserted">插入了一个统计标记.</string>
|
<string name="status_statistics_inserted">插入了一个统计标记.</string>
|
||||||
|
<string name="status_track_upload_status">上传状态:</string>
|
||||||
|
|
||||||
<!-- Progress dialog -->
|
<!-- Progress dialog -->
|
||||||
<string name="progress_title">请稍候...</string>
|
<string name="progress_title">请稍候...</string>
|
||||||
@@ -69,6 +76,9 @@ limitations under the License.
|
|||||||
<string name="progress_message_sending_docs">发送轨迹到 Google Docs 中...</string>
|
<string name="progress_message_sending_docs">发送轨迹到 Google Docs 中...</string>
|
||||||
<string name="progress_message_sending_fusiontables">发送轨迹到 Google Fusion Tables 中...</string>
|
<string name="progress_message_sending_fusiontables">发送轨迹到 Google Fusion Tables 中...</string>
|
||||||
<string name="progress_message_creating_fusiontable">创建新的 Fusion Table 中...</string>
|
<string name="progress_message_creating_fusiontable">创建新的 Fusion Table 中...</string>
|
||||||
|
<string name="progress_message_creating_map">创建新的 My Map...</string>
|
||||||
|
<string name="progress_message_sending_fusiontables">发送轨迹到 Fusion Tables...</string>
|
||||||
|
<string name="progress_message_creating_fusiontable">创建新的 Fusion table...</string>
|
||||||
<string name="import_progress_message">导入 GPS 轨迹中. 请稍候.</string>
|
<string name="import_progress_message">导入 GPS 轨迹中. 请稍候.</string>
|
||||||
<string name="write_progress_message">写入文件到 SD 卡中. 请稍候.</string>
|
<string name="write_progress_message">写入文件到 SD 卡中. 请稍候.</string>
|
||||||
<string name="progress_message_updating_track">更新轨迹统计信息中...</string>
|
<string name="progress_message_updating_track">更新轨迹统计信息中...</string>
|
||||||
@@ -79,12 +89,16 @@ limitations under the License.
|
|||||||
<string name="track_will_be_permanently_deleted">选定轨迹和它相关的标记都将被从本机彻底删除.</string>
|
<string name="track_will_be_permanently_deleted">选定轨迹和它相关的标记都将被从本机彻底删除.</string>
|
||||||
<string name="marker_will_be_permanently_deleted">选定标记将被从本机删除.</string>
|
<string name="marker_will_be_permanently_deleted">选定标记将被从本机删除.</string>
|
||||||
|
|
||||||
|
<!-- Text and links when uploading to Google Fusion Tables -->
|
||||||
|
<string name="new_map_description">由 Android 平台的 My Tracks 创建.</string>
|
||||||
|
<string name="fusiontable_link">由 Android 平台的 <a href=\'http://mytracks.appspot.com\'>My Tracks</a> 创建.</string>
|
||||||
|
|
||||||
<!-- Text and links when uploading to Google My Maps -->
|
<!-- Text and links when uploading to Google My Maps -->
|
||||||
<string name="new_map_description">由 Android 上的 My Tracks 生成.</string>
|
<string name="fusiontable_link">由 Android 上的 <a href=\'http://mytracks.appspot.com\'>My Tracks</a> 创建.</string>
|
||||||
<string name="fusiontable_link">由 Android 上的 <a href=\'http://mytracks.appspot.com\'>My Tracks</a> 生成.</string>
|
<string name="new_map_title">新地图</string>
|
||||||
|
|
||||||
<!-- Formatting of track and marker descriptions -->
|
<!-- Formatting of track and marker descriptions -->
|
||||||
<string name="points">点数</string>
|
<string name="points">路点</string>
|
||||||
<string name="recorded_date">记录日期</string>
|
<string name="recorded_date">记录日期</string>
|
||||||
<string name="category">活动类型</string>
|
<string name="category">活动类型</string>
|
||||||
<string name="waypoint_category">标记类型</string>
|
<string name="waypoint_category">标记类型</string>
|
||||||
@@ -101,6 +115,7 @@ limitations under the License.
|
|||||||
<string name="error">错误</string>
|
<string name="error">错误</string>
|
||||||
<string name="success">成功</string>
|
<string name="success">成功</string>
|
||||||
<string name="waypoint">路点</string>
|
<string name="waypoint">路点</string>
|
||||||
|
<string name="license">授权</string>
|
||||||
<string name="cancel">取消</string>
|
<string name="cancel">取消</string>
|
||||||
<string name="close">关闭</string>
|
<string name="close">关闭</string>
|
||||||
<string name="edit">编辑</string>
|
<string name="edit">编辑</string>
|
||||||
@@ -112,8 +127,10 @@ limitations under the License.
|
|||||||
|
|
||||||
<!-- TrackList -->
|
<!-- TrackList -->
|
||||||
<string name="tracklist_show_track">显示</string>
|
<string name="tracklist_show_track">显示</string>
|
||||||
|
<string name="tracklist_send_to_mymaps">发送到 Google My Maps</string>
|
||||||
|
<string name="tracklist_send_to_new_mymap">发送到新建的 Google My Map</string>
|
||||||
<string name="tracklist_send_to_fusiontables">发送到 Google Fusion Table</string>
|
<string name="tracklist_send_to_fusiontables">发送到 Google Fusion Table</string>
|
||||||
<string name="tracklist_send_to_new_fusiontable">发送到新建 Google Fusion Table</string>
|
<string name="tracklist_send_to_new_fusiontable">发送到新建的 Google Fusion Table</string>
|
||||||
<string name="tracklist_send_to_docs">发送到 Google Docs</string>
|
<string name="tracklist_send_to_docs">发送到 Google Docs</string>
|
||||||
<string name="tracklist_send_to_google">发送到 Google...</string>
|
<string name="tracklist_send_to_google">发送到 Google...</string>
|
||||||
<string name="tracklist_delete_track">从手机上删除...</string>
|
<string name="tracklist_delete_track">从手机上删除...</string>
|
||||||
@@ -124,6 +141,7 @@ limitations under the License.
|
|||||||
<string name="tracklist_save_as_csv">保存为 CSV 文件</string>
|
<string name="tracklist_save_as_csv">保存为 CSV 文件</string>
|
||||||
<string name="tracklist_save_as_tcx">保存为 TCX 文件</string>
|
<string name="tracklist_save_as_tcx">保存为 TCX 文件</string>
|
||||||
<string name="tracklist_btn_send_all_to_fusiontables">发送到 Google Fusion Tables</string>
|
<string name="tracklist_btn_send_all_to_fusiontables">发送到 Google Fusion Tables</string>
|
||||||
|
<string name="tracklist_btn_send_all_to_mymaps">发送到 Google My Maps</string>
|
||||||
<string name="tracklist_btn_delete_all">删除所有轨迹</string>
|
<string name="tracklist_btn_delete_all">删除所有轨迹</string>
|
||||||
<!-- Export All -->
|
<!-- Export All -->
|
||||||
<string name="tracklist_btn_export_all">导出所有轨迹</string>
|
<string name="tracklist_btn_export_all">导出所有轨迹</string>
|
||||||
@@ -132,11 +150,22 @@ limitations under the License.
|
|||||||
<string name="tracklist_all_tracks">全部轨迹:</string>
|
<string name="tracklist_all_tracks">全部轨迹:</string>
|
||||||
<string name="tracklist_this_track">此轨迹</string>
|
<string name="tracklist_this_track">此轨迹</string>
|
||||||
<string name="tracklist_share_track">与朋友分享...</string>
|
<string name="tracklist_share_track">与朋友分享...</string>
|
||||||
|
<string name="tracklist_share_link">访问地图的超链接</string>
|
||||||
<string name="tracklist_share_gpx_file">GPX 文件</string>
|
<string name="tracklist_share_gpx_file">GPX 文件</string>
|
||||||
<string name="tracklist_share_kml_file">KML 文件</string>
|
<string name="tracklist_share_kml_file">KML 文件</string>
|
||||||
<string name="tracklist_share_csv_file">CSV 文件</string>
|
<string name="tracklist_share_csv_file">CSV 文件</string>
|
||||||
<string name="tracklist_share_tcx_file">TCX 文件</string>
|
<string name="tracklist_share_tcx_file">TCX 文件</string>
|
||||||
<string name="tracklist_clear_map">清除地图</string>
|
<string name="tracklist_clear_map">清除地图</string>
|
||||||
|
<!-- Import All -->
|
||||||
|
<string name="tracklist_btn_import_all">全部导入</string>
|
||||||
|
<!-- Format:
|
||||||
|
$1 : Successful imports
|
||||||
|
$2 : Attempted imports
|
||||||
|
$3 : MyTracks gpx path
|
||||||
|
-->
|
||||||
|
<string name="import_done">已从 %3$s 导入 %1$d 个 GPX 文件, 共 %2$d 个.</string>
|
||||||
|
<string name="import_empty">在 %s 中未找到 GPX 文件. SD 存储卡不可用或者目录中没有 GPX 文件.</string>
|
||||||
|
<string name="import_error">导入文件 %s 出错.</string>
|
||||||
|
|
||||||
<!-- Waypoints list -->
|
<!-- Waypoints list -->
|
||||||
<string name="waypointslist_btn_delete_all">删除所有标记</string>
|
<string name="waypointslist_btn_delete_all">删除所有标记</string>
|
||||||
@@ -151,14 +180,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">轨迹详细信息</string>
|
<string name="trackdetails_title">轨迹详细信息</string>
|
||||||
<string name="trackdetails_name">轨迹名称</string>
|
<string name="trackdetails_name">轨迹名称</string>
|
||||||
|
<string name="trackdetails_name_hint">轨迹名称</string>
|
||||||
<string name="trackdetails_description">轨迹描述</string>
|
<string name="trackdetails_description">轨迹描述</string>
|
||||||
|
<string name="trackdetails_description_hint">轨迹描述</string>
|
||||||
<string name="trackdetails_category">活动类型 (例如: 徒步, 骑行, 跑步, 攀岩...)</string>
|
<string name="trackdetails_category">活动类型 (例如: 徒步, 骑行, 跑步, 攀岩...)</string>
|
||||||
|
<string name="trackdetails_category_hint">活动类型</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">标记详细信息</string>
|
<string name="waypointdetails_title">标记详细信息</string>
|
||||||
<string name="waypointdetails_name">标记名称</string>
|
<string name="waypointdetails_name">标记名称</string>
|
||||||
|
<string name="waypointdetails_name_hint">标记名称</string>
|
||||||
<string name="waypointdetails_description">标记描述</string>
|
<string name="waypointdetails_description">标记描述</string>
|
||||||
|
<string name="waypointdetails_description_hint">标记描述</string>
|
||||||
<string name="waypointdetails_category">标记类型 (例如: 建筑, 陷坑, 景点...)</string>
|
<string name="waypointdetails_category">标记类型 (例如: 建筑, 陷坑, 景点...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">标记类型</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">My Tracks 设置</string>
|
<string name="mytracks_settings">My Tracks 设置</string>
|
||||||
@@ -166,10 +201,11 @@ limitations under the License.
|
|||||||
<string name="settings_recording">记录</string>
|
<string name="settings_recording">记录</string>
|
||||||
<string name="settings_sharing">分享</string>
|
<string name="settings_sharing">分享</string>
|
||||||
|
|
||||||
<string name="settings_not_available_summary">你使用的 Android 版本无法支持</string>
|
<string name="settings_not_available_summary">不支持当前使用的 Android 版本</string>
|
||||||
|
<string name="settings_not_while_recording">在记录轨迹时不可用</string>
|
||||||
|
|
||||||
<string name="settings_announcement_frequency">提示频度</string>
|
<string name="settings_announcement_frequency">通知频度</string>
|
||||||
<string name="settings_announcement_frequency_summary">语音提示的最小时间间隔</string>
|
<string name="settings_announcement_frequency_summary">语音通知的最小时间间隔</string>
|
||||||
|
|
||||||
<string name="settings_min_recording_distance">最小记录间距</string>
|
<string name="settings_min_recording_distance">最小记录间距</string>
|
||||||
<string name="settings_min_recording_distance_summary">位置记录的最小间隔距离</string>
|
<string name="settings_min_recording_distance_summary">位置记录的最小间隔距离</string>
|
||||||
@@ -205,14 +241,30 @@ limitations under the License.
|
|||||||
<string name="settings_auto_resume_track_timeout">自动恢复追踪等待时间</string>
|
<string name="settings_auto_resume_track_timeout">自动恢复追踪等待时间</string>
|
||||||
<string name="settings_auto_resume_track_timeout_summary">手机重启后自动继续上次轨迹记录的最大间隔时间</string>
|
<string name="settings_auto_resume_track_timeout_summary">手机重启后自动继续上次轨迹记录的最大间隔时间</string>
|
||||||
|
|
||||||
|
<string name="settings_timestamp_track_name">使用时间作为轨迹名称</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_on">使用轨迹记录的开始时间作为默认名称</string>
|
||||||
|
<string name="settings_timestamp_track_name_summary_off">轨迹使用自动递增的数字进行命名.</string>
|
||||||
|
|
||||||
|
<string name="settings_reset">恢复默认值</string>
|
||||||
|
<string name="settings_reset_summary">将所有设置恢复到默认值</string>
|
||||||
|
<string name="settings_reset_dialog_message">你的所有设置都将恢复到默认值. 已保存的轨迹不会丢失. 确定要继续吗?</string>
|
||||||
|
<string name="settings_reset_done">所有设置已恢复到默认值.</string>
|
||||||
|
|
||||||
<string name="pace_label">节奏</string>
|
<string name="pace_label">节奏</string>
|
||||||
|
|
||||||
<string name="eclair_required">只在 Android 2.0 及以上版本支持</string>
|
<string name="eclair_required">只在 Android 2.0 及以上版本支持</string>
|
||||||
<string name="settings_sensor_type">感应器类型</string>
|
<string name="settings_sensor_type">感应器类型</string>
|
||||||
<string name="settings_sensor_type_summary">要连接到的感应器类型</string>
|
<string name="settings_sensor_type_summary">要连接到的感应器类型</string>
|
||||||
|
<string name="settings_heart_rate_ant_sensor_id">清除 ANT 心率计的设备关联</string>
|
||||||
|
<string name="settings_power_ant_sensor_id">清除 ANT 能量感应器的设备关联</string>
|
||||||
|
<string name="settings_srm_bridge_ant_sensor_id">清除 ANT SRM 桥接感应器的设备关联</string>
|
||||||
|
<string name="settings_ant_not_paired">ANT 感应器未关联</string>
|
||||||
|
<string name="settings_ant_paired">ANT 感应器已关联到: %d</string>
|
||||||
<string name="bluetooth_sensor_title">蓝牙感应器</string>
|
<string name="bluetooth_sensor_title">蓝牙感应器</string>
|
||||||
<string name="bluetooth_sensor_summary">要连接到的蓝牙感应器</string>
|
<string name="bluetooth_sensor_summary">想要连接的蓝牙感应器</string>
|
||||||
|
<string name="settings_modular_stats_display_title">模块化状态显示</string>
|
||||||
|
|
||||||
|
<!-- Backups -->
|
||||||
<string name="settings_backup">备份 (测试版)</string>
|
<string name="settings_backup">备份 (测试版)</string>
|
||||||
<string name="settings_sd_backup">SD 存储卡备份</string>
|
<string name="settings_sd_backup">SD 存储卡备份</string>
|
||||||
<string name="settings_backup_to_sd">立即备份</string>
|
<string name="settings_backup_to_sd">立即备份</string>
|
||||||
@@ -220,7 +272,6 @@ limitations under the License.
|
|||||||
<string name="settings_restore_from_sd">立即恢复</string>
|
<string name="settings_restore_from_sd">立即恢复</string>
|
||||||
<string name="settings_restore_from_sd_summary">从 SD 存储卡恢复所有轨迹和设置</string>
|
<string name="settings_restore_from_sd_summary">从 SD 存储卡恢复所有轨迹和设置</string>
|
||||||
|
|
||||||
<!-- Backups -->
|
|
||||||
<string name="restore_overwrites_warning">从 SD 存储卡恢复备份数据将覆盖掉你当前的所有轨迹和设置. 确定要继续吗?</string>
|
<string name="restore_overwrites_warning">从 SD 存储卡恢复备份数据将覆盖掉你当前的所有轨迹和设置. 确定要继续吗?</string>
|
||||||
<string name="select_backup_to_restore">请选择要恢复的备份文件</string>
|
<string name="select_backup_to_restore">请选择要恢复的备份文件</string>
|
||||||
<string name="no_backups">没有找到备份文件.</string>
|
<string name="no_backups">没有找到备份文件.</string>
|
||||||
@@ -230,7 +281,25 @@ limitations under the License.
|
|||||||
<!-- MyTracksSky -->
|
<!-- MyTracksSky -->
|
||||||
<string name="mytracks_sky">GPS 卫星</string>
|
<string name="mytracks_sky">GPS 卫星</string>
|
||||||
|
|
||||||
|
<!-- My Maps -->
|
||||||
|
<string name="select_map_message">从你的帐号中选择一个地图:</string>
|
||||||
|
<string name="create_new_map">创建新地图...</string>
|
||||||
|
<string name="map_list_title">发送到 Google My Maps</string>
|
||||||
|
<string name="maps_list_loading">载入地图中...</string>
|
||||||
|
<string name="maps_list_failed">现在无法载入你的地图!</string>
|
||||||
|
<string name="open_map">选择此地图</string>
|
||||||
|
<string name="edit_map_details">编辑地图详细信息</string>
|
||||||
|
<string name="share_track">分享轨迹</string>
|
||||||
|
<string name="delete_map">从你的帐号删除地图</string>
|
||||||
|
<string name="map_title">地图标题:</string>
|
||||||
|
<string name="map_description">地图描述:</string>
|
||||||
|
<string name="map_searchable_edit">让此地图和它的内容出现在搜索结果中</string>
|
||||||
|
<string name="map_not_searchable_edit">不要让这个地图的的内容出现在搜索结果中, 但其它用户依然可以通过直接 URL 访问它</string>
|
||||||
|
<string name="map_searchable">此地图和它的内容将在搜索结果中出现</string>
|
||||||
|
<string name="map_not_searchable">此地图和它的内容不会在搜索结果中出现, 但其它用户依然可以通过直接 URL 访问它</string>
|
||||||
|
|
||||||
<!-- Sharing -->
|
<!-- Sharing -->
|
||||||
|
<string name="share_map">与朋友分享地图</string>
|
||||||
<string name="share_map_subject">我想与你分享一张地图</string>
|
<string name="share_map_subject">我想与你分享一张地图</string>
|
||||||
<string name="share_map_body_format">我想你可能会对这个地图感兴趣:
|
<string name="share_map_body_format">我想你可能会对这个地图感兴趣:
|
||||||
|
|
||||||
@@ -239,7 +308,6 @@ limitations under the License.
|
|||||||
<string name="send_track_body_format">我想你可能会对这条轨迹感兴趣.
|
<string name="send_track_body_format">我想你可能会对这条轨迹感兴趣.
|
||||||
|
|
||||||
请用 Google Earth 或其它地图软件查看此轨迹.</string>
|
请用 Google Earth 或其它地图软件查看此轨迹.</string>
|
||||||
<string name="share_track">与朋友分享轨迹</string>
|
|
||||||
|
|
||||||
<!-- Visibility -->
|
<!-- Visibility -->
|
||||||
<string name="public_map">公开</string>
|
<string name="public_map">公开</string>
|
||||||
@@ -331,10 +399,13 @@ limitations under the License.
|
|||||||
<string name="about_team">开发团队:</string>
|
<string name="about_team">开发团队:</string>
|
||||||
<string name="about_version">版本:</string>
|
<string name="about_version">版本:</string>
|
||||||
<string name="about_support">技术支持:</string>
|
<string name="about_support">技术支持:</string>
|
||||||
|
<string name="about_privacy">隐私策略:</string>
|
||||||
|
|
||||||
<!-- Send to Google -->
|
<!-- Send to Google -->
|
||||||
<string name="sendtogoogle_title">发送到...</string>
|
<string name="sendtogoogle_title">发送到...</string>
|
||||||
<string name="sendtogoogle_send_now">立即发送</string>
|
<string name="sendtogoogle_send_now">立即发送</string>
|
||||||
|
<string name="sendtogoogle_create_new_map">创建新地图</string>
|
||||||
|
<string name="sendtogoogle_pick_existing_map">选择已有地图</string>
|
||||||
<string name="sendtogoogle_send_stats">发送轨迹统计信息</string>
|
<string name="sendtogoogle_send_stats">发送轨迹统计信息</string>
|
||||||
<string name="sendtogoogle_send_stats_and_points">发送统计信息和路点</string>
|
<string name="sendtogoogle_send_stats_and_points">发送统计信息和路点</string>
|
||||||
|
|
||||||
@@ -344,10 +415,11 @@ limitations under the License.
|
|||||||
<string name="choose_account_title">选择帐户</string>
|
<string name="choose_account_title">选择帐户</string>
|
||||||
|
|
||||||
<!-- SD card -->
|
<!-- SD card -->
|
||||||
<string name="io_no_external_storage_found">没有发现存贮设备. 请确认插入了 SD 卡并且你的手机没有将挂载 SD 卡到电脑.</string>
|
<string name="io_no_external_storage_found">没有发现存储设备. 请确认插入了 SD 存储卡并且你的手机没有将挂载 SD 卡到电脑.</string>
|
||||||
<string name="io_write_failed">无法写入文件.</string>
|
<string name="io_write_failed">无法写入文件.</string>
|
||||||
<string name="io_create_dir_failed">无法在 SD 存储卡上创建目录.</string>
|
<string name="io_create_dir_failed">无法在 SD 存储卡上创建目录.</string>
|
||||||
<string name="io_write_finished">轨迹已导出到 SD 卡.</string>
|
<string name="io_create_dir_failed">无法在 SD 存储卡上创建目录card.</string>
|
||||||
|
<string name="io_write_finished">轨迹已导出到 SD 存储卡.</string>
|
||||||
<string name="io_read_finished">从 SD 存储卡读取完毕.</string>
|
<string name="io_read_finished">从 SD 存储卡读取完毕.</string>
|
||||||
|
|
||||||
<!-- VersionChecker -->
|
<!-- VersionChecker -->
|
||||||
@@ -395,4 +467,20 @@ limitations under the License.
|
|||||||
<string name="sensor_data_time">感应器数据时间</string>
|
<string name="sensor_data_time">感应器数据时间</string>
|
||||||
<string name="power_meter_enabled">电源计量器已启用</string>
|
<string name="power_meter_enabled">电源计量器已启用</string>
|
||||||
<string name="heart_rate_monitor_enabled">心率监视器已启用</string>
|
<string name="heart_rate_monitor_enabled">心率监视器已启用</string>
|
||||||
|
<string name="no_sensor_manager">没有感应器管理器</string>
|
||||||
|
<string name="enabled">已启用</string>
|
||||||
|
<string name="connecting">连接中</string>
|
||||||
|
<string name="connected">已连接</string>
|
||||||
|
<string name="disconnected">未连接</string>
|
||||||
|
<string name="no_sensor_service">没有感应器服务</string>
|
||||||
|
<string name="searching">搜索中</string>
|
||||||
|
<string name="sending">发送中</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">无</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ 感应器</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ 转接器</string>
|
||||||
|
<string name="polar_bt_sensor_option">Polar Bluetooth</string>
|
||||||
|
<string name="zephyr_bt_sensor_option">Zephyr 蓝牙设备</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
+10
-145
@@ -15,31 +15,6 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Task frequency -->
|
|
||||||
<string-array name="task_frequency_options">
|
|
||||||
<item>Off</item>
|
|
||||||
<item>1 min</item>
|
|
||||||
<item>2 min</item>
|
|
||||||
<item>5 min</item>
|
|
||||||
<item>10 min</item>
|
|
||||||
<item>15 min</item>
|
|
||||||
<item>30 min</item>
|
|
||||||
<item>60 min</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="task_frequency_values">
|
|
||||||
<item>-1</item>
|
|
||||||
<item>1</item>
|
|
||||||
<item>2</item>
|
|
||||||
<item>5</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>15</item>
|
|
||||||
<item>30</item>
|
|
||||||
<item>60</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording distance -->
|
<!-- Minimum recording distance -->
|
||||||
<string-array name="min_recording_distance_options">
|
<string-array name="min_recording_distance_options">
|
||||||
<item>1 m</item>
|
<item>1 m</item>
|
||||||
@@ -61,18 +36,6 @@ limitations under the License.
|
|||||||
<item>328 ft</item>
|
<item>328 ft</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="min_recording_distance_values">
|
|
||||||
<item>1</item>
|
|
||||||
<item>2</item>
|
|
||||||
<item>3</item>
|
|
||||||
<item>4</item>
|
|
||||||
<item>5</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>100</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Maximum recording distance -->
|
<!-- Maximum recording distance -->
|
||||||
<string-array name="max_recording_distance_options">
|
<string-array name="max_recording_distance_options">
|
||||||
<item>50 m</item>
|
<item>50 m</item>
|
||||||
@@ -92,17 +55,6 @@ limitations under the License.
|
|||||||
<item>3.1 miles</item>
|
<item>3.1 miles</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="max_recording_distance_values">
|
|
||||||
<item>50</item>
|
|
||||||
<item>100</item>
|
|
||||||
<item>200</item>
|
|
||||||
<item>500</item>
|
|
||||||
<item>1000</item>
|
|
||||||
<item>5000</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum recording interval -->
|
<!-- Minimum recording interval -->
|
||||||
<string-array name="min_recording_interval_options">
|
<string-array name="min_recording_interval_options">
|
||||||
<item>battery miser (adaptive)</item>
|
<item>battery miser (adaptive)</item>
|
||||||
@@ -123,27 +75,6 @@ limitations under the License.
|
|||||||
<item>30 min</item>
|
<item>30 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="min_recording_interval_values">
|
|
||||||
<item>-2</item>
|
|
||||||
<item>-1</item>
|
|
||||||
<item>0</item>
|
|
||||||
<item>2</item>
|
|
||||||
<item>3</item>
|
|
||||||
<item>4</item>
|
|
||||||
<item>5</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>20</item>
|
|
||||||
<item>30</item>
|
|
||||||
<item>60</item>
|
|
||||||
<item>120</item>
|
|
||||||
<item>300</item>
|
|
||||||
<item>480</item>
|
|
||||||
<item>900</item>
|
|
||||||
<item>1800</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Minimum required accuracy -->
|
<!-- Minimum required accuracy -->
|
||||||
<string-array name="min_required_accuracy_options">
|
<string-array name="min_required_accuracy_options">
|
||||||
<item>10 m (excellent GPS signal)</item>
|
<item>10 m (excellent GPS signal)</item>
|
||||||
@@ -169,23 +100,9 @@ limitations under the License.
|
|||||||
<item>3.1 miles (poor GPS signal)</item>
|
<item>3.1 miles (poor GPS signal)</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
<!-- Task frequency -->
|
||||||
<string-array name="min_required_accuracy_values">
|
<string-array name="task_frequency_options">
|
||||||
<item>10</item>
|
<item>Off</item>
|
||||||
<item>20</item>
|
|
||||||
<item>50</item>
|
|
||||||
<item>100</item>
|
|
||||||
<item>200</item>
|
|
||||||
<item>500</item>
|
|
||||||
<item>1000</item>
|
|
||||||
<item>2000</item>
|
|
||||||
<item>5000</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Split frequency -->
|
|
||||||
<string-array name="split_frequency_options">
|
|
||||||
<item>No splitting</item>
|
|
||||||
<item>100 km</item>
|
<item>100 km</item>
|
||||||
<item>50 km</item>
|
<item>50 km</item>
|
||||||
<item>25 km</item>
|
<item>25 km</item>
|
||||||
@@ -201,8 +118,8 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="split_frequency_options_ft">
|
<string-array name="task_frequency_options_ft">
|
||||||
<item>No splitting</item>
|
<item>Off</item>
|
||||||
<item>100 mi</item>
|
<item>100 mi</item>
|
||||||
<item>50 mi</item>
|
<item>50 mi</item>
|
||||||
<item>25 mi</item>
|
<item>25 mi</item>
|
||||||
@@ -218,24 +135,6 @@ limitations under the License.
|
|||||||
<item>1 min</item>
|
<item>1 min</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="split_frequency_values">
|
|
||||||
<item>0</item>
|
|
||||||
<item>-100</item>
|
|
||||||
<item>-50</item>
|
|
||||||
<item>-25</item>
|
|
||||||
<item>-10</item>
|
|
||||||
<item>-5</item>
|
|
||||||
<item>-1</item>
|
|
||||||
<item>60</item>
|
|
||||||
<item>30</item>
|
|
||||||
<item>15</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>5</item>
|
|
||||||
<item>2</item>
|
|
||||||
<item>1</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- Auto-resume track timeout -->
|
<!-- Auto-resume track timeout -->
|
||||||
<string-array name="auto_resume_track_timeout_options">
|
<string-array name="auto_resume_track_timeout_options">
|
||||||
<item>Never</item>
|
<item>Never</item>
|
||||||
@@ -245,16 +144,6 @@ limitations under the License.
|
|||||||
<item>Always</item>
|
<item>Always</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="auto_resume_track_timeout_values">
|
|
||||||
<item>0</item>
|
|
||||||
<item>5</item>
|
|
||||||
<item>10</item>
|
|
||||||
<item>15</item>
|
|
||||||
<item>-1</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Other non-preference arrays -->
|
<!-- Other non-preference arrays -->
|
||||||
<array name="activity_types">
|
<array name="activity_types">
|
||||||
<item>unknown</item>
|
<item>unknown</item>
|
||||||
@@ -281,6 +170,11 @@ limitations under the License.
|
|||||||
<item>inline skating</item>
|
<item>inline skating</item>
|
||||||
<item>skate boarding</item>
|
<item>skate boarding</item>
|
||||||
|
|
||||||
|
<item>roller skiing (classic)</item>
|
||||||
|
<item>roller skiing (skate)</item>
|
||||||
|
<item>cross-country skiing (classic)</item>
|
||||||
|
<item>cross-country skiing (skate)</item>
|
||||||
|
|
||||||
<item>snow shoeing</item>
|
<item>snow shoeing</item>
|
||||||
<item>skiing</item>
|
<item>skiing</item>
|
||||||
<item>snow boarding</item>
|
<item>snow boarding</item>
|
||||||
@@ -383,33 +277,4 @@ limitations under the License.
|
|||||||
<item>way point</item>
|
<item>way point</item>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<array name="export_formats">
|
|
||||||
<item>GPX</item>
|
|
||||||
<item>KML</item>
|
|
||||||
<item>CSV</item>
|
|
||||||
<item>TCX</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<array name="sensor_type_options">
|
|
||||||
<item>None</item>
|
|
||||||
<item>ANT+ Sensors</item>
|
|
||||||
<item>SRM ANT+ Bridge</item>
|
|
||||||
<item>Zephyr Bluetooth</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<array name="sensor_type_values">
|
|
||||||
<item>@string/none</item>
|
|
||||||
<item>@string/ant_sensor_type</item>
|
|
||||||
<item>@string/srm_ant_bridge_sensor_type</item>
|
|
||||||
<item>@string/zephyr_sensor_type</item>
|
|
||||||
</array>
|
|
||||||
|
|
||||||
<!-- DO NOT TRANSLATE -->
|
|
||||||
<string-array name="ant_sensor_type_values">
|
|
||||||
<item>@string/ant_sensor_type</item>
|
|
||||||
<item>@string/srm_ant_bridge_sensor_type</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2010 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<resources>
|
||||||
|
<!-- Do not translate any arrays in this file. -->
|
||||||
|
<string-array name="min_required_accuracy_values">
|
||||||
|
<item>10</item>
|
||||||
|
<item>20</item>
|
||||||
|
<item>50</item>
|
||||||
|
<item>100</item>
|
||||||
|
<item>200</item>
|
||||||
|
<item>500</item>
|
||||||
|
<item>1000</item>
|
||||||
|
<item>2000</item>
|
||||||
|
<item>5000</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_recording_distance_values">
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
<item>4</item>
|
||||||
|
<item>5</item>
|
||||||
|
<item>10</item>
|
||||||
|
<item>100</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="max_recording_distance_values">
|
||||||
|
<item>50</item>
|
||||||
|
<item>100</item>
|
||||||
|
<item>200</item>
|
||||||
|
<item>500</item>
|
||||||
|
<item>1000</item>
|
||||||
|
<item>5000</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="min_recording_interval_values">
|
||||||
|
<item>-2</item>
|
||||||
|
<item>-1</item>
|
||||||
|
<item>0</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
<item>4</item>
|
||||||
|
<item>5</item>
|
||||||
|
<item>10</item>
|
||||||
|
<item>20</item>
|
||||||
|
<item>30</item>
|
||||||
|
<item>60</item>
|
||||||
|
<item>120</item>
|
||||||
|
<item>300</item>
|
||||||
|
<item>480</item>
|
||||||
|
<item>900</item>
|
||||||
|
<item>1800</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="task_frequency_values">
|
||||||
|
<item>0</item>
|
||||||
|
<item>-100</item>
|
||||||
|
<item>-50</item>
|
||||||
|
<item>-25</item>
|
||||||
|
<item>-10</item>
|
||||||
|
<item>-5</item>
|
||||||
|
<item>-1</item>
|
||||||
|
<item>60</item>
|
||||||
|
<item>30</item>
|
||||||
|
<item>15</item>
|
||||||
|
<item>10</item>
|
||||||
|
<item>5</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>1</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="auto_resume_track_timeout_values">
|
||||||
|
<item>0</item>
|
||||||
|
<item>5</item>
|
||||||
|
<item>10</item>
|
||||||
|
<item>15</item>
|
||||||
|
<item>-1</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<array name="export_formats">
|
||||||
|
<item>GPX</item>
|
||||||
|
<item>KML</item>
|
||||||
|
<item>CSV</item>
|
||||||
|
<item>TCX</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<array name="sensor_type_options">
|
||||||
|
<item>@string/no_sensor_option</item>
|
||||||
|
<item>@string/ant_sensor_option</item>
|
||||||
|
<item>@string/ant_bridge_sensor_option</item>
|
||||||
|
<item>@string/polar_bt_sensor_option</item>
|
||||||
|
<item>@string/zephyr_bt_sensor_option</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<array name="sensor_type_values">
|
||||||
|
<item>@string/none</item>
|
||||||
|
<item>@string/ant_sensor_type</item>
|
||||||
|
<item>@string/srm_ant_bridge_sensor_type</item>
|
||||||
|
<item>@string/polar_sensor_type</item>
|
||||||
|
<item>@string/zephyr_sensor_type</item>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<string-array name="ant_sensor_type_values">
|
||||||
|
<item>@string/ant_sensor_type</item>
|
||||||
|
<item>@string/srm_ant_bridge_sensor_type</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="track_color_mode_options">
|
||||||
|
<item>@string/track_color_mode_none</item>
|
||||||
|
<item>@string/track_color_mode_fixed</item>
|
||||||
|
<item>@string/track_color_mode_dynamic</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="track_color_mode_values">
|
||||||
|
<item>@string/none</item>
|
||||||
|
<item>@string/track_color_mode_fixed</item>
|
||||||
|
<item>@string/track_color_mode_dynamic</item>
|
||||||
|
</string-array>
|
||||||
|
</resources>
|
||||||
@@ -47,4 +47,18 @@ limitations under the License.
|
|||||||
<!-- Purple and a transparent purple -->
|
<!-- Purple and a transparent purple -->
|
||||||
<color name="power_border">#FF401465</color>
|
<color name="power_border">#FF401465</color>
|
||||||
<color name="power_fill">#40401465</color>
|
<color name="power_fill">#40401465</color>
|
||||||
|
|
||||||
|
<!-- AppWidget colors -->
|
||||||
|
<color name="appwidget_text">#EDEDED</color>
|
||||||
|
<color name="appwidget_hr">#99999999</color>
|
||||||
|
|
||||||
|
<!-- Colors for dynamic track drawing -->
|
||||||
|
<!-- Green -->
|
||||||
|
<color name="slow_path">#F774DF00</color>
|
||||||
|
|
||||||
|
<!-- Blue -->
|
||||||
|
<color name="normal_path">#F75858FA</color>
|
||||||
|
|
||||||
|
<!-- Red -->
|
||||||
|
<color name="fast_path">#F7DF0101</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ limitations under the License.
|
|||||||
<string name="about_weburl">mytracks.appspot.com</string>
|
<string name="about_weburl">mytracks.appspot.com</string>
|
||||||
<string name="about_privacy_weburl">m.google.com/privacy</string>
|
<string name="about_privacy_weburl">m.google.com/privacy</string>
|
||||||
<string name="about_copyright_message">Copyright 2009 Google Inc.</string>
|
<string name="about_copyright_message">Copyright 2009 Google Inc.</string>
|
||||||
<string name="about_bart">Bartlomiej Niechwiej</string>
|
<string name="about_bart">Bartłomiej Niechwiej</string>
|
||||||
<string name="about_dylan">Dylan Casey</string>
|
<string name="about_dylan">Dylan Casey</string>
|
||||||
<string name="about_leif">Leif Hendrik Wilden</string>
|
<string name="about_leif">Leif Hendrik Wilden</string>
|
||||||
<string name="about_rdamazio">Rodrigo Damazio Bovendorp</string>
|
<string name="about_rdamazio">Rodrigo Damazio Bovendorp</string>
|
||||||
@@ -33,10 +33,28 @@ limitations under the License.
|
|||||||
<string name="none">NONE</string>
|
<string name="none">NONE</string>
|
||||||
<string name="ant_sensor_type">ANT</string>
|
<string name="ant_sensor_type">ANT</string>
|
||||||
<string name="srm_ant_bridge_sensor_type">SRM_ANT_BRIDGE</string>
|
<string name="srm_ant_bridge_sensor_type">SRM_ANT_BRIDGE</string>
|
||||||
|
<string name="polar_sensor_type">POLAR</string>
|
||||||
<string name="zephyr_sensor_type">ZEPHYR</string>
|
<string name="zephyr_sensor_type">ZEPHYR</string>
|
||||||
|
|
||||||
<!-- Send to Google URLs -->
|
<!-- Send to Google URLs -->
|
||||||
<string name="sendtogoogle_google_fusiontables_url">google.com/fusiontables</string>
|
<string name="sendtogoogle_google_fusiontables_url">google.com/fusiontables</string>
|
||||||
<string name="sendtogoogle_google_mymaps_url">maps.google.com</string>
|
<string name="sendtogoogle_google_mymaps_url">maps.google.com</string>
|
||||||
<string name="sendtogoogle_google_docs_url">docs.google.com</string>
|
<string name="sendtogoogle_google_docs_url">docs.google.com</string>
|
||||||
|
|
||||||
|
<!-- ID for Google Analytics -->
|
||||||
|
<string name="google_analytics_id">UA-7222692-2</string>
|
||||||
|
|
||||||
|
<!-- Symbols -->
|
||||||
|
<string name="percent">%</string>
|
||||||
|
|
||||||
|
<!-- Intent actions -->
|
||||||
|
<string name="save_intent_action">android.intent.action.SAVE</string>
|
||||||
|
<string name="open_settings_screen">android.intent.action.settings.OPEN</string>
|
||||||
|
<string name="start_new_track_action">com.google.android.apps.mytracks.START_NEW_TRACK</string>
|
||||||
|
<string name="end_current_track_action">com.google.android.apps.mytracks.END_CURRENT_TRACK
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!-- Permissions -->
|
||||||
|
<!-- Permission for MyTracks notifications. -->
|
||||||
|
<string name="mytracks_notifications_permission">com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Keys for application preferences - DO NOT TRANSLATE -->
|
<!-- Keys for application preferences. Sorted alphabetically. - DO NOT TRANSLATE -->
|
||||||
|
<string name="allow_access_key">allowAccess</string>
|
||||||
<string name="announcement_frequency_key">announcementFrequency</string>
|
<string name="announcement_frequency_key">announcementFrequency</string>
|
||||||
<string name="ant_heart_rate_sensor_id_key">antHeartRateSensorId</string>
|
<string name="ant_heart_rate_sensor_id_key">antHeartRateSensorId</string>
|
||||||
<string name="ant_power_sensor_id_key">antPowerSensorId</string>
|
<string name="ant_power_sensor_id_key">antPowerSensorId</string>
|
||||||
@@ -35,22 +36,34 @@ limitations under the License.
|
|||||||
<string name="report_speed_key">reportSpeed</string>
|
<string name="report_speed_key">reportSpeed</string>
|
||||||
<string name="send_stats_and_points_key">sendStatsAndPoints</string>
|
<string name="send_stats_and_points_key">sendStatsAndPoints</string>
|
||||||
<string name="send_to_docs_key">sendToDocs</string>
|
<string name="send_to_docs_key">sendToDocs</string>
|
||||||
<string name="send_to_my_maps_key">sendToMyMaps</string>
|
|
||||||
<string name="send_to_fusion_tables_key">sendToFusionTables</string>
|
<string name="send_to_fusion_tables_key">sendToFusionTables</string>
|
||||||
|
<string name="send_to_my_maps_key">sendToMyMaps</string>
|
||||||
<string name="sensor_type_key">sensorType</string>
|
<string name="sensor_type_key">sensorType</string>
|
||||||
<string name="share_url_only_key">shareUrlOnly</string>
|
<string name="share_url_only_key">shareUrlOnly</string>
|
||||||
<string name="split_frequency_key">splitFrequency</string>
|
<string name="split_frequency_key">splitFrequency</string>
|
||||||
<string name="timestamp_track_name_key">timestampTrackName</string>
|
<string name="timestamp_track_name_key">timestampTrackName</string>
|
||||||
|
<string name="track_color_mode_dynamic_speed_variation_key">trackColorModeDynamicVariation
|
||||||
<!-- Preference keys which keep transient state (not user preferences) - DO NOT TRANSLATE -->
|
</string>
|
||||||
|
<string name="track_color_mode_fixed_speed_medium_display_key">trackColorModeFixedMediumDisplay
|
||||||
|
</string>
|
||||||
|
<string name="track_color_mode_fixed_speed_medium_key">trackColorModeFixedMedium</string>
|
||||||
|
<string name="track_color_mode_fixed_speed_slow_display_key">trackColorModeFixedSlowDisplay
|
||||||
|
</string>
|
||||||
|
<string name="track_color_mode_fixed_speed_slow_key">trackColorModeFixedSlow</string>
|
||||||
|
<string name="track_color_mode_key">trackColorMode</string>
|
||||||
|
|
||||||
|
<!-- Preference keys which keep transient state (not user preferences). Sorted alphabetically.
|
||||||
|
- DO NOT TRANSLATE -->
|
||||||
<string name="auto_resume_track_current_retry_key">autoResumeTrackCurrentRetry</string>
|
<string name="auto_resume_track_current_retry_key">autoResumeTrackCurrentRetry</string>
|
||||||
<string name="recording_track_key">recordingTrack</string>
|
<string name="recording_track_key">recordingTrack</string>
|
||||||
<string name="selected_track_key">selectedTrack</string>
|
<string name="selected_track_key">selectedTrack</string>
|
||||||
|
|
||||||
<!-- Keys for non-persisted preferences - DO NOT TRANSLATE -->
|
<!-- Keys for non-persisted preferences. Sorted alphabetically. - DO NOT TRANSLATE -->
|
||||||
<string name="backup_to_sd_key">backupToSd</string>
|
|
||||||
<string name="restore_from_sd_key">restoreFromSd</string>
|
|
||||||
<string name="reset_key">resetToDefaults</string>
|
|
||||||
<string name="sensor_options_key">sensorOptions</string>
|
|
||||||
<string name="ant_options_key">antOptions</string>
|
<string name="ant_options_key">antOptions</string>
|
||||||
|
<string name="backup_to_sd_key">backupToSd</string>
|
||||||
|
<string name="display_settings_screen_key">displaySettingsScreen</string>
|
||||||
|
<string name="reset_key">resetToDefaults</string>
|
||||||
|
<string name="restore_from_sd_key">restoreFromSd</string>
|
||||||
|
<string name="sensor_options_key">sensorOptions</string>
|
||||||
|
<string name="track_color_mode_fixed_speed_options_key">trackColorModeFixedOptions</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ limitations under the License.
|
|||||||
<string name="error_invalid_gpx_format">File does not have a valid GPX format.</string>
|
<string name="error_invalid_gpx_format">File does not have a valid GPX format.</string>
|
||||||
<string name="error_generic">An error occurred. Please try again.</string>
|
<string name="error_generic">An error occurred. Please try again.</string>
|
||||||
<string name="error_track_does_not_exist">Track does not exist.</string>
|
<string name="error_track_does_not_exist">Track does not exist.</string>
|
||||||
|
<string name="error_operation_cancelled">The operation was cancelled.</string>
|
||||||
<string name="error_out_of_memory">This file is too big (must be less than 500 KB). Aborting.</string>
|
<string name="error_out_of_memory">This file is too big (must be less than 500 KB). Aborting.</string>
|
||||||
<string name="error_unable_to_insert_marker">Unable to insert marker. No location fix available.</string>
|
<string name="error_unable_to_insert_marker">Unable to insert marker. No location fix available.</string>
|
||||||
|
|
||||||
@@ -82,7 +83,8 @@ limitations under the License.
|
|||||||
<string name="write_progress_message">Writing file to SD card. This may take a while.</string>
|
<string name="write_progress_message">Writing file to SD card. This may take a while.</string>
|
||||||
<string name="progress_message_updating_track">Updating track statistics...</string>
|
<string name="progress_message_updating_track">Updating track statistics...</string>
|
||||||
|
|
||||||
<!-- Used by DeleteAllDataHandler -->
|
<!-- Used by deletion actions -->
|
||||||
|
<string name="deletetrack_title">Delete track</string>
|
||||||
<string name="are_you_sure_question">Are you sure?</string>
|
<string name="are_you_sure_question">Are you sure?</string>
|
||||||
<string name="all_data_will_be_permanently_deleted">All tracks and markers will be deleted from this phone.</string>
|
<string name="all_data_will_be_permanently_deleted">All tracks and markers will be deleted from this phone.</string>
|
||||||
<string name="track_will_be_permanently_deleted">The track and its markers will be permanently deleted from this phone.</string>
|
<string name="track_will_be_permanently_deleted">The track and its markers will be permanently deleted from this phone.</string>
|
||||||
@@ -157,15 +159,17 @@ limitations under the License.
|
|||||||
<string name="tracklist_clear_map">Clear map</string>
|
<string name="tracklist_clear_map">Clear map</string>
|
||||||
<!-- Import All -->
|
<!-- Import All -->
|
||||||
<string name="tracklist_btn_import_all">Import all</string>
|
<string name="tracklist_btn_import_all">Import all</string>
|
||||||
<string name="import_done">Import finished, imported</string>
|
|
||||||
<!-- Format:
|
<!-- Format:
|
||||||
$1 : Successful imports
|
$1 : Successful imports
|
||||||
$2 : Attempted imports
|
$2 : Attempted imports
|
||||||
$3 : MyTracks gpx path
|
$3 : MyTracks gpx path
|
||||||
-->
|
-->
|
||||||
<string name="import_done">Imported %1$d of %2$d GPX files from %3$s</string>
|
<string name="import_multi_done">Imported %1$d of %2$d GPX files from %3$s</string>
|
||||||
<string name="import_empty">No GPX files found in %s. SD card may be unreadable or directory may not contain GPX files.</string>
|
<string name="import_multi_empty">No GPX files found in %s. SD card may be unreadable or directory may not contain GPX files.</string>
|
||||||
<string name="import_error">Import error for file %s</string>
|
<string name="import_error">Import error for file %s</string>
|
||||||
|
<string name="import_title">Import into My Tracks</string>
|
||||||
|
<string name="import_success">Successfully imported %1$d track(s) from file.</string>
|
||||||
|
<string name="import_show_track">Show track</string>
|
||||||
|
|
||||||
<!-- Waypoints list -->
|
<!-- Waypoints list -->
|
||||||
<string name="waypointslist_btn_delete_all">Delete all markers</string>
|
<string name="waypointslist_btn_delete_all">Delete all markers</string>
|
||||||
@@ -180,14 +184,20 @@ limitations under the License.
|
|||||||
<!-- MyTracks Details -->
|
<!-- MyTracks Details -->
|
||||||
<string name="trackdetails_title">Track Details</string>
|
<string name="trackdetails_title">Track Details</string>
|
||||||
<string name="trackdetails_name">Track Name</string>
|
<string name="trackdetails_name">Track Name</string>
|
||||||
|
<string name="trackdetails_name_hint">Track Name</string>
|
||||||
<string name="trackdetails_description">Track Description</string>
|
<string name="trackdetails_description">Track Description</string>
|
||||||
|
<string name="trackdetails_description_hint">Track Description</string>
|
||||||
<string name="trackdetails_category">Activity Type (e.g. hiking, cycling, running, climbing...)</string>
|
<string name="trackdetails_category">Activity Type (e.g. hiking, cycling, running, climbing...)</string>
|
||||||
|
<string name="trackdetails_category_hint">Activity Type</string>
|
||||||
|
|
||||||
<!-- MyTracks Waypoint Details -->
|
<!-- MyTracks Waypoint Details -->
|
||||||
<string name="waypointdetails_title">Marker Details</string>
|
<string name="waypointdetails_title">Marker Details</string>
|
||||||
<string name="waypointdetails_name">Marker Name</string>
|
<string name="waypointdetails_name">Marker Name</string>
|
||||||
|
<string name="waypointdetails_name_hint">Marker Name</string>
|
||||||
<string name="waypointdetails_description">Marker Description</string>
|
<string name="waypointdetails_description">Marker Description</string>
|
||||||
|
<string name="waypointdetails_description_hint">Marker Description</string>
|
||||||
<string name="waypointdetails_category">Marker Type (e.g. Building, Pothole, Sight...)</string>
|
<string name="waypointdetails_category">Marker Type (e.g. Building, Pothole, Sight...)</string>
|
||||||
|
<string name="waypointdetails_category_hint">Marker Type</string>
|
||||||
|
|
||||||
<!-- MyTracks Settings -->
|
<!-- MyTracks Settings -->
|
||||||
<string name="mytracks_settings">My Tracks Settings</string>
|
<string name="mytracks_settings">My Tracks Settings</string>
|
||||||
@@ -198,6 +208,15 @@ limitations under the License.
|
|||||||
<string name="settings_not_available_summary">Not available in your version of Android</string>
|
<string name="settings_not_available_summary">Not available in your version of Android</string>
|
||||||
<string name="settings_not_while_recording">Not available while recording a track</string>
|
<string name="settings_not_while_recording">Not available while recording a track</string>
|
||||||
|
|
||||||
|
<string name="settings_allow_access">Allow access</string>
|
||||||
|
<string name="settings_allow_access_summary_on">Other apps can read, write, start/stop recording
|
||||||
|
MyTracks data.</string>
|
||||||
|
<string name="settings_allow_access_summary_off">Other apps cannot read, write, start/stop
|
||||||
|
recording MyTracks data.</string>
|
||||||
|
<string name="settings_allow_access_dialog_message">Are you sure you want to allow other apps,
|
||||||
|
including future apps, to control and access MyTracks data? There will be no further
|
||||||
|
notification.</string>
|
||||||
|
|
||||||
<string name="settings_announcement_frequency">Announcement frequency</string>
|
<string name="settings_announcement_frequency">Announcement frequency</string>
|
||||||
<string name="settings_announcement_frequency_summary">Minimum time between two voice announcements</string>
|
<string name="settings_announcement_frequency_summary">Minimum time between two voice announcements</string>
|
||||||
|
|
||||||
@@ -258,6 +277,17 @@ limitations under the License.
|
|||||||
<string name="bluetooth_sensor_summary">The bluetooth sensor to connect to</string>
|
<string name="bluetooth_sensor_summary">The bluetooth sensor to connect to</string>
|
||||||
<string name="settings_modular_stats_display_title">Modular Stats Display</string>
|
<string name="settings_modular_stats_display_title">Modular Stats Display</string>
|
||||||
|
|
||||||
|
<string name="settings_track_color_mode">Track Color Mode</string>
|
||||||
|
<string name="settings_track_color_mode_summary">The way to color the track</string>
|
||||||
|
<string name="settings_track_color_mode_fixed">Fixed</string>
|
||||||
|
<string name="settings_track_color_mode_dynamic">Dynamic</string>
|
||||||
|
<string name="settings_track_color_mode_fixed_speed_slow">Fixed Speed Slow</string>
|
||||||
|
<string name="settings_track_color_mode_fixed_speed_slow_summary">Slow speed top value</string>
|
||||||
|
<string name="settings_track_color_mode_fixed_speed_medium">Fixed Speed Medium</string>
|
||||||
|
<string name="settings_track_color_mode_fixed_speed_medium_summary">Medium speed top value</string>
|
||||||
|
<string name="settings_track_color_mode_dynamic_speed_variation">Dynamic Speed Variation</string>
|
||||||
|
<string name="settings_track_color_mode_dynamic_speed_variation_summary">% Margin from average speed to consider medium speed</string>
|
||||||
|
|
||||||
<!-- Backups -->
|
<!-- Backups -->
|
||||||
<string name="settings_backup">Backup (BETA)</string>
|
<string name="settings_backup">Backup (BETA)</string>
|
||||||
<string name="settings_sd_backup">SD Card Backup</string>
|
<string name="settings_sd_backup">SD Card Backup</string>
|
||||||
@@ -380,6 +410,7 @@ limitations under the License.
|
|||||||
|
|
||||||
<string name="revolutions_per_minute">rpm</string>
|
<string name="revolutions_per_minute">rpm</string>
|
||||||
<string name="bpm">bpm</string>
|
<string name="bpm">bpm</string>
|
||||||
|
<string name="battery_level">Battery Level</string>
|
||||||
|
|
||||||
<!-- Stats Labels -->
|
<!-- Stats Labels -->
|
||||||
<string name="moving_time_label">Moving Time</string>
|
<string name="moving_time_label">Moving Time</string>
|
||||||
@@ -472,7 +503,10 @@ limitations under the License.
|
|||||||
<string name="sensor_bluetooth_options_key">bluetoothSensorsEnabled</string>
|
<string name="sensor_bluetooth_options_key">bluetoothSensorsEnabled</string>
|
||||||
<string name="ant_options">ANT options</string>
|
<string name="ant_options">ANT options</string>
|
||||||
<string name="sensor_options">Sensor Options</string>
|
<string name="sensor_options">Sensor Options</string>
|
||||||
|
<string name="track_color_mode">Track Color Mode</string>
|
||||||
|
<string name="fixed_speed_options">Fixed Speed Options</string>
|
||||||
|
<string name="dynamic_speed_options">Dynamic Speed Options</string>
|
||||||
|
|
||||||
<!-- Bluetooth Sensor -->
|
<!-- Bluetooth Sensor -->
|
||||||
<string name="bluetooth_connected">Connected to %s</string>
|
<string name="bluetooth_connected">Connected to %s</string>
|
||||||
<string name="bluetooth_connecting">Bluetooth sensor connecting ...</string>
|
<string name="bluetooth_connecting">Bluetooth sensor connecting ...</string>
|
||||||
@@ -492,10 +526,29 @@ limitations under the License.
|
|||||||
<string name="sending">Sending</string>
|
<string name="sending">Sending</string>
|
||||||
|
|
||||||
<!-- Manifest description (not seen inside the app) -->
|
<!-- Manifest description (not seen inside the app) -->
|
||||||
<string name="notification_permission_label">receive track recording notifications</string>
|
<string name="notification_permission_label">receive MyTracks notifications</string>
|
||||||
<string name="read_tracks_permission_label">read recorded track data</string>
|
<string name="mytracks_notifications_permission_label">receive MyTracks notifications</string>
|
||||||
<string name="write_tracks_permission_label">write recorded track data, start/stop recording tracks</string>
|
<string name="read_tracks_permission_label">read MyTracks data</string>
|
||||||
<string name="notification_permission_description">Be notified when a track starts or stops being recorded.</string>
|
<string name="write_tracks_permission_label">write data to MyTracks and start/stop MyTracks
|
||||||
<string name="read_tracks_permission_description">Be able to read track data, such as points and waypoints.</string>
|
recording</string>
|
||||||
<string name="write_tracks_permission_description">Be able to write track data, such as starting recording or adding waypoints.</string>
|
<string name="notification_permission_description">Allows the application to receive notifications
|
||||||
|
when MyTracks starts or stops a recording.</string>
|
||||||
|
<string name="mytracks_notifications_permission_description">receive MyTracks notifications
|
||||||
|
</string>
|
||||||
|
<string name="read_tracks_permission_description">Allows the application to read MyTracks data.
|
||||||
|
</string>
|
||||||
|
<string name="write_tracks_permission_description">Allows the application to write data to
|
||||||
|
MyTracks and start/stop MyTracks recording.</string>
|
||||||
|
|
||||||
|
<!-- Sensor Type Options -->
|
||||||
|
<string name="no_sensor_option">NONE</string>
|
||||||
|
<string name="ant_sensor_option">ANT+ Sensors</string>
|
||||||
|
<string name="ant_bridge_sensor_option">SRM ANT+ Bridge</string>
|
||||||
|
<string name="polar_bt_sensor_option">Polar Bluetooth</string>
|
||||||
|
<string name="zephyr_bt_sensor_option">Zephyr Bluetooth</string>
|
||||||
|
|
||||||
|
<!-- Track Color Modes -->
|
||||||
|
<string name="track_color_mode_none">None</string>
|
||||||
|
<string name="track_color_mode_fixed">Fixed (BETA)</string>
|
||||||
|
<string name="track_color_mode_dynamic">Dynamic (BETA)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -74,4 +74,33 @@ limitations under the License.
|
|||||||
<item name="android:layout_height">3dip</item>
|
<item name="android:layout_height">3dip</item>
|
||||||
<item name="android:layout_width">fill_parent</item>
|
<item name="android:layout_width">fill_parent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- The style for the track widget. -->
|
||||||
|
<style name="WidgetText" parent="@android:Widget.TextView">
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:textColor">@color/appwidget_text</item>
|
||||||
|
<item name="android:textSize">14sp</item>
|
||||||
|
</style>
|
||||||
|
<style name="WidgetText.Register">
|
||||||
|
<item name="android:width">160px</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- The style for the buttons on the bottom of a dialog. -->
|
||||||
|
<style name="DialogButton">
|
||||||
|
<item name="android:layout_height">48dip</item>
|
||||||
|
<item name="android:layout_weight">1</item>
|
||||||
|
<item name="android:layout_width">0dip</item>
|
||||||
|
<item name="android:maxLines">2</item>
|
||||||
|
<item name="android:textSize">14dip</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- The style for the spacer on the left and right of the dialog buttons. -->
|
||||||
|
<style name="DialogButtonSpacer">
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_weight">0.25</item>
|
||||||
|
<item name="android:layout_width">0dip</item>
|
||||||
|
<item name="android:orientation">horizontal</item>
|
||||||
|
<item name="android:visibility">gone</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -18,7 +18,8 @@ limitations under the License.
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<!-- Display settings -->
|
<!-- Display settings -->
|
||||||
<PreferenceScreen android:title="@string/settings_display">
|
<PreferenceScreen android:title="@string/settings_display"
|
||||||
|
android:key="@string/display_settings_screen_key">
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="@string/metric_units_key"
|
android:key="@string/metric_units_key"
|
||||||
android:title="@string/settings_metric_units"
|
android:title="@string/settings_metric_units"
|
||||||
@@ -32,6 +33,58 @@ limitations under the License.
|
|||||||
android:summaryOn="@string/settings_report_speed_or_pace_summary_on"
|
android:summaryOn="@string/settings_report_speed_or_pace_summary_on"
|
||||||
android:summaryOff="@string/settings_report_speed_or_pace_summary_off"
|
android:summaryOff="@string/settings_report_speed_or_pace_summary_off"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
|
|
||||||
|
<ListPreference android:key="@string/track_color_mode_key"
|
||||||
|
android:title="@string/settings_track_color_mode"
|
||||||
|
android:summary="@string/settings_track_color_mode_summary"
|
||||||
|
android:entries="@array/track_color_mode_options"
|
||||||
|
android:entryValues="@array/track_color_mode_values"
|
||||||
|
android:defaultValue="@string/none"/>
|
||||||
|
|
||||||
|
<PreferenceCategory android:title="@string/fixed_speed_options"
|
||||||
|
android:key="@string/track_color_mode_fixed_speed_options_key">
|
||||||
|
<EditTextPreference android:key="@string/track_color_mode_fixed_speed_slow_key"
|
||||||
|
android:title="@string/settings_track_color_mode_fixed_speed_slow"
|
||||||
|
android:summary="@string/settings_track_color_mode_fixed_speed_slow_summary"
|
||||||
|
android:defaultValue="9"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="3">
|
||||||
|
</EditTextPreference>
|
||||||
|
|
||||||
|
<EditTextPreference android:key="@string/track_color_mode_fixed_speed_slow_display_key"
|
||||||
|
android:title="@string/settings_track_color_mode_fixed_speed_slow"
|
||||||
|
android:summary="@string/settings_track_color_mode_fixed_speed_slow_summary"
|
||||||
|
android:defaultValue="9"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="3">
|
||||||
|
</EditTextPreference>
|
||||||
|
|
||||||
|
<EditTextPreference android:key="@string/track_color_mode_fixed_speed_medium_key"
|
||||||
|
android:title="@string/settings_track_color_mode_fixed_speed_medium"
|
||||||
|
android:summary="@string/settings_track_color_mode_fixed_speed_medium_summary"
|
||||||
|
android:defaultValue="15"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="3">
|
||||||
|
</EditTextPreference>
|
||||||
|
|
||||||
|
<EditTextPreference android:key="@string/track_color_mode_fixed_speed_medium_display_key"
|
||||||
|
android:title="@string/settings_track_color_mode_fixed_speed_medium"
|
||||||
|
android:summary="@string/settings_track_color_mode_fixed_speed_medium_summary"
|
||||||
|
android:defaultValue="15"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="3">
|
||||||
|
</EditTextPreference>
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory android:title="@string/dynamic_speed_options">
|
||||||
|
<EditTextPreference android:key="@string/track_color_mode_dynamic_speed_variation_key"
|
||||||
|
android:title="@string/settings_track_color_mode_dynamic_speed_variation"
|
||||||
|
android:summary="@string/settings_track_color_mode_dynamic_speed_variation_summary"
|
||||||
|
android:defaultValue="25"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLength="2">
|
||||||
|
</EditTextPreference>
|
||||||
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<!-- Recording settings -->
|
<!-- Recording settings -->
|
||||||
@@ -42,14 +95,14 @@ limitations under the License.
|
|||||||
android:summary="@string/settings_announcement_frequency_summary"
|
android:summary="@string/settings_announcement_frequency_summary"
|
||||||
android:entries="@array/task_frequency_options"
|
android:entries="@array/task_frequency_options"
|
||||||
android:entryValues="@array/task_frequency_values"
|
android:entryValues="@array/task_frequency_values"
|
||||||
android:defaultValue="-1" />
|
android:defaultValue="0" />
|
||||||
|
|
||||||
<com.google.android.apps.mytracks.IntegerListPreference
|
<com.google.android.apps.mytracks.IntegerListPreference
|
||||||
android:key="@string/split_frequency_key"
|
android:key="@string/split_frequency_key"
|
||||||
android:title="@string/settings_split_frequency"
|
android:title="@string/settings_split_frequency"
|
||||||
android:summary="@string/settings_split_frequency_summary"
|
android:summary="@string/settings_split_frequency_summary"
|
||||||
android:entries="@array/split_frequency_options"
|
android:entries="@array/task_frequency_options"
|
||||||
android:entryValues="@array/split_frequency_values"
|
android:entryValues="@array/task_frequency_values"
|
||||||
android:defaultValue="0" />
|
android:defaultValue="0" />
|
||||||
|
|
||||||
<com.google.android.apps.mytracks.IntegerListPreference
|
<com.google.android.apps.mytracks.IntegerListPreference
|
||||||
@@ -156,6 +209,13 @@ limitations under the License.
|
|||||||
android:summaryOn="@string/settings_share_url_only_summary_on"
|
android:summaryOn="@string/settings_share_url_only_summary_on"
|
||||||
android:summaryOff="@string/settings_share_url_only_summary_off"
|
android:summaryOff="@string/settings_share_url_only_summary_off"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:key="@string/allow_access_key"
|
||||||
|
android:title="@string/settings_allow_access"
|
||||||
|
android:summaryOn="@string/settings_allow_access_summary_on"
|
||||||
|
android:summaryOff="@string/settings_allow_access_summary_off"
|
||||||
|
android:defaultValue="false" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<!-- Backup settings -->
|
<!-- Backup settings -->
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright 2011 Google Inc.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<appwidget-provider
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:initialLayout="@layout/track_widget"
|
||||||
|
android:minHeight="72dp"
|
||||||
|
android:minWidth="294dp"
|
||||||
|
android:updatePeriodMillis="0" />
|
||||||
@@ -15,22 +15,20 @@
|
|||||||
*/
|
*/
|
||||||
package com.dsi.ant;
|
package com.dsi.ant;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import com.dsi.ant.exception.AntInterfaceException;
|
||||||
|
import com.dsi.ant.exception.AntRemoteException;
|
||||||
|
import com.dsi.ant.exception.AntServiceNotConnectedException;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.content.pm.PackageManager;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.dsi.ant.exception.*;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Public API for controlling the Ant Service. AntInterface is a proxy
|
* Public API for controlling the Ant Service. AntInterface is a proxy
|
||||||
@@ -63,10 +61,10 @@ public class AntInterface {
|
|||||||
private static Object INSTANCE_LOCK = new Object();
|
private static Object INSTANCE_LOCK = new Object();
|
||||||
|
|
||||||
/** The context to use. */
|
/** The context to use. */
|
||||||
private static Context sContext = null;
|
private Context sContext = null;
|
||||||
|
|
||||||
/** Listens to changes to service connection status. */
|
/** Listens to changes to service connection status. */
|
||||||
private static ServiceListener sServiceListener;
|
private ServiceListener sServiceListener;
|
||||||
|
|
||||||
/** Is the ANT Radio Proxy Service connected. */
|
/** Is the ANT Radio Proxy Service connected. */
|
||||||
private static boolean sServiceConnected = false;
|
private static boolean sServiceConnected = false;
|
||||||
@@ -212,7 +210,7 @@ public class AntInterface {
|
|||||||
/**
|
/**
|
||||||
* Class for interacting with the ANT interface.
|
* Class for interacting with the ANT interface.
|
||||||
*/
|
*/
|
||||||
private static ServiceConnection sIAntConnection = new ServiceConnection() {
|
private final ServiceConnection sIAntConnection = new ServiceConnection() {
|
||||||
public void onServiceConnected(ComponentName pClassName, IBinder pService) {
|
public void onServiceConnected(ComponentName pClassName, IBinder pService) {
|
||||||
// This is called when the connection with the service has been
|
// This is called when the connection with the service has been
|
||||||
// established, giving us the service object we can use to
|
// established, giving us the service object we can use to
|
||||||
@@ -1225,7 +1223,7 @@ public class AntInterface {
|
|||||||
*/
|
*/
|
||||||
public boolean requestForceClaimInterface(String appName) throws AntInterfaceException
|
public boolean requestForceClaimInterface(String appName) throws AntInterfaceException
|
||||||
{
|
{
|
||||||
if((null == appName) || ("" == appName))
|
if((null == appName) || ("".equals(appName)))
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010 Google Inc.
|
* Copyright 2010 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.accounts.Account;
|
|
||||||
import com.google.android.accounts.AccountManager;
|
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.accounts.Account;
|
||||||
|
import android.accounts.AccountManager;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@@ -29,7 +29,7 @@ import android.util.Log;
|
|||||||
* @author Sandor Dornbush
|
* @author Sandor Dornbush
|
||||||
*/
|
*/
|
||||||
public class AccountChooser {
|
public class AccountChooser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The last selected account.
|
* The last selected account.
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +44,7 @@ public class AccountChooser {
|
|||||||
* Handle the account being selected.
|
* Handle the account being selected.
|
||||||
* @param account The selected account or null if none could be found
|
* @param account The selected account or null if none could be found
|
||||||
*/
|
*/
|
||||||
public void handleAccountSelected(Account account);
|
public void onAccountSelected(Account account);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,45 +52,51 @@ public class AccountChooser {
|
|||||||
* If no account is found the user will be alerted.
|
* If no account is found the user will be alerted.
|
||||||
* If only one account is found that will be used.
|
* If only one account is found that will be used.
|
||||||
* If multiple accounts are found the user will be allowed to choose.
|
* If multiple accounts are found the user will be allowed to choose.
|
||||||
*
|
*
|
||||||
* @param activity The parent activity
|
* @param activity The parent activity
|
||||||
* @param handler The handler to be notified when an account has been selected
|
* @param handler The handler to be notified when an account has been selected
|
||||||
*/
|
*/
|
||||||
public void chooseAccount(final Activity activity,
|
public void chooseAccount(final Activity activity,
|
||||||
final AccountHandler handler) {
|
final AccountHandler handler) {
|
||||||
final Account[] accounts = AccountManager.get(activity)
|
final Account[] accounts = AccountManager.get(activity)
|
||||||
.getAccountsByType(MyTracksConstants.ACCOUNT_TYPE);
|
.getAccountsByType(Constants.ACCOUNT_TYPE);
|
||||||
if (accounts.length < 1) {
|
if (accounts.length < 1) {
|
||||||
alertNoAccounts(activity, handler);
|
alertNoAccounts(activity, handler);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (accounts.length == 1) {
|
if (accounts.length == 1) {
|
||||||
handler.handleAccountSelected(accounts[0]);
|
handler.onAccountSelected(accounts[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO This should be read out of a preference.
|
// TODO This should be read out of a preference.
|
||||||
if (selectedAccount != null) {
|
if (selectedAccount != null) {
|
||||||
handler.handleAccountSelected(selectedAccount);
|
handler.onAccountSelected(selectedAccount);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let the user choose.
|
// Let the user choose.
|
||||||
Log.e(MyTracksConstants.TAG, "Multiple matching accounts found.");
|
Log.e(Constants.TAG, "Multiple matching accounts found.");
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.choose_account_title);
|
builder.setTitle(R.string.choose_account_title);
|
||||||
builder.setCancelable(false);
|
builder.setCancelable(false);
|
||||||
builder.setPositiveButton(R.string.ok,
|
builder.setPositiveButton(R.string.ok,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
selectedAccount = accounts[selectedAccountIndex];
|
dialog.dismiss();
|
||||||
handler.handleAccountSelected(selectedAccount);
|
|
||||||
|
if (selectedAccountIndex >= 0) {
|
||||||
|
selectedAccount = accounts[selectedAccountIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
handler.onAccountSelected(selectedAccount);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(R.string.cancel,
|
builder.setNegativeButton(R.string.cancel,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
handler.handleAccountSelected(null);
|
dialog.dismiss();
|
||||||
|
handler.onAccountSelected(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
String[] choices = new String[accounts.length];
|
String[] choices = new String[accounts.length];
|
||||||
@@ -107,12 +113,16 @@ public class AccountChooser {
|
|||||||
builder.show();
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setChosenAccount(String accountName, String accountType) {
|
||||||
|
selectedAccount = new Account(accountName, accountType);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Puts up a dialog alerting the user that no suitable account was found.
|
* Puts up a dialog alerting the user that no suitable account was found.
|
||||||
*/
|
*/
|
||||||
private void alertNoAccounts(final Activity activity,
|
private void alertNoAccounts(final Activity activity,
|
||||||
final AccountHandler handler) {
|
final AccountHandler handler) {
|
||||||
Log.e(MyTracksConstants.TAG, "No matching accounts found.");
|
Log.e(Constants.TAG, "No matching accounts found.");
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setTitle(R.string.no_account_found_title);
|
builder.setTitle(R.string.no_account_found_title);
|
||||||
builder.setMessage(R.string.no_account_found);
|
builder.setMessage(R.string.no_account_found);
|
||||||
@@ -120,7 +130,8 @@ public class AccountChooser {
|
|||||||
builder.setNegativeButton(R.string.ok,
|
builder.setNegativeButton(R.string.ok,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
handler.handleAccountSelected(null);
|
dialog.dismiss();
|
||||||
|
handler.onAccountSelected(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.show();
|
builder.show();
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity for viewing the combined statistics for all the recorded tracks.
|
* Activity for viewing the combined statistics for all the recorded tracks.
|
||||||
*
|
*
|
||||||
* Other features to add - menu items to change setings.
|
* Other features to add - menu items to change setings.
|
||||||
*
|
*
|
||||||
* @author Fergus Nelson
|
* @author Fergus Nelson
|
||||||
*/
|
*/
|
||||||
public class AggregatedStatsActivity extends Activity implements
|
public class AggregatedStatsActivity extends Activity implements
|
||||||
@@ -40,10 +40,10 @@ public class AggregatedStatsActivity extends Activity implements
|
|||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
|
||||||
String key) {
|
String key) {
|
||||||
Log.d(MyTracksConstants.TAG, "StatsActivity: onSharedPreferences changed "
|
Log.d(Constants.TAG, "StatsActivity: onSharedPreferences changed "
|
||||||
+ key);
|
+ key);
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
if (key.equals(R.string.metric_units_key)) {
|
if (key.equals(getString(R.string.metric_units_key))) {
|
||||||
metricUnits = sharedPreferences.getBoolean(
|
metricUnits = sharedPreferences.getBoolean(
|
||||||
getString(R.string.metric_units_key), true);
|
getString(R.string.metric_units_key), true);
|
||||||
utils.setMetricUnits(metricUnits);
|
utils.setMetricUnits(metricUnits);
|
||||||
@@ -67,7 +67,7 @@ public class AggregatedStatsActivity extends Activity implements
|
|||||||
sv.setScrollBarStyle(ScrollView.SCROLLBARS_OUTSIDE_INSET);
|
sv.setScrollBarStyle(ScrollView.SCROLLBARS_OUTSIDE_INSET);
|
||||||
|
|
||||||
SharedPreferences preferences = getSharedPreferences(
|
SharedPreferences preferences = getSharedPreferences(
|
||||||
MyTracksSettings.SETTINGS_NAME, 0);
|
Constants.SETTINGS_NAME, 0);
|
||||||
if (preferences != null) {
|
if (preferences != null) {
|
||||||
metricUnits = preferences.getBoolean(getString(R.string.metric_units_key), true);
|
metricUnits = preferences.getBoolean(getString(R.string.metric_units_key), true);
|
||||||
preferences.registerOnSharedPreferenceChangeListener(this);
|
preferences.registerOnSharedPreferenceChangeListener(this);
|
||||||
@@ -86,8 +86,8 @@ public class AggregatedStatsActivity extends Activity implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1. Reads tracks from the db
|
* 1. Reads tracks from the db
|
||||||
* 2. Merges the trip stats from the tracks
|
* 2. Merges the trip stats from the tracks
|
||||||
* 3. Updates the view
|
* 3. Updates the view
|
||||||
*/
|
*/
|
||||||
private void loadAggregatedStats() {
|
private void loadAggregatedStats() {
|
||||||
|
|||||||
+5
-5
@@ -16,8 +16,8 @@
|
|||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import static android.content.Intent.ACTION_BOOT_COMPLETED;
|
import static android.content.Intent.ACTION_BOOT_COMPLETED;
|
||||||
import static com.google.android.apps.mytracks.MyTracksConstants.RESUME_TRACK_EXTRA_NAME;
|
import static com.google.android.apps.mytracks.Constants.RESUME_TRACK_EXTRA_NAME;
|
||||||
import static com.google.android.apps.mytracks.MyTracksConstants.TAG;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.services.TrackRecordingService;
|
import com.google.android.apps.mytracks.services.TrackRecordingService;
|
||||||
|
|
||||||
@@ -41,17 +41,17 @@ import android.util.Log;
|
|||||||
*
|
*
|
||||||
* @author Bartlomiej Niechwiej
|
* @author Bartlomiej Niechwiej
|
||||||
*/
|
*/
|
||||||
public class MyTracksReceiver extends BroadcastReceiver {
|
public class BootReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
Log.d(TAG, "MyTracksReceiver.onReceive: " + intent.getAction());
|
Log.d(TAG, "BootReceiver.onReceive: " + intent.getAction());
|
||||||
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
if (ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
|
||||||
Intent startIntent = new Intent(context, TrackRecordingService.class);
|
Intent startIntent = new Intent(context, TrackRecordingService.class);
|
||||||
startIntent.putExtra(RESUME_TRACK_EXTRA_NAME, true);
|
startIntent.putExtra(RESUME_TRACK_EXTRA_NAME, true);
|
||||||
context.startService(startIntent);
|
context.startService(startIntent);
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "MyTracksReceiver: unsupported action");
|
Log.w(TAG, "BootReceiver: unsupported action");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,31 +15,31 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.ChartView.Mode;
|
import com.google.android.apps.mytracks.ChartView.Mode;
|
||||||
import com.google.android.apps.mytracks.content.MyTracksLocation;
|
import com.google.android.apps.mytracks.content.MyTracksLocation;
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
|
||||||
import com.google.android.apps.mytracks.content.Sensor;
|
import com.google.android.apps.mytracks.content.Sensor;
|
||||||
import com.google.android.apps.mytracks.content.Track;
|
|
||||||
import com.google.android.apps.mytracks.content.TrackPointsColumns;
|
|
||||||
import com.google.android.apps.mytracks.content.Waypoint;
|
|
||||||
import com.google.android.apps.mytracks.content.WaypointsColumns;
|
|
||||||
import com.google.android.apps.mytracks.content.Sensor.SensorDataSet;
|
import com.google.android.apps.mytracks.content.Sensor.SensorDataSet;
|
||||||
import com.google.android.apps.mytracks.services.StatusAnnouncerFactory;
|
import com.google.android.apps.mytracks.content.Track;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub.ListenerDataType;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataListener;
|
||||||
|
import com.google.android.apps.mytracks.content.Waypoint;
|
||||||
|
import com.google.android.apps.mytracks.services.tasks.StatusAnnouncerFactory;
|
||||||
import com.google.android.apps.mytracks.stats.DoubleBuffer;
|
import com.google.android.apps.mytracks.stats.DoubleBuffer;
|
||||||
import com.google.android.apps.mytracks.stats.TripStatisticsBuilder;
|
import com.google.android.apps.mytracks.stats.TripStatisticsBuilder;
|
||||||
import com.google.android.apps.mytracks.util.ApiFeatures;
|
import com.google.android.apps.mytracks.util.ApiFeatures;
|
||||||
import com.google.android.apps.mytracks.util.MyTracksUtils;
|
import com.google.android.apps.mytracks.util.LocationUtils;
|
||||||
import com.google.android.apps.mytracks.util.UnitConversions;
|
import com.google.android.apps.mytracks.util.UnitConversions;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.SharedPreferences;
|
import android.app.Dialog;
|
||||||
import android.database.ContentObserver;
|
import android.content.DialogInterface;
|
||||||
import android.database.Cursor;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.HandlerThread;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@@ -51,53 +51,34 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.ZoomControls;
|
import android.widget.ZoomControls;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity that displays a chart from the track point provider.
|
* An activity that displays a chart from the track point provider.
|
||||||
*
|
*
|
||||||
* @author Sandor Dornbush
|
* @author Sandor Dornbush
|
||||||
|
* @author Rodrigo Damazio
|
||||||
*/
|
*/
|
||||||
public class ChartActivity extends Activity implements
|
public class ChartActivity extends Activity implements TrackDataListener {
|
||||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
|
||||||
|
|
||||||
private final static int BUFFER_SIZE = 1024;
|
|
||||||
private double profileLength = 0;
|
|
||||||
|
|
||||||
private boolean metricUnits = true;
|
|
||||||
private boolean reportSpeed = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The track id that is displayed.
|
|
||||||
*/
|
|
||||||
private long selectedTrackId = -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Id of the last location that was seen when reading tracks from the
|
|
||||||
* provider. This is used to determine which locations are new compared to the
|
|
||||||
* last time the chart was updated.
|
|
||||||
*/
|
|
||||||
private long lastSeenLocationId = -1;
|
|
||||||
|
|
||||||
private long startTime = -1;
|
|
||||||
|
|
||||||
private Location lastLocation;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the track currently being recorded.
|
|
||||||
*/
|
|
||||||
private long recordingTrackId = -1;
|
|
||||||
|
|
||||||
|
private static final int CHART_SETTINGS_DIALOG = 1;
|
||||||
private final DoubleBuffer elevationBuffer =
|
private final DoubleBuffer elevationBuffer =
|
||||||
new DoubleBuffer(MyTracksConstants.ELEVATION_SMOOTHING_FACTOR);
|
new DoubleBuffer(Constants.ELEVATION_SMOOTHING_FACTOR);
|
||||||
private final DoubleBuffer speedBuffer =
|
private final DoubleBuffer speedBuffer =
|
||||||
new DoubleBuffer(MyTracksConstants.SPEED_SMOOTHING_FACTOR);
|
new DoubleBuffer(Constants.SPEED_SMOOTHING_FACTOR);
|
||||||
|
private final ArrayList<double[]> pendingPoints = new ArrayList<double[]>();
|
||||||
|
|
||||||
private Mode mode = Mode.BY_DISTANCE;
|
private TrackDataHub dataHub;
|
||||||
|
|
||||||
/**
|
// Stats gathered from received data.
|
||||||
* Utilities to deal with the database.
|
private double profileLength = 0;
|
||||||
*/
|
private long startTime = -1;
|
||||||
private MyTracksProviderUtils providerUtils;
|
private Location lastLocation;
|
||||||
|
private double trackMaxSpeed;
|
||||||
|
|
||||||
|
// Modes of operation
|
||||||
|
private boolean metricUnits;
|
||||||
|
private boolean reportSpeed;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UI elements:
|
* UI elements:
|
||||||
@@ -107,9 +88,6 @@ public class ChartActivity extends Activity implements
|
|||||||
private LinearLayout busyPane;
|
private LinearLayout busyPane;
|
||||||
private ZoomControls zoomControls;
|
private ZoomControls zoomControls;
|
||||||
|
|
||||||
/** Handler for callbacks to the UI thread */
|
|
||||||
private final Handler uiHandler = new Handler();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A runnable that can be posted to the UI thread. It will remove the spinner
|
* A runnable that can be posted to the UI thread. It will remove the spinner
|
||||||
* (if any), enable/disable zoom controls and orange pointer as appropriate
|
* (if any), enable/disable zoom controls and orange pointer as appropriate
|
||||||
@@ -118,92 +96,24 @@ public class ChartActivity extends Activity implements
|
|||||||
private final Runnable updateChart = new Runnable() {
|
private final Runnable updateChart = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
// Get a local reference in case it's set to null concurrently with this.
|
||||||
|
TrackDataHub localDataHub = dataHub;
|
||||||
|
if (localDataHub == null || isFinishing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
busyPane.setVisibility(View.GONE);
|
busyPane.setVisibility(View.GONE);
|
||||||
zoomControls.setIsZoomInEnabled(chartView.canZoomIn());
|
zoomControls.setIsZoomInEnabled(chartView.canZoomIn());
|
||||||
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
||||||
chartView.setShowPointer(selectedTrackIsRecording());
|
chartView.setShowPointer(localDataHub.isRecordingSelected());
|
||||||
chartView.invalidate();
|
chartView.invalidate();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* A runnable that can be posted to the UI thread. It will show the spinner.
|
|
||||||
*/
|
|
||||||
private final Runnable showSpinner = new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
busyPane.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An observer for the tracks provider. Will listen to new track points being
|
|
||||||
* added and update the chart if necessary.
|
|
||||||
*/
|
|
||||||
private ContentObserver observer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An observer for the waypoints provider. Will listen to new way points being
|
|
||||||
* added and update the chart if necessary.
|
|
||||||
*/
|
|
||||||
private ContentObserver waypointObserver;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A thread with a looper. Post to updateTrackHandler to execute Runnables on
|
|
||||||
* this thread.
|
|
||||||
*/
|
|
||||||
private final HandlerThread updateTrackThread =
|
|
||||||
new HandlerThread("updateTrackThread");
|
|
||||||
|
|
||||||
/** Handler for updateTrackThread */
|
|
||||||
private Handler updateTrackHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A runnable that updates the profile from the provider.
|
|
||||||
*/
|
|
||||||
private final Runnable updateTrackRunnable = new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
readNewTrackPoints();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
|
|
||||||
String key) {
|
|
||||||
if (key != null) {
|
|
||||||
if (key.equals(getString(R.string.selected_track_key))) {
|
|
||||||
selectedTrackId =
|
|
||||||
sharedPreferences.getLong(getString(R.string.selected_track_key),
|
|
||||||
-1);
|
|
||||||
readProfileAsync();
|
|
||||||
} else if (key.equals(getString(R.string.metric_units_key))) {
|
|
||||||
metricUnits =
|
|
||||||
sharedPreferences.getBoolean(getString(R.string.metric_units_key),
|
|
||||||
true);
|
|
||||||
chartView.setMetricUnits(metricUnits);
|
|
||||||
readProfileAsync();
|
|
||||||
} else if (key.equals(getString(R.string.report_speed_key))) {
|
|
||||||
reportSpeed =
|
|
||||||
sharedPreferences.getBoolean(getString(R.string.report_speed_key),
|
|
||||||
true);
|
|
||||||
chartView.setReportSpeed(reportSpeed, this);
|
|
||||||
readProfileAsync();
|
|
||||||
} else if (key.equals(getString(R.string.recording_track_key))) {
|
|
||||||
recordingTrackId =
|
|
||||||
sharedPreferences.getLong(getString(R.string.recording_track_key),
|
|
||||||
-1);
|
|
||||||
runOnUiThread(updateChart);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
Log.w(MyTracksConstants.TAG, "ChartActivity.onCreate");
|
Log.w(TAG, "ChartActivity.onCreate");
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
MyTracks.getInstance().setChartActivity(this);
|
|
||||||
providerUtils = MyTracksProviderUtils.Factory.get(this);
|
|
||||||
|
|
||||||
// The volume we want to control is the Text-To-Speech volume
|
// The volume we want to control is the Text-To-Speech volume
|
||||||
int volumeStream =
|
int volumeStream =
|
||||||
@@ -214,27 +124,10 @@ public class ChartActivity extends Activity implements
|
|||||||
setContentView(R.layout.mytracks_charts);
|
setContentView(R.layout.mytracks_charts);
|
||||||
ViewGroup layout = (ViewGroup) findViewById(R.id.elevation_chart);
|
ViewGroup layout = (ViewGroup) findViewById(R.id.elevation_chart);
|
||||||
chartView = new ChartView(this);
|
chartView = new ChartView(this);
|
||||||
chartView.setMode(this.mode);
|
|
||||||
LayoutParams params =
|
LayoutParams params =
|
||||||
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
|
new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
|
||||||
layout.addView(chartView, params);
|
layout.addView(chartView, params);
|
||||||
|
|
||||||
SharedPreferences preferences =
|
|
||||||
getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
|
||||||
if (preferences != null) {
|
|
||||||
selectedTrackId =
|
|
||||||
preferences.getLong(getString(R.string.selected_track_key), -1);
|
|
||||||
recordingTrackId =
|
|
||||||
preferences.getLong(getString(R.string.recording_track_key), -1);
|
|
||||||
metricUnits = preferences.getBoolean(getString(R.string.metric_units_key),
|
|
||||||
true);
|
|
||||||
chartView.setMetricUnits(metricUnits);
|
|
||||||
reportSpeed = preferences.getBoolean(getString(R.string.report_speed_key),
|
|
||||||
true);
|
|
||||||
chartView.setReportSpeed(reportSpeed, this);
|
|
||||||
preferences.registerOnSharedPreferenceChangeListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
busyPane = (LinearLayout) findViewById(R.id.elevation_busypane);
|
busyPane = (LinearLayout) findViewById(R.id.elevation_busypane);
|
||||||
zoomControls = (ZoomControls) findViewById(R.id.elevation_zoom);
|
zoomControls = (ZoomControls) findViewById(R.id.elevation_zoom);
|
||||||
zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
|
zoomControls.setOnZoomInClickListener(new View.OnClickListener() {
|
||||||
@@ -249,97 +142,28 @@ public class ChartActivity extends Activity implements
|
|||||||
zoomOut();
|
zoomOut();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
updateTrackThread.start();
|
|
||||||
updateTrackHandler = new Handler(updateTrackThread.getLooper());
|
|
||||||
|
|
||||||
// Register observer for the track point provider:
|
|
||||||
Handler contentHandler = new Handler();
|
|
||||||
observer = new ContentObserver(contentHandler) {
|
|
||||||
@Override
|
|
||||||
public void onChange(boolean selfChange) {
|
|
||||||
Log.d(MyTracksConstants.TAG, "ChartActivity: ContentObserver.onChange");
|
|
||||||
// Check for any new locations and append them to the currently
|
|
||||||
// recording track.
|
|
||||||
if (recordingTrackId < 0) {
|
|
||||||
// No track is being recorded. We should not be here.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (selectedTrackId != recordingTrackId) {
|
|
||||||
// No track, or one other than the recording track is selected, don't
|
|
||||||
// bother.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// Update can potentially be lengthy, put it in its own thread:
|
|
||||||
updateTrackHandler.post(updateTrackRunnable);
|
|
||||||
super.onChange(selfChange);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
waypointObserver = new ContentObserver(contentHandler) {
|
|
||||||
@Override
|
|
||||||
public void onChange(boolean selfChange) {
|
|
||||||
Log.d(MyTracksConstants.TAG,
|
|
||||||
"MyTracksMap: ContentObserver.onChange waypoints");
|
|
||||||
if (selectedTrackId < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Thread t = new Thread() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
readWaypoints();
|
|
||||||
ChartActivity.this.runOnUiThread(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
chartView.invalidate();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
t.start();
|
|
||||||
super.onChange(selfChange);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
readProfileAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
unregisterContentObservers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
// Make sure any updates that might have happened are propagated to this
|
|
||||||
// activity:
|
dataHub = ((MyTracksApplication) getApplication()).getTrackDataHub();
|
||||||
observer.onChange(false);
|
dataHub.registerTrackDataListener(this, EnumSet.of(
|
||||||
waypointObserver.onChange(false);
|
ListenerDataType.SELECTED_TRACK_CHANGED,
|
||||||
registerContentObservers();
|
ListenerDataType.TRACK_UPDATES,
|
||||||
|
ListenerDataType.POINT_UPDATES,
|
||||||
|
ListenerDataType.SAMPLED_OUT_POINT_UPDATES,
|
||||||
|
ListenerDataType.WAYPOINT_UPDATES,
|
||||||
|
ListenerDataType.DISPLAY_PREFERENCES));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Register the content observer for the map overlay.
|
protected void onPause() {
|
||||||
*/
|
dataHub.unregisterTrackDataListener(this);
|
||||||
private void registerContentObservers() {
|
dataHub = null;
|
||||||
getContentResolver().registerContentObserver(TrackPointsColumns.CONTENT_URI,
|
|
||||||
false/* notifyForDescendents */, observer);
|
|
||||||
getContentResolver().registerContentObserver(WaypointsColumns.CONTENT_URI,
|
|
||||||
false/* notifyForDescendents */, waypointObserver);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
super.onPause();
|
||||||
* Unregister the content observer for the map overlay.
|
|
||||||
*/
|
|
||||||
private void unregisterContentObservers() {
|
|
||||||
getContentResolver().unregisterContentObserver(observer);
|
|
||||||
getContentResolver().unregisterContentObserver(waypointObserver);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean selectedTrackIsRecording() {
|
|
||||||
return selectedTrackId == recordingTrackId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void zoomIn() {
|
private void zoomIn() {
|
||||||
@@ -354,52 +178,10 @@ public class ChartActivity extends Activity implements
|
|||||||
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
zoomControls.setIsZoomOutEnabled(chartView.canZoomOut());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMode(Mode newMode) {
|
private void setMode(Mode newMode) {
|
||||||
if (this.mode != newMode) {
|
if (chartView.getMode() != newMode) {
|
||||||
this.mode = newMode;
|
chartView.setMode(newMode);
|
||||||
chartView.setMode(this.mode);
|
dataHub.reloadDataForListener(this);
|
||||||
readProfileAsync();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Mode getMode() {
|
|
||||||
return mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSeriesEnabled(int index, boolean enabled) {
|
|
||||||
chartView.getChartValueSeries(index).setEnabled(enabled);
|
|
||||||
runOnUiThread(updateChart);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSeriesEnabled(int index) {
|
|
||||||
return chartView.getChartValueSeries(index).isEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void readWaypoints() {
|
|
||||||
if (selectedTrackId < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Cursor cursor = null;
|
|
||||||
chartView.clearWaypoints();
|
|
||||||
try {
|
|
||||||
// We will silently drop extra waypoints to make the app responsive.
|
|
||||||
cursor =
|
|
||||||
providerUtils.getWaypointsCursor(selectedTrackId, 0,
|
|
||||||
MyTracksConstants.MAX_DISPLAYED_TRACK_POINTS);
|
|
||||||
if (cursor != null) {
|
|
||||||
if (cursor.moveToFirst()) {
|
|
||||||
do {
|
|
||||||
Waypoint wpt = providerUtils.createWaypoint(cursor);
|
|
||||||
chartView.addWaypoint(wpt);
|
|
||||||
} while (cursor.moveToNext());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (RuntimeException e) {
|
|
||||||
Log.w(MyTracksConstants.TAG, "Caught an unexpected exception.", e);
|
|
||||||
} finally {
|
|
||||||
if (cursor != null) {
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -407,7 +189,7 @@ public class ChartActivity extends Activity implements
|
|||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
super.onCreateOptionsMenu(menu);
|
super.onCreateOptionsMenu(menu);
|
||||||
chartSettingsMenuItem =
|
chartSettingsMenuItem =
|
||||||
menu.add(0, MyTracksConstants.MENU_CHART_SETTINGS, 0,
|
menu.add(0, Constants.MENU_CHART_SETTINGS, 0,
|
||||||
R.string.chart_settings);
|
R.string.chart_settings);
|
||||||
chartSettingsMenuItem.setIcon(R.drawable.chart_settings);
|
chartSettingsMenuItem.setIcon(R.drawable.chart_settings);
|
||||||
return true;
|
return true;
|
||||||
@@ -416,14 +198,53 @@ public class ChartActivity extends Activity implements
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case MyTracksConstants.MENU_CHART_SETTINGS:
|
case Constants.MENU_CHART_SETTINGS:
|
||||||
MyTracks.getInstance().getDialogManager().showDialogSafely(
|
showDialog(CHART_SETTINGS_DIALOG);
|
||||||
DialogManager.DIALOG_CHART_SETTINGS);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Dialog onCreateDialog(int id) {
|
||||||
|
if (id == CHART_SETTINGS_DIALOG) {
|
||||||
|
final ChartSettingsDialog settingsDialog = new ChartSettingsDialog(this);
|
||||||
|
settingsDialog.setOnClickListener(new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface arg0, int which) {
|
||||||
|
if (which != DialogInterface.BUTTON_POSITIVE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
||||||
|
chartView.setChartValueSeriesEnabled(i, settingsDialog.isSeriesEnabled(i));
|
||||||
|
}
|
||||||
|
setMode(settingsDialog.getMode());
|
||||||
|
chartView.postInvalidate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return settingsDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onCreateDialog(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPrepareDialog(int id, Dialog dialog) {
|
||||||
|
super.onPrepareDialog(id, dialog);
|
||||||
|
|
||||||
|
if (id == CHART_SETTINGS_DIALOG) {
|
||||||
|
prepareSettingsDialog((ChartSettingsDialog) dialog);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void prepareSettingsDialog(ChartSettingsDialog settingsDialog) {
|
||||||
|
settingsDialog.setMode(chartView.getMode());
|
||||||
|
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
||||||
|
settingsDialog.setSeriesEnabled(i, chartView.isChartValueSeriesEnabled(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a location, creates a new data point for the chart. A data point is
|
* Given a location, creates a new data point for the chart. A data point is
|
||||||
* an array double[3 or 6], where:
|
* an array double[3 or 6], where:
|
||||||
@@ -438,49 +259,48 @@ public class ChartActivity extends Activity implements
|
|||||||
* This must be called in order for each point.
|
* This must be called in order for each point.
|
||||||
*
|
*
|
||||||
* @param location the location to get data for (this method takes ownership of that location)
|
* @param location the location to get data for (this method takes ownership of that location)
|
||||||
* @param track the track to get data from
|
|
||||||
* @param result the resulting point to fill out
|
* @param result the resulting point to fill out
|
||||||
* @return the previous location, now available for reuse
|
* @return the previous location, now available for reuse
|
||||||
*/
|
*/
|
||||||
private Location getDataPoint(Location location, Track track, double[] result) {
|
private void fillDataPoint(Location location, double result[]) {
|
||||||
|
double timeOrDistance = Double.NaN,
|
||||||
|
elevation = Double.NaN,
|
||||||
|
speed = Double.NaN,
|
||||||
|
power = Double.NaN,
|
||||||
|
cadence = Double.NaN,
|
||||||
|
heartRate = Double.NaN;
|
||||||
|
|
||||||
if (location instanceof MyTracksLocation &&
|
if (location instanceof MyTracksLocation &&
|
||||||
((MyTracksLocation) location).getSensorDataSet() != null) {
|
((MyTracksLocation) location).getSensorDataSet() != null) {
|
||||||
SensorDataSet sensorData = ((MyTracksLocation) location).getSensorDataSet();
|
SensorDataSet sensorData = ((MyTracksLocation) location).getSensorDataSet();
|
||||||
if (sensorData.hasPower()
|
if (sensorData.hasPower()
|
||||||
&& sensorData.getPower().getState() == Sensor.SensorState.SENDING
|
&& sensorData.getPower().getState() == Sensor.SensorState.SENDING
|
||||||
&& sensorData.getPower().hasValue()) {
|
&& sensorData.getPower().hasValue()) {
|
||||||
result[3] = sensorData.getPower().getValue();
|
power = sensorData.getPower().getValue();
|
||||||
} else {
|
|
||||||
result[3] = Double.NaN;
|
|
||||||
}
|
}
|
||||||
if (sensorData.hasCadence()
|
if (sensorData.hasCadence()
|
||||||
&& sensorData.getCadence().getState() == Sensor.SensorState.SENDING
|
&& sensorData.getCadence().getState() == Sensor.SensorState.SENDING
|
||||||
&& sensorData.getCadence().hasValue()) {
|
&& sensorData.getCadence().hasValue()) {
|
||||||
result[4] = sensorData.getCadence().getValue();
|
cadence = sensorData.getCadence().getValue();
|
||||||
} else {
|
|
||||||
result[4] = Double.NaN;
|
|
||||||
}
|
}
|
||||||
if (sensorData.hasHeartRate()
|
if (sensorData.hasHeartRate()
|
||||||
&& sensorData.getHeartRate().getState() == Sensor.SensorState.SENDING
|
&& sensorData.getHeartRate().getState() == Sensor.SensorState.SENDING
|
||||||
&& sensorData.getHeartRate().hasValue()) {
|
&& sensorData.getHeartRate().hasValue()) {
|
||||||
result[5] = sensorData.getHeartRate().getValue();
|
heartRate = sensorData.getHeartRate().getValue();
|
||||||
} else {
|
|
||||||
result[5] = Double.NaN;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
result[3] = Double.NaN;
|
|
||||||
result[4] = Double.NaN;
|
|
||||||
result[5] = Double.NaN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Account for segment splits?
|
||||||
|
Mode mode = chartView.getMode();
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case BY_DISTANCE:
|
case BY_DISTANCE:
|
||||||
result[0] = profileLength;
|
timeOrDistance = profileLength / 1000.0;
|
||||||
if (lastLocation != null) {
|
if (lastLocation != null) {
|
||||||
double d = lastLocation.distanceTo(location);
|
double d = lastLocation.distanceTo(location);
|
||||||
if (metricUnits) {
|
if (metricUnits) {
|
||||||
profileLength += d / 1000.0;
|
profileLength += d;
|
||||||
} else {
|
} else {
|
||||||
profileLength += d * UnitConversions.KM_TO_MI / 1000.0;
|
profileLength += d * UnitConversions.KM_TO_MI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -489,16 +309,16 @@ public class ChartActivity extends Activity implements
|
|||||||
// Base case
|
// Base case
|
||||||
startTime = location.getTime();
|
startTime = location.getTime();
|
||||||
}
|
}
|
||||||
result[0] = (location.getTime() - startTime);
|
timeOrDistance = (location.getTime() - startTime);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.w(MyTracksConstants.TAG, "ChartActivity unknown mode: " + mode);
|
Log.w(TAG, "ChartActivity unknown mode: " + mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
elevationBuffer.setNext(metricUnits
|
elevationBuffer.setNext(metricUnits
|
||||||
? location.getAltitude()
|
? location.getAltitude()
|
||||||
: location.getAltitude() * UnitConversions.M_TO_FT);
|
: location.getAltitude() * UnitConversions.M_TO_FT);
|
||||||
result[1] = elevationBuffer.getAverage();
|
elevation = elevationBuffer.getAverage();
|
||||||
|
|
||||||
if (lastLocation == null) {
|
if (lastLocation == null) {
|
||||||
if (Math.abs(location.getSpeed() - 128) > 1) {
|
if (Math.abs(location.getSpeed() - 128) > 1) {
|
||||||
@@ -507,151 +327,152 @@ public class ChartActivity extends Activity implements
|
|||||||
} else if (TripStatisticsBuilder.isValidSpeed(
|
} else if (TripStatisticsBuilder.isValidSpeed(
|
||||||
location.getTime(), location.getSpeed(), lastLocation.getTime(),
|
location.getTime(), location.getSpeed(), lastLocation.getTime(),
|
||||||
lastLocation.getSpeed(), speedBuffer)
|
lastLocation.getSpeed(), speedBuffer)
|
||||||
&& (location.getSpeed() <= track.getStatistics().getMaxSpeed())) {
|
&& (location.getSpeed() <= trackMaxSpeed)) {
|
||||||
speedBuffer.setNext(location.getSpeed());
|
speedBuffer.setNext(location.getSpeed());
|
||||||
}
|
}
|
||||||
result[2] = speedBuffer.getAverage() * 3.6;
|
speed = speedBuffer.getAverage() * 3.6;
|
||||||
if (!metricUnits) {
|
if (!metricUnits) {
|
||||||
result[2] *= UnitConversions.KM_TO_MI;
|
speed *= UnitConversions.KM_TO_MI;
|
||||||
}
|
}
|
||||||
if (!reportSpeed && (result[2] != 0)) {
|
if (!reportSpeed) {
|
||||||
// Format as hours per unit
|
if (speed != 0) {
|
||||||
result[2] = (60.0 / result[2]);
|
// Format as hours per unit
|
||||||
|
speed = (60.0 / speed);
|
||||||
|
} else {
|
||||||
|
speed = Double.NaN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Location oldLastLocation = lastLocation;
|
// Keep a copy so the location can be reused.
|
||||||
lastLocation = location;
|
lastLocation = location;
|
||||||
|
|
||||||
if (oldLastLocation == null) {
|
if (result != null) {
|
||||||
// No previous location, but return a blank one for reuse
|
result[0] = timeOrDistance;
|
||||||
return new MyTracksLocation("");
|
result[1] = elevation;
|
||||||
|
result[2] = speed;
|
||||||
|
result[3] = power;
|
||||||
|
result[4] = cadence;
|
||||||
|
result[5] = heartRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldLastLocation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Sets the chart data points reading from the provider. This is non-blocking.
|
public void onProviderStateChange(ProviderState state) {
|
||||||
*/
|
// We don't care.
|
||||||
private void readProfileAsync() {
|
}
|
||||||
chartView.reset();
|
|
||||||
updateTrackHandler.post(new Runnable() {
|
@Override
|
||||||
|
public void onCurrentLocationChanged(Location loc) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCurrentHeadingChanged(double heading) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelectedTrackChanged(Track track, boolean isRecording) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
runOnUiThread(showSpinner);
|
busyPane.setVisibility(View.VISIBLE);
|
||||||
readProfile();
|
|
||||||
readWaypoints();
|
|
||||||
runOnUiThread(updateChart);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Reads the track profile from the provider. This is a blocking function and
|
public void onTrackUpdated(Track track) {
|
||||||
* should not be run from the UI thread.
|
if (track == null || track.getStatistics() == null) {
|
||||||
*/
|
trackMaxSpeed = 0.0;
|
||||||
private void readProfile() {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
trackMaxSpeed = track.getStatistics().getMaxSpeed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearTrackPoints() {
|
||||||
profileLength = 0;
|
profileLength = 0;
|
||||||
lastLocation = null;
|
lastLocation = null;
|
||||||
startTime = -1;
|
startTime = -1;
|
||||||
if (selectedTrackId < 0) {
|
elevationBuffer.reset();
|
||||||
return;
|
chartView.reset();
|
||||||
}
|
speedBuffer.reset();
|
||||||
Track track = providerUtils.getTrack(selectedTrackId);
|
pendingPoints.clear();
|
||||||
if (track == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
lastSeenLocationId = track.getStartId();
|
|
||||||
final ArrayList<double[]> theData = readPointsToList(track);
|
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
chartView.setDataPoints(theData);
|
chartView.resetScroll();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Read all new track points.
|
public void onNewTrackPoint(Location loc) {
|
||||||
*/
|
if (LocationUtils.isValidLocation(loc)) {
|
||||||
private void readNewTrackPoints() {
|
double[] point = new double[6];
|
||||||
Log.i(MyTracksConstants.TAG, "MyTracks: Updating chart last seen: " + lastSeenLocationId);
|
fillDataPoint(loc, point);
|
||||||
Track track = providerUtils.getTrack(recordingTrackId);
|
pendingPoints.add(point);
|
||||||
if (track == null) {
|
|
||||||
Log.w(MyTracksConstants.TAG, "MyTracks: track not found");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
chartView.addDataPoints(readPointsToList(track));
|
|
||||||
uiHandler.post(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
chartView.invalidate();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Log.i(MyTracksConstants.TAG, "MyTracks: Updated chart last seen: " + lastSeenLocationId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Get the frequency at which points should be displayed.
|
public void onSampledOutTrackPoint(Location loc) {
|
||||||
* Limit the number of chart readings. Ideally we would want around 1024.
|
// Still account for the point in the smoothing buffers.
|
||||||
* @param track The track which will be displayed.
|
fillDataPoint(loc, null);
|
||||||
* @return The inverse of the frequency of points to be displayed.
|
|
||||||
*/
|
|
||||||
private int getSamplingFrequency(Track track) {
|
|
||||||
long totalLocations = track.getStopId() - track.getStartId();
|
|
||||||
return Math.max(1, (int) (totalLocations / 1024.0));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Cursor getLocationsCursor(long lastLocationRead) {
|
@Override
|
||||||
return providerUtils.getLocationsCursor(selectedTrackId, lastLocationRead, BUFFER_SIZE, false);
|
public void onSegmentSplit() {
|
||||||
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Read all of the points to a list.
|
public void onNewTrackPointsDone() {
|
||||||
* @param track The track which will be displayed.
|
chartView.addDataPoints(pendingPoints);
|
||||||
* @return
|
pendingPoints.clear();
|
||||||
*/
|
runOnUiThread(updateChart);
|
||||||
private ArrayList<double[]> readPointsToList(Track track) {
|
}
|
||||||
Cursor cursor = null;
|
|
||||||
long lastLocationRead = lastSeenLocationId;
|
@Override
|
||||||
int points = 0;
|
public void clearWaypoints() {
|
||||||
int chartSamplingFrequency = getSamplingFrequency(track);
|
chartView.clearWaypoints();
|
||||||
ArrayList<double[]> result = new ArrayList<double[]>();
|
}
|
||||||
// Need two locations so we can keep track of the last location.
|
|
||||||
Location location = new MyTracksLocation("");
|
@Override
|
||||||
try {
|
public void onNewWaypoint(Waypoint wpt) {
|
||||||
while (lastSeenLocationId < track.getStopId()) {
|
chartView.addWaypoint(wpt);
|
||||||
cursor = getLocationsCursor(lastLocationRead);
|
}
|
||||||
if (cursor != null) {
|
|
||||||
elevationBuffer.reset();
|
@Override
|
||||||
speedBuffer.reset();
|
public void onNewWaypointsDone() {
|
||||||
if (cursor.moveToFirst()) {
|
runOnUiThread(updateChart);
|
||||||
final int idColumnIdx = cursor.getColumnIndexOrThrow(TrackPointsColumns._ID);
|
}
|
||||||
while (cursor.moveToNext()) {
|
|
||||||
points++;
|
@Override
|
||||||
providerUtils.fillLocation(cursor, location);
|
public boolean onUnitsChanged(boolean metric) {
|
||||||
if (MyTracksUtils.isValidLocation(location)) {
|
boolean changed = metric != this.metricUnits;
|
||||||
lastLocationRead = lastSeenLocationId =
|
if (!changed) return false;
|
||||||
cursor.getLong(idColumnIdx);
|
|
||||||
// TODO Can we be smarter about choosing 3 or 6 entries?
|
this.metricUnits = metric;
|
||||||
double[] point = new double[6];
|
|
||||||
location = getDataPoint(location, track, point);
|
chartView.setMetricUnits(metric);
|
||||||
if (points % chartSamplingFrequency == 0) {
|
|
||||||
result.add(point);
|
return true; // Reload data
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
@SuppressWarnings("hiding")
|
||||||
} else {
|
@Override
|
||||||
lastLocationRead += BUFFER_SIZE;
|
public boolean onReportSpeedChanged(boolean reportSpeed) {
|
||||||
}
|
boolean changed = reportSpeed != this.reportSpeed;
|
||||||
} else {
|
if (!changed) return false;
|
||||||
lastLocationRead += BUFFER_SIZE;
|
|
||||||
}
|
this.reportSpeed = reportSpeed;
|
||||||
cursor.close();
|
|
||||||
cursor = null;
|
chartView.setReportSpeed(reportSpeed, this);
|
||||||
}
|
|
||||||
return result;
|
return true; // Reload data
|
||||||
} finally {
|
|
||||||
if (cursor != null) {
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009 Google Inc.
|
* Copyright 2009 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -36,6 +36,7 @@ import android.widget.RadioGroup;
|
|||||||
public class ChartSettingsDialog extends Dialog {
|
public class ChartSettingsDialog extends Dialog {
|
||||||
private RadioButton distance;
|
private RadioButton distance;
|
||||||
private CheckBox[] series;
|
private CheckBox[] series;
|
||||||
|
private OnClickListener clickListener;
|
||||||
|
|
||||||
public ChartSettingsDialog(Context context) {
|
public ChartSettingsDialog(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
@@ -44,23 +45,31 @@ public class ChartSettingsDialog extends Dialog {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
setContentView(R.layout.chart_settings);
|
setContentView(R.layout.chart_settings);
|
||||||
Button cancel = (Button) findViewById(R.id.chart_settings_cancel);
|
Button cancel = (Button) findViewById(R.id.chart_settings_cancel);
|
||||||
cancel.setOnClickListener(new View.OnClickListener() {
|
cancel.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (clickListener != null) {
|
||||||
|
clickListener.onClick(ChartSettingsDialog.this, BUTTON_NEGATIVE);
|
||||||
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Button ok = (Button) findViewById(R.id.chart_settings_ok);
|
|
||||||
ok.setOnClickListener(new View.OnClickListener() {
|
Button okButton = (Button) findViewById(R.id.chart_settings_ok);
|
||||||
|
okButton.setOnClickListener(new View.OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
handleOk();
|
if (clickListener != null) {
|
||||||
|
clickListener.onClick(ChartSettingsDialog.this, BUTTON_POSITIVE);
|
||||||
|
}
|
||||||
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
distance = (RadioButton) findViewById(R.id.chart_settings_by_distance);
|
distance = (RadioButton) findViewById(R.id.chart_settings_by_distance);
|
||||||
|
|
||||||
series = new CheckBox[ChartView.NUM_SERIES];
|
series = new CheckBox[ChartView.NUM_SERIES];
|
||||||
series[ChartView.ELEVATION_SERIES] =
|
series[ChartView.ELEVATION_SERIES] =
|
||||||
(CheckBox) findViewById(R.id.chart_settings_elevation);
|
(CheckBox) findViewById(R.id.chart_settings_elevation);
|
||||||
@@ -74,29 +83,30 @@ public class ChartSettingsDialog extends Dialog {
|
|||||||
(CheckBox) findViewById(R.id.chart_settings_heart_rate);
|
(CheckBox) findViewById(R.id.chart_settings_heart_rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setup(ChartActivity chart) {
|
public void setMode(Mode mode) {
|
||||||
if (chart == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
RadioGroup rd = (RadioGroup) findViewById(R.id.chart_settings_x);
|
RadioGroup rd = (RadioGroup) findViewById(R.id.chart_settings_x);
|
||||||
rd.check(chart.getMode() == Mode.BY_DISTANCE
|
rd.check(mode == Mode.BY_DISTANCE
|
||||||
? R.id.chart_settings_by_distance
|
? R.id.chart_settings_by_distance
|
||||||
: R.id.chart_settings_by_time);
|
: R.id.chart_settings_by_time);
|
||||||
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
|
||||||
series[i].setChecked(chart.isSeriesEnabled(i));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleOk() {
|
public void setSeriesEnabled(int seriesIdx, boolean enabled) {
|
||||||
ChartActivity chart = MyTracks.getInstance().getChartActivity();
|
series[seriesIdx].setChecked(enabled);
|
||||||
chart.setMode(distance.isChecked() ? Mode.BY_DISTANCE : Mode.BY_TIME);
|
}
|
||||||
|
|
||||||
// TODO: check that something is visible.
|
public Mode getMode() {
|
||||||
for (int i = 0; i < ChartView.NUM_SERIES; i++) {
|
if (distance == null) return Mode.BY_DISTANCE;
|
||||||
chart.setSeriesEnabled(i, series[i].isChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
dismiss();
|
return distance.isChecked() ? Mode.BY_DISTANCE : Mode.BY_TIME;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSeriesEnabled(int seriesIdx) {
|
||||||
|
if (series == null) return true;
|
||||||
|
|
||||||
|
return series[seriesIdx].isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnClickListener(OnClickListener clickListener) {
|
||||||
|
this.clickListener = clickListener;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009 Google Inc.
|
* Copyright 2009 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -48,7 +48,7 @@ public class ChartValueSeries {
|
|||||||
private double spread;
|
private double spread;
|
||||||
private int interval;
|
private int interval;
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class controls how effective min/max values of a {@link ChartValueSeries} are calculated.
|
* This class controls how effective min/max values of a {@link ChartValueSeries} are calculated.
|
||||||
*/
|
*/
|
||||||
@@ -70,10 +70,10 @@ public class ChartValueSeries {
|
|||||||
this.intervals = intervals;
|
this.intervals = intervals;
|
||||||
this.absoluteMin = absoluteMin;
|
this.absoluteMin = absoluteMin;
|
||||||
this.absoluteMax = absoluteMax;
|
this.absoluteMax = absoluteMax;
|
||||||
this.zoomLevels = zoomLevels;
|
this.zoomLevels = zoomLevels;
|
||||||
checkArgs();
|
checkArgs();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkArgs() {
|
private void checkArgs() {
|
||||||
if (intervals <= 0 || zoomLevels == null || zoomLevels.length == 0) {
|
if (intervals <= 0 || zoomLevels == null || zoomLevels.length == 0) {
|
||||||
throw new IllegalArgumentException("Expecing positive intervals and non-empty zoom levels");
|
throw new IllegalArgumentException("Expecing positive intervals and non-empty zoom levels");
|
||||||
@@ -100,12 +100,12 @@ public class ChartValueSeries {
|
|||||||
public int[] getZoomLevels() {
|
public int[] getZoomLevels() {
|
||||||
return zoomLevels;
|
return zoomLevels;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the interval between markings given the min and max values.
|
* Calculates the interval between markings given the min and max values.
|
||||||
* This function attempts to find the smallest zoom level that fits [min,max] after rounding
|
* This function attempts to find the smallest zoom level that fits [min,max] after rounding
|
||||||
* it to the current zoom level.
|
* it to the current zoom level.
|
||||||
*
|
*
|
||||||
* @param min the minimum value in the series
|
* @param min the minimum value in the series
|
||||||
* @param max the maximum value in the series
|
* @param max the maximum value in the series
|
||||||
* @return the calculated interval for the given range
|
* @return the calculated interval for the given range
|
||||||
@@ -136,7 +136,7 @@ public class ChartValueSeries {
|
|||||||
* @param fill The paint for filling the chart
|
* @param fill The paint for filling the chart
|
||||||
* @param stroke The paint for stroking the outside the chart, optional
|
* @param stroke The paint for stroking the outside the chart, optional
|
||||||
* @param zoomSettings The settings related to zooming
|
* @param zoomSettings The settings related to zooming
|
||||||
*
|
*
|
||||||
* TODO: Get rid of Context and inject appropriate values instead.
|
* TODO: Get rid of Context and inject appropriate values instead.
|
||||||
*/
|
*/
|
||||||
public ChartValueSeries(Context context, String formatString, int fillColor, int strokeColor,
|
public ChartValueSeries(Context context, String formatString, int fillColor, int strokeColor,
|
||||||
@@ -207,7 +207,7 @@ public class ChartValueSeries {
|
|||||||
}
|
}
|
||||||
min = Math.min(min, zoomSettings.getAbsoluteMin());
|
min = Math.min(min, zoomSettings.getAbsoluteMin());
|
||||||
max = Math.max(max, zoomSettings.getAbsoluteMax());
|
max = Math.max(max, zoomSettings.getAbsoluteMax());
|
||||||
|
|
||||||
this.interval = zoomSettings.calculateInterval(min, max);
|
this.interval = zoomSettings.calculateInterval(min, max);
|
||||||
// Round it up.
|
// Round it up.
|
||||||
effectiveMax = ((int) (max / interval)) * interval + interval;
|
effectiveMax = ((int) (max / interval)) * interval + interval;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Google Inc.
|
* Copyright 2008 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -28,9 +28,9 @@ import android.graphics.Canvas;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.DashPathEffect;
|
import android.graphics.DashPathEffect;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.Path;
|
|
||||||
import android.graphics.Paint.Align;
|
import android.graphics.Paint.Align;
|
||||||
import android.graphics.Paint.Style;
|
import android.graphics.Paint.Style;
|
||||||
|
import android.graphics.Path;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.VelocityTracker;
|
import android.view.VelocityTracker;
|
||||||
@@ -49,6 +49,7 @@ import java.util.ArrayList;
|
|||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class ChartView extends View {
|
public class ChartView extends View {
|
||||||
|
private static final int MIN_ZOOM_LEVEL = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scrolling logic:
|
* Scrolling logic:
|
||||||
@@ -62,40 +63,41 @@ public class ChartView extends View {
|
|||||||
* Zoom logic:
|
* Zoom logic:
|
||||||
*/
|
*/
|
||||||
private int zoomLevel = 1;
|
private int zoomLevel = 1;
|
||||||
private final int minZoomLevel = 1;
|
|
||||||
private int maxZoomLevel = 10;
|
private int maxZoomLevel = 10;
|
||||||
|
|
||||||
private static final int MAX_INTERVALS = 5;
|
private static final int MAX_INTERVALS = 5;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Borders, margins, dimensions (in pixels):
|
* Borders, margins, dimensions (in pixels):
|
||||||
*/
|
*/
|
||||||
private int leftBorder = -1;
|
private int leftBorder = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unscaled top border of the chart.
|
* Unscaled top border of the chart.
|
||||||
*/
|
*/
|
||||||
private static final int TOP_BORDER = 15;
|
private static final int TOP_BORDER = 15;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device scaled top border of the chart.
|
* Device scaled top border of the chart.
|
||||||
*/
|
*/
|
||||||
private int topBorder;
|
private int topBorder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unscaled bottom border of the chart.
|
* Unscaled bottom border of the chart.
|
||||||
*/
|
*/
|
||||||
private static final float BOTTOM_BORDER = 40;
|
private static final float BOTTOM_BORDER = 40;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Device scaled bottom border of the chart.
|
* Device scaled bottom border of the chart.
|
||||||
*/
|
*/
|
||||||
private int bottomBorder;
|
private int bottomBorder;
|
||||||
|
|
||||||
private static final int RIGHT_BORDER = 17;
|
private static final int RIGHT_BORDER = 17;
|
||||||
|
|
||||||
/** Space to leave for drawing the unit labels */
|
/** Space to leave for drawing the unit labels */
|
||||||
private static final int UNIT_BORDER = 15;
|
private static final int UNIT_BORDER = 15;
|
||||||
private static final int FONT_HEIGHT = 10;
|
private static final int FONT_HEIGHT = 10;
|
||||||
|
|
||||||
private int w = 0;
|
private int w = 0;
|
||||||
private int h = 0;
|
private int h = 0;
|
||||||
private int effectiveWidth = 0;
|
private int effectiveWidth = 0;
|
||||||
@@ -118,11 +120,11 @@ public class ChartView extends View {
|
|||||||
private ChartValueSeries[] series;
|
private ChartValueSeries[] series;
|
||||||
|
|
||||||
private final ExtremityMonitor xMonitor = new ExtremityMonitor();
|
private final ExtremityMonitor xMonitor = new ExtremityMonitor();
|
||||||
private final NumberFormat xFormat = new DecimalFormat("###,###");
|
private static final NumberFormat X_FORMAT = new DecimalFormat("###,###");
|
||||||
private final NumberFormat xShortFormat = new DecimalFormat("#.0");
|
private static final NumberFormat X_SHORT_FORMAT = new DecimalFormat("#.0");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Paints etc. used when drawing the histogram:
|
* Paints etc. used when drawing the chart:
|
||||||
*/
|
*/
|
||||||
private final Paint borderPaint = new Paint();
|
private final Paint borderPaint = new Paint();
|
||||||
private final Paint labelPaint = new Paint();
|
private final Paint labelPaint = new Paint();
|
||||||
@@ -174,7 +176,7 @@ public class ChartView extends View {
|
|||||||
|
|
||||||
gridBarPaint.set(gridPaint);
|
gridBarPaint.set(gridPaint);
|
||||||
gridBarPaint.setPathEffect(new DashPathEffect(new float[] {3, 2}, 0));
|
gridBarPaint.setPathEffect(new DashPathEffect(new float[] {3, 2}, 0));
|
||||||
|
|
||||||
clearPaint.setStyle(Style.FILL);
|
clearPaint.setStyle(Style.FILL);
|
||||||
clearPaint.setColor(context.getResources().getColor(R.color.white));
|
clearPaint.setColor(context.getResources().getColor(R.color.white));
|
||||||
clearPaint.setAntiAlias(false);
|
clearPaint.setAntiAlias(false);
|
||||||
@@ -197,7 +199,7 @@ public class ChartView extends View {
|
|||||||
updateDimensions();
|
updateDimensions();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUpChartValueSeries(Context context) {
|
private void setUpChartValueSeries(Context context) {
|
||||||
series = new ChartValueSeries[NUM_SERIES];
|
series = new ChartValueSeries[NUM_SERIES];
|
||||||
|
|
||||||
// Create the value series.
|
// Create the value series.
|
||||||
@@ -271,49 +273,12 @@ public class ChartView extends View {
|
|||||||
: R.string.pace_label));
|
: R.string.pace_label));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the data that is displayed by the chart.
|
|
||||||
*
|
|
||||||
* @return an array list with data points
|
|
||||||
*/
|
|
||||||
public ArrayList<double[]> getData() {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the data that is to be displayed by the chart.
|
|
||||||
*
|
|
||||||
* @param theData an array list of data points
|
|
||||||
*/
|
|
||||||
public synchronized void setDataPoints(ArrayList<double[]> theData) {
|
|
||||||
scrollTo(0, 0);
|
|
||||||
zoomLevel = 1;
|
|
||||||
data.clear();
|
|
||||||
xMonitor.reset();
|
|
||||||
for (ChartValueSeries cvs : series) {
|
|
||||||
cvs.reset();
|
|
||||||
}
|
|
||||||
addDataPoints(theData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a new data point to the chart.
|
|
||||||
*
|
|
||||||
* @param theData a data point
|
|
||||||
*/
|
|
||||||
public synchronized void addDataPoint(double[] theData) {
|
|
||||||
data.add(theData);
|
|
||||||
addDataPointInternal(theData);
|
|
||||||
updateDimensions();
|
|
||||||
setUpPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addDataPointInternal(double[] theData) {
|
private void addDataPointInternal(double[] theData) {
|
||||||
xMonitor.update(theData[0]);
|
xMonitor.update(theData[0]);
|
||||||
int min = Math.min(series.length, theData.length - 1);
|
int min = Math.min(series.length, theData.length - 1);
|
||||||
for (int i = 0; i < min; i++) {
|
for (int i = 1; i <= min; i++) {
|
||||||
if (!Double.isNaN(theData[i + 1])) {
|
if (!Double.isNaN(theData[i])) {
|
||||||
series[i].update(theData[i + 1]);
|
series[i - 1].update(theData[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Fill in the extra's if needed.
|
// Fill in the extra's if needed.
|
||||||
@@ -329,25 +294,32 @@ public class ChartView extends View {
|
|||||||
*
|
*
|
||||||
* @param theData an array list of data points to be added
|
* @param theData an array list of data points to be added
|
||||||
*/
|
*/
|
||||||
public synchronized void addDataPoints(ArrayList<double[]> theData) {
|
public void addDataPoints(ArrayList<double[]> theData) {
|
||||||
data.addAll(theData);
|
synchronized (data) {
|
||||||
for (int i = 0; i < theData.size(); i++) {
|
data.addAll(theData);
|
||||||
double d[] = theData.get(i);
|
for (int i = 0; i < theData.size(); i++) {
|
||||||
addDataPointInternal(d);
|
double d[] = theData.get(i);
|
||||||
|
addDataPointInternal(d);
|
||||||
|
}
|
||||||
|
updateDimensions();
|
||||||
|
setUpPath();
|
||||||
}
|
}
|
||||||
updateDimensions();
|
|
||||||
setUpPath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears all data.
|
* Clears all data.
|
||||||
* Call this only from the UI thread!
|
|
||||||
*/
|
*/
|
||||||
public synchronized void reset() {
|
public void reset() {
|
||||||
data.clear();
|
synchronized (data) {
|
||||||
zoomLevel = 1;
|
data.clear();
|
||||||
|
xMonitor.reset();
|
||||||
|
zoomLevel = 1;
|
||||||
|
updateDimensions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void resetScroll() {
|
||||||
scrollTo(0, 0);
|
scrollTo(0, 0);
|
||||||
updateDimensions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -361,7 +333,7 @@ public class ChartView extends View {
|
|||||||
* @return true if the chart can be zoomed out
|
* @return true if the chart can be zoomed out
|
||||||
*/
|
*/
|
||||||
public boolean canZoomOut() {
|
public boolean canZoomOut() {
|
||||||
return zoomLevel > minZoomLevel;
|
return zoomLevel > MIN_ZOOM_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -392,13 +364,6 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the current zoom level (1 equals to showing all data points)
|
|
||||||
*/
|
|
||||||
public int getZoomLevel() {
|
|
||||||
return zoomLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initiates flinging.
|
* Initiates flinging.
|
||||||
*
|
*
|
||||||
@@ -427,14 +392,6 @@ public class ChartView extends View {
|
|||||||
scrollTo(scrollX, 0);
|
scrollTo(scrollX, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the scroll position of the chart. This will trigger a redraw.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void scrollTo(int x, int y) {
|
|
||||||
super.scrollTo(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the current display mode (by distance, by time)
|
* @return the current display mode (by distance, by time)
|
||||||
*/
|
*/
|
||||||
@@ -444,6 +401,7 @@ public class ChartView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the display mode (by distance, by time).
|
* Sets the display mode (by distance, by time).
|
||||||
|
* It is expected that after the mode change, data will be reloaded.
|
||||||
*/
|
*/
|
||||||
public void setMode(Mode mode) {
|
public void setMode(Mode mode) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
@@ -527,8 +485,8 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
if (nearestWaypoint != null && dmin < 100) {
|
if (nearestWaypoint != null && dmin < 100) {
|
||||||
Intent intent =
|
Intent intent =
|
||||||
new Intent(getContext(), MyTracksWaypointDetails.class);
|
new Intent(getContext(), WaypointDetails.class);
|
||||||
intent.putExtra("waypointid", nearestWaypoint.getId());
|
intent.putExtra(WaypointDetails.WAYPOINT_ID_EXTRA, nearestWaypoint.getId());
|
||||||
getContext().startActivity(intent);
|
getContext().startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -551,63 +509,60 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected synchronized void onDraw(Canvas c) {
|
protected void onDraw(Canvas c) {
|
||||||
if (w != c.getWidth() || h != c.getHeight()) {
|
synchronized (data) {
|
||||||
// Dimensions have changed (for example due to orientation change).
|
updateEffectiveDimensionsIfChanged(c);
|
||||||
w = c.getWidth();
|
|
||||||
h = c.getHeight();
|
|
||||||
effectiveWidth = Math.max(0, w - leftBorder - RIGHT_BORDER);
|
|
||||||
effectiveHeight = Math.max(0, h - topBorder - bottomBorder);
|
|
||||||
setUpPath();
|
|
||||||
}
|
|
||||||
c.save();
|
|
||||||
c.drawColor(Color.WHITE);
|
|
||||||
if (data.size() < 1) {
|
|
||||||
drawXAxis(c);
|
|
||||||
drawYAxis(c);
|
|
||||||
c.restore();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
c.save();
|
|
||||||
c.clipRect(leftBorder + 1 + getScrollX(), topBorder + 1,
|
|
||||||
w - RIGHT_BORDER + getScrollX() - 1, h - bottomBorder - 1);
|
|
||||||
|
|
||||||
drawGrid(c);
|
// Keep original state.
|
||||||
|
|
||||||
// Draw the data series.
|
|
||||||
for (ChartValueSeries cvs : series) {
|
|
||||||
if (cvs.isEnabled() && cvs.hasData()) {
|
|
||||||
cvs.drawPath(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw the waypoints.
|
|
||||||
for (int i = 1; i < waypoints.size(); i++) {
|
|
||||||
final Waypoint waypoint = waypoints.get(i);
|
|
||||||
if (waypoint.getLocation() == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
c.save();
|
c.save();
|
||||||
|
|
||||||
final float x = getWaypointX(waypoint);
|
c.drawColor(Color.WHITE);
|
||||||
c.drawLine(x, h - bottomBorder, x, topBorder, gridPaint);
|
|
||||||
c.translate(x - markerWidth / 2, markerHeight);
|
|
||||||
if (waypoints.get(i).getType() == Waypoint.TYPE_STATISTICS) {
|
|
||||||
statsMarker.draw(c);
|
|
||||||
} else {
|
|
||||||
waypointMarker.draw(c);
|
|
||||||
}
|
|
||||||
c.restore();
|
|
||||||
}
|
|
||||||
|
|
||||||
c.restore();
|
if (data.isEmpty()) {
|
||||||
|
// No data, draw only axes
|
||||||
// Draw the axis and labels.
|
drawXAxis(c);
|
||||||
|
drawYAxis(c);
|
||||||
|
c.restore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clip to graph drawing space
|
||||||
|
c.save();
|
||||||
|
clipToGraphSpace(c);
|
||||||
|
|
||||||
|
// Draw the grid and the data on it.
|
||||||
|
drawGrid(c);
|
||||||
|
drawDataSeries(c);
|
||||||
|
drawWaypoints(c);
|
||||||
|
|
||||||
|
// Go back to full canvas drawing.
|
||||||
|
c.restore();
|
||||||
|
|
||||||
|
// Draw the axes and their labels.
|
||||||
|
drawAxesAndLabels(c);
|
||||||
|
|
||||||
|
// Go back to original state.
|
||||||
|
c.restore();
|
||||||
|
|
||||||
|
// Draw the pointer
|
||||||
|
if (showPointer) {
|
||||||
|
drawPointer(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Clips the given canvas to the area where the graph lines should be drawn. */
|
||||||
|
private void clipToGraphSpace(Canvas c) {
|
||||||
|
c.clipRect(leftBorder + 1 + getScrollX(), topBorder + 1,
|
||||||
|
w - RIGHT_BORDER + getScrollX() - 1, h - bottomBorder - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Draws the axes and their labels into th e given canvas. */
|
||||||
|
private void drawAxesAndLabels(Canvas c) {
|
||||||
drawXLabels(c);
|
drawXLabels(c);
|
||||||
drawXAxis(c);
|
drawXAxis(c);
|
||||||
drawSeriesTitles(c);
|
drawSeriesTitles(c);
|
||||||
|
|
||||||
c.translate(getScrollX(), 0);
|
c.translate(getScrollX(), 0);
|
||||||
drawYAxis(c);
|
drawYAxis(c);
|
||||||
float density = getContext().getResources().getDisplayMetrics().density;
|
float density = getContext().getResources().getDisplayMetrics().density;
|
||||||
@@ -618,15 +573,47 @@ public class ChartView extends View {
|
|||||||
x -= drawYLabels(cvs, c, x) + spacer;
|
x -= drawYLabels(cvs, c, x) + spacer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.restore();
|
}
|
||||||
if (showPointer && !data.isEmpty()) {
|
|
||||||
c.translate(getX(maxX) - pointer.getIntrinsicWidth() / 2,
|
/** Draws the current pointer into the given canvas. */
|
||||||
getY(series[0], data.get(data.size() - 1)[1])
|
private void drawPointer(Canvas c) {
|
||||||
- pointer.getIntrinsicHeight() / 2 - 12);
|
c.translate(getX(maxX) - pointer.getIntrinsicWidth() / 2,
|
||||||
pointer.draw(c);
|
getY(series[0], data.get(data.size() - 1)[1])
|
||||||
|
- pointer.getIntrinsicHeight() / 2 - 12);
|
||||||
|
pointer.draw(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Draws the waypoints into the given canvas. */
|
||||||
|
private void drawWaypoints(Canvas c) {
|
||||||
|
for (int i = 1; i < waypoints.size(); i++) {
|
||||||
|
final Waypoint waypoint = waypoints.get(i);
|
||||||
|
if (waypoint.getLocation() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
c.save();
|
||||||
|
|
||||||
|
final float x = getWaypointX(waypoint);
|
||||||
|
c.drawLine(x, h - bottomBorder, x, topBorder, gridPaint);
|
||||||
|
c.translate(x - (float) markerWidth / 2.0f, (float) markerHeight);
|
||||||
|
if (waypoints.get(i).getType() == Waypoint.TYPE_STATISTICS) {
|
||||||
|
statsMarker.draw(c);
|
||||||
|
} else {
|
||||||
|
waypointMarker.draw(c);
|
||||||
|
}
|
||||||
|
c.restore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws the data series into the given canvas. */
|
||||||
|
private void drawDataSeries(Canvas c) {
|
||||||
|
for (ChartValueSeries cvs : series) {
|
||||||
|
if (cvs.isEnabled() && cvs.hasData()) {
|
||||||
|
cvs.drawPath(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Draws the colored titles for the data series. */
|
||||||
private void drawSeriesTitles(Canvas c) {
|
private void drawSeriesTitles(Canvas c) {
|
||||||
int sections = 1;
|
int sections = 1;
|
||||||
for (ChartValueSeries cvs : series) {
|
for (ChartValueSeries cvs : series) {
|
||||||
@@ -644,17 +631,24 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the path that is used to draw the histogram in onDraw(). The path
|
* Sets up the path that is used to draw the chart in onDraw(). The path
|
||||||
* needs to be updated any time after the data or histogram dimensions change.
|
* needs to be updated any time after the data or histogram dimensions change.
|
||||||
*/
|
*/
|
||||||
private synchronized void setUpPath() {
|
private void setUpPath() {
|
||||||
for (ChartValueSeries cvs : series) {
|
synchronized (data) {
|
||||||
cvs.getPath().reset();
|
for (ChartValueSeries cvs : series) {
|
||||||
}
|
cvs.getPath().reset();
|
||||||
if (data.isEmpty()) {
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (!data.isEmpty()) {
|
||||||
|
drawPaths();
|
||||||
|
closePaths();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Actually draws the data points as a path. */
|
||||||
|
private void drawPaths() {
|
||||||
// All of the data points to the respective series.
|
// All of the data points to the respective series.
|
||||||
// TODO: Come up with a better sampling than Math.max(1, (maxZoomLevel - zoomLevel + 1) / 2);
|
// TODO: Come up with a better sampling than Math.max(1, (maxZoomLevel - zoomLevel + 1) / 2);
|
||||||
int sampling = 1;
|
int sampling = 1;
|
||||||
@@ -673,7 +667,10 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Closes the drawn path so it looks like a solid graph. */
|
||||||
|
private void closePaths() {
|
||||||
// Close the path.
|
// Close the path.
|
||||||
int yCorner = topBorder + effectiveHeight;
|
int yCorner = topBorder + effectiveHeight;
|
||||||
int xCorner = getX(data.get(0)[0]);
|
int xCorner = getX(data.get(0)[0]);
|
||||||
@@ -692,12 +689,13 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the index of the first point which has a series populated.
|
* Finds the index of the first point which has a series populated.
|
||||||
* @param seriesIndex The index of the value series to search for.
|
*
|
||||||
|
* @param seriesIndex The index of the value series to search for
|
||||||
* @return The index in the first data for the point in the series that has series
|
* @return The index in the first data for the point in the series that has series
|
||||||
* index value populated or -1 if none is found.
|
* index value populated or -1 if none is found
|
||||||
*/
|
*/
|
||||||
private int getFirstPointPopulatedIndex(int seriesIndex) {
|
private int getFirstPointPopulatedIndex(int seriesIndex) {
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
@@ -709,7 +707,7 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the histogram dimensions.
|
* Updates the chart dimensions.
|
||||||
*/
|
*/
|
||||||
private void updateDimensions() {
|
private void updateDimensions() {
|
||||||
maxX = xMonitor.getMax();
|
maxX = xMonitor.getMax();
|
||||||
@@ -728,12 +726,31 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
float density = getContext().getResources().getDisplayMetrics().density;
|
float density = getContext().getResources().getDisplayMetrics().density;
|
||||||
// TODO: This should be function of the number of variables displayed.
|
maxLength = Math.max(maxLength, 1);
|
||||||
leftBorder = (int) (density * (4 + 8 * maxLength));
|
leftBorder = (int) (density * (4 + 8 * maxLength));
|
||||||
effectiveWidth = w - leftBorder - RIGHT_BORDER;
|
|
||||||
bottomBorder = (int) (density * BOTTOM_BORDER);
|
bottomBorder = (int) (density * BOTTOM_BORDER);
|
||||||
topBorder = (int) (density * TOP_BORDER);
|
topBorder = (int) (density * TOP_BORDER);
|
||||||
effectiveHeight = h - topBorder - bottomBorder;
|
updateEffectiveDimensions();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Updates the effective dimensions where the graph will be drawn. */
|
||||||
|
private void updateEffectiveDimensions() {
|
||||||
|
effectiveWidth = Math.max(0, w - leftBorder - RIGHT_BORDER);
|
||||||
|
effectiveHeight = Math.max(0, h - topBorder - bottomBorder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the effective dimensions where the graph will be drawn, only if the
|
||||||
|
* dimensions of the given canvas have changed since the last call.
|
||||||
|
*/
|
||||||
|
private void updateEffectiveDimensionsIfChanged(Canvas c) {
|
||||||
|
if (w != c.getWidth() || h != c.getHeight()) {
|
||||||
|
// Dimensions have changed (for example due to orientation change).
|
||||||
|
w = c.getWidth();
|
||||||
|
h = c.getHeight();
|
||||||
|
updateEffectiveDimensions();
|
||||||
|
setUpPath();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getX(double distance) {
|
private int getX(double distance) {
|
||||||
@@ -746,6 +763,7 @@ public class ChartView extends View {
|
|||||||
- (int) ((y - cvs.getMin()) * effectiveHeight / effectiveSpread);
|
- (int) ((y - cvs.getMin()) * effectiveHeight / effectiveSpread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws the labels on the X axis into the given canvas. */
|
||||||
private void drawXLabels(Canvas c) {
|
private void drawXLabels(Canvas c) {
|
||||||
double interval = (int) (maxX / zoomLevel / 4);
|
double interval = (int) (maxX / zoomLevel / 4);
|
||||||
boolean shortFormat = false;
|
boolean shortFormat = false;
|
||||||
@@ -770,6 +788,7 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws the labels on the Y axis into the given canvas. */
|
||||||
private float drawYLabels(ChartValueSeries cvs, Canvas c, int x) {
|
private float drawYLabels(ChartValueSeries cvs, Canvas c, int x) {
|
||||||
int interval = cvs.getInterval();
|
int interval = cvs.getInterval();
|
||||||
float maxTextWidth = 0;
|
float maxTextWidth = 0;
|
||||||
@@ -779,13 +798,14 @@ public class ChartView extends View {
|
|||||||
return maxTextWidth;
|
return maxTextWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws a single label on the X axis. */
|
||||||
private void drawXLabel(Canvas c, double x, boolean shortFormat) {
|
private void drawXLabel(Canvas c, double x, boolean shortFormat) {
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String s =
|
String s =
|
||||||
(mode == Mode.BY_DISTANCE)
|
(mode == Mode.BY_DISTANCE)
|
||||||
? (shortFormat ? xShortFormat.format(x) : xFormat.format(x))
|
? (shortFormat ? X_SHORT_FORMAT.format(x) : X_FORMAT.format(x))
|
||||||
: StringUtils.formatTime((long) x);
|
: StringUtils.formatTime((long) x);
|
||||||
c.drawText(s,
|
c.drawText(s,
|
||||||
getX(x),
|
getX(x),
|
||||||
@@ -793,6 +813,7 @@ public class ChartView extends View {
|
|||||||
labelPaint);
|
labelPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws a single label on the Y axis. */
|
||||||
private float drawYLabel(ChartValueSeries cvs, Canvas c, int x, int y) {
|
private float drawYLabel(ChartValueSeries cvs, Canvas c, int x, int y) {
|
||||||
int desiredY = (int) ((y - cvs.getMin()) * effectiveHeight /
|
int desiredY = (int) ((y - cvs.getMin()) * effectiveHeight /
|
||||||
(cvs.getInterval() * MAX_INTERVALS));
|
(cvs.getInterval() * MAX_INTERVALS));
|
||||||
@@ -804,6 +825,7 @@ public class ChartView extends View {
|
|||||||
return p.measureText(text);
|
return p.measureText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws the actual X axis line and its label. */
|
||||||
private void drawXAxis(Canvas canvas) {
|
private void drawXAxis(Canvas canvas) {
|
||||||
float rightEdge = getX(maxX);
|
float rightEdge = getX(maxX);
|
||||||
final int y = effectiveHeight + topBorder;
|
final int y = effectiveHeight + topBorder;
|
||||||
@@ -815,6 +837,7 @@ public class ChartView extends View {
|
|||||||
canvas.drawText(s, rightEdge, effectiveHeight + .2f * UNIT_BORDER + topBorder, labelPaint);
|
canvas.drawText(s, rightEdge, effectiveHeight + .2f * UNIT_BORDER + topBorder, labelPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Draws the actual Y axis line and its label. */
|
||||||
private void drawYAxis(Canvas canvas) {
|
private void drawYAxis(Canvas canvas) {
|
||||||
canvas.drawRect(0, 0,
|
canvas.drawRect(0, 0,
|
||||||
leftBorder - 1, effectiveHeight + topBorder + UNIT_BORDER + 1,
|
leftBorder - 1, effectiveHeight + topBorder + UNIT_BORDER + 1,
|
||||||
@@ -826,18 +849,15 @@ public class ChartView extends View {
|
|||||||
int y = i * effectiveHeight / MAX_INTERVALS + topBorder;
|
int y = i * effectiveHeight / MAX_INTERVALS + topBorder;
|
||||||
canvas.drawLine(leftBorder - 5, y, leftBorder, y, gridPaint);
|
canvas.drawLine(leftBorder - 5, y, leftBorder, y, gridPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
Context c = getContext();
|
Context c = getContext();
|
||||||
// TODO: This should really show units for all series.
|
// TODO: This should really show units for all series.
|
||||||
String s = metricUnits ? c.getString(R.string.meter) : c.getString(R.string.feet);
|
String s = metricUnits ? c.getString(R.string.meter) : c.getString(R.string.feet);
|
||||||
canvas.drawText(s, leftBorder - UNIT_BORDER * .2f, UNIT_BORDER * .8f + topBorder, labelPaint);
|
canvas.drawText(s, leftBorder - UNIT_BORDER * .2f, UNIT_BORDER * .8f + topBorder, labelPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void drawGrid(Canvas c) {
|
/** Draws the grid for the graph. */
|
||||||
if (data.isEmpty()) {
|
private void drawGrid(Canvas c) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
float rightEdge = getX(maxX);
|
float rightEdge = getX(maxX);
|
||||||
for (int i = 1; i < MAX_INTERVALS; ++i) {
|
for (int i = 1; i < MAX_INTERVALS; ++i) {
|
||||||
int y = i * effectiveHeight / MAX_INTERVALS + topBorder;
|
int y = i * effectiveHeight / MAX_INTERVALS + topBorder;
|
||||||
@@ -846,14 +866,24 @@ public class ChartView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets one of the chart value series.
|
* Returns whether a given time series is enabled for drawing.
|
||||||
* The index should be one of the following values:
|
|
||||||
* ELEVATION_SERIES or SPEED_SERIES
|
|
||||||
*
|
*
|
||||||
* @param index of the value series
|
* @param index the time series, one of {@link #ELEVATION_SERIES},
|
||||||
* @return The chart series at the index
|
* {@link #SPEED_SERIES}, {@link #POWER_SERIES}, etc.
|
||||||
|
* @return true if drawn, false otherwise
|
||||||
*/
|
*/
|
||||||
public ChartValueSeries getChartValueSeries(int index) {
|
public boolean isChartValueSeriesEnabled(int index) {
|
||||||
return series[index];
|
return series[index].isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether a given time series will be enabled for drawing.
|
||||||
|
*
|
||||||
|
* @param index the time series, one of {@link #ELEVATION_SERIES},
|
||||||
|
* {@link #SPEED_SERIES}, {@link #POWER_SERIES}, etc.
|
||||||
|
* @return true to be drawn, false otherwise
|
||||||
|
*/
|
||||||
|
public void setChartValueSeriesEnabled(int index, boolean enabled) {
|
||||||
|
series[index].setEnabled(enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import android.content.Context;
|
|||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -78,7 +79,9 @@ class CheckUnits {
|
|||||||
|
|
||||||
private static void accept(Context context, SharedPreferences preferences) {
|
private static void accept(Context context, SharedPreferences preferences) {
|
||||||
recordCheckPerformed(preferences);
|
recordCheckPerformed(preferences);
|
||||||
Intent startIntent = new Intent(context, MyTracksSettings.class);
|
Intent startIntent = new Intent(context, SettingsActivity.class);
|
||||||
|
startIntent.putExtra(context.getString(R.string.open_settings_screen),
|
||||||
|
context.getString(R.string.display_settings_screen_key));
|
||||||
context.startActivity(startIntent);
|
context.startActivity(startIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2011 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a colored {@code Path} to save its relative color for drawing.
|
||||||
|
* @author Vangelis S.
|
||||||
|
*/
|
||||||
|
public class ColoredPath {
|
||||||
|
private final Path path;
|
||||||
|
private final Paint pathPaint;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for a ColoredPath by color.
|
||||||
|
*/
|
||||||
|
public ColoredPath(int color) {
|
||||||
|
path = new Path();
|
||||||
|
pathPaint = new Paint();
|
||||||
|
pathPaint.setColor(color);
|
||||||
|
pathPaint.setStrokeWidth(3);
|
||||||
|
pathPaint.setStyle(Paint.Style.STROKE);
|
||||||
|
pathPaint.setAntiAlias(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for a ColoredPath by Paint.
|
||||||
|
*/
|
||||||
|
public ColoredPath(Paint paint) {
|
||||||
|
path = new Path();
|
||||||
|
pathPaint = paint;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the path
|
||||||
|
*/
|
||||||
|
public Path getPath() {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the pathPaint
|
||||||
|
*/
|
||||||
|
public Paint getPathPaint() {
|
||||||
|
return pathPaint;
|
||||||
|
}
|
||||||
|
}
|
||||||
+64
-64
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Google Inc.
|
* Copyright 2008 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -20,18 +20,13 @@ package com.google.android.apps.mytracks;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public abstract class MyTracksConstants {
|
public abstract class Constants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Should be used by all log statements
|
* Should be used by all log statements
|
||||||
*/
|
*/
|
||||||
public static final String TAG = "MyTracks";
|
public static final String TAG = "MyTracks";
|
||||||
|
|
||||||
/**
|
|
||||||
* Name of the gps location provider:
|
|
||||||
*/
|
|
||||||
public static final String GPS_PROVIDER = "gps";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the top-level directory inside the SD card where our files will
|
* Name of the top-level directory inside the SD card where our files will
|
||||||
* be read from/written to.
|
* be read from/written to.
|
||||||
@@ -44,32 +39,21 @@ public abstract class MyTracksConstants {
|
|||||||
|
|
||||||
public static final int GET_LOGIN = 0;
|
public static final int GET_LOGIN = 0;
|
||||||
public static final int GET_MAP = 1;
|
public static final int GET_MAP = 1;
|
||||||
public static final int CREATE_MAP = 2;
|
public static final int SHOW_TRACK = 2;
|
||||||
public static final int SHOW_TRACK = 3;
|
public static final int AUTHENTICATE_TO_MY_MAPS = 3;
|
||||||
public static final int ADD_LIST = 4;
|
public static final int AUTHENTICATE_TO_FUSION_TABLES = 4;
|
||||||
public static final int FEATURE_DETAILS = 5;
|
public static final int AUTHENTICATE_TO_DOCLIST = 5;
|
||||||
public static final int START_RECORDING = 6;
|
public static final int AUTHENTICATE_TO_TRIX = 6;
|
||||||
public static final int STOP_RECORDING = 7;
|
public static final int SHARE_GPX_FILE = 7;
|
||||||
public static final int AUTHENTICATE_TO_MY_MAPS = 8;
|
public static final int SHARE_KML_FILE = 8;
|
||||||
public static final int AUTHENTICATE_TO_FUSION_TABLES = 9;
|
public static final int SHARE_CSV_FILE = 9;
|
||||||
public static final int AUTHENTICATE_TO_DOCLIST = 10;
|
public static final int SHARE_TCX_FILE = 10;
|
||||||
public static final int AUTHENTICATE_TO_TRIX = 11;
|
public static final int SAVE_GPX_FILE = 11;
|
||||||
public static final int DELETE_TRACK = 13;
|
public static final int SAVE_KML_FILE = 12;
|
||||||
public static final int SEND_TO_GOOGLE_DIALOG = 14;
|
public static final int SAVE_CSV_FILE = 13;
|
||||||
public static final int SHARE_LINK = 15;
|
public static final int SAVE_TCX_FILE = 14;
|
||||||
public static final int SHARE_GPX_FILE = 16;
|
public static final int SHOW_WAYPOINT = 15;
|
||||||
public static final int SHARE_KML_FILE = 17;
|
public static final int WELCOME = 16;
|
||||||
public static final int SHARE_CSV_FILE = 18;
|
|
||||||
public static final int SHARE_TCX_FILE = 19;
|
|
||||||
public static final int EDIT_DETAILS = 20;
|
|
||||||
public static final int SAVE_GPX_FILE = 21;
|
|
||||||
public static final int SAVE_KML_FILE = 22;
|
|
||||||
public static final int SAVE_CSV_FILE = 23;
|
|
||||||
public static final int SAVE_TCX_FILE = 24;
|
|
||||||
public static final int CLEAR_MAP = 25;
|
|
||||||
public static final int SHOW_WAYPOINT = 26;
|
|
||||||
public static final int EDIT_WAYPOINT = 27;
|
|
||||||
public static final int WELCOME = 28;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Menu ids:
|
* Menu ids:
|
||||||
@@ -140,6 +124,12 @@ public abstract class MyTracksConstants {
|
|||||||
*/
|
*/
|
||||||
public static final int MAX_LOADED_TRACK_POINTS = 20000;
|
public static final int MAX_LOADED_TRACK_POINTS = 20000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum number of track points ever loaded at once from the provider into
|
||||||
|
* memory in a single call to read points.
|
||||||
|
*/
|
||||||
|
public static final int MAX_LOADED_TRACK_POINTS_PER_BATCH = 1000;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum number of way points displayed by the map overlay.
|
* Maximum number of way points displayed by the map overlay.
|
||||||
*/
|
*/
|
||||||
@@ -168,11 +158,17 @@ public abstract class MyTracksConstants {
|
|||||||
*/
|
*/
|
||||||
public static final double MAX_ACCELERATION = 0.02;
|
public static final double MAX_ACCELERATION = 0.02;
|
||||||
|
|
||||||
|
/** Maximum age of a GPS location to be considered current. */
|
||||||
|
public static final long MAX_LOCATION_AGE_MS = 60 * 1000; // 1 minute
|
||||||
|
|
||||||
|
/** Maximum age of a network location to be considered current. */
|
||||||
|
public static final long MAX_NETWORK_AGE_MS = 1000 * 60 * 10; // 10 minutes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of account that we can use for gdata uploads.
|
* The type of account that we can use for gdata uploads.
|
||||||
*/
|
*/
|
||||||
public static final String ACCOUNT_TYPE = "com.google";
|
public static final String ACCOUNT_TYPE = "com.google";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of extra intent property to indicate whether we want to resume
|
* The name of extra intent property to indicate whether we want to resume
|
||||||
* a previously recorded track.
|
* a previously recorded track.
|
||||||
@@ -182,42 +178,46 @@ public abstract class MyTracksConstants {
|
|||||||
|
|
||||||
public static int getActionFromMenuId(int menuId) {
|
public static int getActionFromMenuId(int menuId) {
|
||||||
switch (menuId) {
|
switch (menuId) {
|
||||||
case MyTracksConstants.MENU_SEND_TO_GOOGLE:
|
case Constants.MENU_SHARE_KML_FILE:
|
||||||
return MyTracksConstants.SEND_TO_GOOGLE_DIALOG;
|
return Constants.SHARE_KML_FILE;
|
||||||
case MyTracksConstants.MENU_EDIT:
|
case Constants.MENU_SHARE_GPX_FILE:
|
||||||
return MyTracksConstants.EDIT_DETAILS;
|
return Constants.SHARE_GPX_FILE;
|
||||||
case MyTracksConstants.MENU_DELETE:
|
case Constants.MENU_SHARE_CSV_FILE:
|
||||||
return MyTracksConstants.DELETE_TRACK;
|
return Constants.SHARE_CSV_FILE;
|
||||||
case MyTracksConstants.MENU_SHARE_LINK:
|
case Constants.MENU_SHARE_TCX_FILE:
|
||||||
return MyTracksConstants.SHARE_LINK;
|
return Constants.SHARE_TCX_FILE;
|
||||||
case MyTracksConstants.MENU_SHARE_KML_FILE:
|
case Constants.MENU_SAVE_GPX_FILE:
|
||||||
return MyTracksConstants.SHARE_KML_FILE;
|
return Constants.SAVE_GPX_FILE;
|
||||||
case MyTracksConstants.MENU_SHARE_GPX_FILE:
|
case Constants.MENU_SAVE_KML_FILE:
|
||||||
return MyTracksConstants.SHARE_GPX_FILE;
|
return Constants.SAVE_KML_FILE;
|
||||||
case MyTracksConstants.MENU_SHARE_CSV_FILE:
|
case Constants.MENU_SAVE_CSV_FILE:
|
||||||
return MyTracksConstants.SHARE_CSV_FILE;
|
return Constants.SAVE_CSV_FILE;
|
||||||
case MyTracksConstants.MENU_SHARE_TCX_FILE:
|
case Constants.MENU_SAVE_TCX_FILE:
|
||||||
return MyTracksConstants.SHARE_TCX_FILE;
|
return Constants.SAVE_TCX_FILE;
|
||||||
case MyTracksConstants.MENU_SAVE_GPX_FILE:
|
|
||||||
return MyTracksConstants.SAVE_GPX_FILE;
|
|
||||||
case MyTracksConstants.MENU_SAVE_KML_FILE:
|
|
||||||
return MyTracksConstants.SAVE_KML_FILE;
|
|
||||||
case MyTracksConstants.MENU_SAVE_CSV_FILE:
|
|
||||||
return MyTracksConstants.SAVE_CSV_FILE;
|
|
||||||
case MyTracksConstants.MENU_SAVE_TCX_FILE:
|
|
||||||
return MyTracksConstants.SAVE_TCX_FILE;
|
|
||||||
case MyTracksConstants.MENU_CLEAR_MAP:
|
|
||||||
return MyTracksConstants.CLEAR_MAP;
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String MAPSHOP_BASE_URL =
|
public static final String MAPSHOP_BASE_URL =
|
||||||
"http://maps.google.com/maps/ms";
|
"https://maps.google.com/maps/ms";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default values - keep in sync with those in preferences.xml.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public static final int DEFAULT_ANNOUNCEMENT_FREQUENCY = -1;
|
||||||
|
public static final int DEFAULT_AUTO_RESUME_TRACK_TIMEOUT = 10; // In min.
|
||||||
|
public static final int DEFAULT_MAX_RECORDING_DISTANCE = 200;
|
||||||
|
public static final int DEFAULT_MIN_RECORDING_DISTANCE = 5;
|
||||||
|
public static final int DEFAULT_MIN_RECORDING_INTERVAL = 0;
|
||||||
|
public static final int DEFAULT_MIN_REQUIRED_ACCURACY = 200;
|
||||||
|
public static final int DEFAULT_SPLIT_FREQUENCY = 0;
|
||||||
|
|
||||||
|
public static final String SETTINGS_NAME = "SettingsActivity";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an abstract utility class.
|
* This is an abstract utility class.
|
||||||
*/
|
*/
|
||||||
protected MyTracksConstants() { }
|
protected Constants() { }
|
||||||
}
|
}
|
||||||
+12
-11
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Google Inc.
|
* Copyright 2008 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -34,12 +34,12 @@ import android.util.Log;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksDeleteAllTracks extends Handler {
|
public class DeleteAllTracks extends Handler {
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final Runnable done;
|
private final Runnable done;
|
||||||
|
|
||||||
public MyTracksDeleteAllTracks(Context context, Runnable done) {
|
public DeleteAllTracks(Context context, Runnable done) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.done = done;
|
this.done = done;
|
||||||
}
|
}
|
||||||
@@ -56,13 +56,14 @@ public class MyTracksDeleteAllTracks extends Handler {
|
|||||||
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||||
builder.setPositiveButton(context.getString(R.string.yes),
|
builder.setPositiveButton(context.getString(R.string.yes),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
dialog.dismiss();
|
dialogInterface.dismiss();
|
||||||
Log.w(MyTracksConstants.TAG, "deleting all!");
|
Log.w(Constants.TAG, "deleting all!");
|
||||||
MyTracksProviderUtils.Factory.get(context).deleteAllTracks();
|
MyTracksProviderUtils.Factory.get(context).deleteAllTracks();
|
||||||
SharedPreferences prefs =
|
SharedPreferences prefs =
|
||||||
context.getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
context.getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
|
// TODO: Go through data manager
|
||||||
editor.putLong(context.getString(R.string.selected_track_key), -1);
|
editor.putLong(context.getString(R.string.selected_track_key), -1);
|
||||||
ApiFeatures.getInstance().getApiPlatformAdapter().applyPreferenceChanges(editor);
|
ApiFeatures.getInstance().getApiPlatformAdapter().applyPreferenceChanges(editor);
|
||||||
if (done != null) {
|
if (done != null) {
|
||||||
@@ -73,8 +74,8 @@ public class MyTracksDeleteAllTracks extends Handler {
|
|||||||
});
|
});
|
||||||
builder.setNegativeButton(context.getString(R.string.no),
|
builder.setNegativeButton(context.getString(R.string.no),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
dialog.dismiss();
|
dialogInterface.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog = builder.create();
|
dialog = builder.create();
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2011 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
||||||
|
import com.google.android.apps.mytracks.content.TracksColumns;
|
||||||
|
import com.google.android.apps.mytracks.util.ApiFeatures;
|
||||||
|
import com.google.android.apps.mytracks.util.UriUtils;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.AlertDialog;
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.content.ContentUris;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.DialogInterface.OnCancelListener;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.SharedPreferences.Editor;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activity used to delete a track.
|
||||||
|
*
|
||||||
|
* @author Rodrigo Damazio
|
||||||
|
*/
|
||||||
|
public class DeleteTrack extends Activity
|
||||||
|
implements DialogInterface.OnClickListener, OnCancelListener {
|
||||||
|
private static final int CONFIRM_DIALOG = 1;
|
||||||
|
|
||||||
|
private MyTracksProviderUtils providerUtils;
|
||||||
|
|
||||||
|
private long deleteTrackId;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
providerUtils = MyTracksProviderUtils.Factory.get(this);
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
String action = intent.getAction();
|
||||||
|
Uri data = intent.getData();
|
||||||
|
if (!Intent.ACTION_DELETE.equals(action) ||
|
||||||
|
!UriUtils.matchesContentUri(data, TracksColumns.CONTENT_URI)) {
|
||||||
|
Log.e(TAG, "Got bad delete intent: " + intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteTrackId = ContentUris.parseId(data);
|
||||||
|
|
||||||
|
showDialog(CONFIRM_DIALOG);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Dialog onCreateDialog(int id) {
|
||||||
|
if (id != CONFIRM_DIALOG) {
|
||||||
|
Log.e(TAG, "Unknown dialog " + id);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setMessage(getString(R.string.track_will_be_permanently_deleted));
|
||||||
|
builder.setTitle(getString(R.string.are_you_sure_question));
|
||||||
|
builder.setIcon(android.R.drawable.ic_dialog_alert);
|
||||||
|
builder.setPositiveButton(getString(R.string.yes), this);
|
||||||
|
builder.setNegativeButton(getString(R.string.no), this);
|
||||||
|
builder.setOnCancelListener(this);
|
||||||
|
return builder.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int which) {
|
||||||
|
dialogInterface.dismiss();
|
||||||
|
if (which == DialogInterface.BUTTON_POSITIVE) {
|
||||||
|
deleteTrack();
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCancel(DialogInterface dialog) {
|
||||||
|
onClick(dialog, DialogInterface.BUTTON_NEGATIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteTrack() {
|
||||||
|
providerUtils.deleteTrack(deleteTrackId);
|
||||||
|
|
||||||
|
// If the track we just deleted was selected, unselect it.
|
||||||
|
String selectedKey = getString(R.string.selected_track_key);
|
||||||
|
SharedPreferences preferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
|
if (preferences.getLong(selectedKey, -1) == deleteTrackId) {
|
||||||
|
Editor editor = preferences.edit().putLong(selectedKey, -1);
|
||||||
|
ApiFeatures.getInstance().getApiPlatformAdapter().applyPreferenceChanges(editor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,14 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.io.sendtogoogle.SendDialog;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
import com.google.android.maps.mytracks.R;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.app.ProgressDialog;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.WindowManager.BadTokenException;
|
import android.view.WindowManager.BadTokenException;
|
||||||
|
|
||||||
@@ -33,179 +29,43 @@ import android.view.WindowManager.BadTokenException;
|
|||||||
*/
|
*/
|
||||||
public class DialogManager {
|
public class DialogManager {
|
||||||
|
|
||||||
public static final int DIALOG_CHART_SETTINGS = 1;
|
|
||||||
public static final int DIALOG_IMPORT_PROGRESS = 2;
|
|
||||||
public static final int DIALOG_PROGRESS = 3;
|
|
||||||
public static final int DIALOG_SEND_TO_GOOGLE = 4;
|
|
||||||
public static final int DIALOG_WRITE_PROGRESS = 5;
|
|
||||||
|
|
||||||
private ProgressDialog progressDialog;
|
|
||||||
private ProgressDialog importProgressDialog;
|
|
||||||
private ProgressDialog writeProgressDialog;
|
|
||||||
private SendDialog sendToGoogleDialog;
|
|
||||||
private ChartSettingsDialog chartSettingsDialog;
|
|
||||||
|
|
||||||
private MyTracks activity;
|
|
||||||
|
|
||||||
public DialogManager(MyTracks activity) {
|
|
||||||
this.activity = activity;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Dialog onCreateDialog(int id, Bundle args) {
|
|
||||||
switch (id) {
|
|
||||||
case DIALOG_CHART_SETTINGS:
|
|
||||||
chartSettingsDialog = new ChartSettingsDialog(activity);
|
|
||||||
return chartSettingsDialog;
|
|
||||||
case DIALOG_IMPORT_PROGRESS:
|
|
||||||
importProgressDialog = new ProgressDialog(activity);
|
|
||||||
importProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
|
|
||||||
importProgressDialog.setTitle(
|
|
||||||
activity.getString(R.string.progress_title));
|
|
||||||
importProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
|
||||||
importProgressDialog.setMessage(
|
|
||||||
activity.getString(R.string.import_progress_message));
|
|
||||||
return importProgressDialog;
|
|
||||||
case DIALOG_PROGRESS:
|
|
||||||
progressDialog = new ProgressDialog(activity);
|
|
||||||
progressDialog.setIcon(android.R.drawable.ic_dialog_info);
|
|
||||||
progressDialog.setTitle(activity.getString(R.string.progress_title));
|
|
||||||
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
|
|
||||||
progressDialog.setMessage("");
|
|
||||||
progressDialog.setMax(100);
|
|
||||||
progressDialog.setProgress(10);
|
|
||||||
return progressDialog;
|
|
||||||
case DIALOG_SEND_TO_GOOGLE:
|
|
||||||
sendToGoogleDialog = new SendDialog(activity);
|
|
||||||
return sendToGoogleDialog;
|
|
||||||
case DIALOG_WRITE_PROGRESS:
|
|
||||||
writeProgressDialog = new ProgressDialog(activity);
|
|
||||||
writeProgressDialog.setIcon(android.R.drawable.ic_dialog_info);
|
|
||||||
writeProgressDialog.setTitle(
|
|
||||||
activity.getString(R.string.progress_title));
|
|
||||||
writeProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
|
|
||||||
writeProgressDialog.setMessage(
|
|
||||||
activity.getString(R.string.write_progress_message));
|
|
||||||
return writeProgressDialog;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void onPrepareDialog(int id, Dialog dialog) {
|
|
||||||
switch (id) {
|
|
||||||
case DIALOG_SEND_TO_GOOGLE:
|
|
||||||
activity.resetSendToGoogleStatus();
|
|
||||||
break;
|
|
||||||
case DIALOG_CHART_SETTINGS:
|
|
||||||
Log.d(MyTracksConstants.TAG, "MyTracks.onPrepare chart dialog");
|
|
||||||
chartSettingsDialog.setup(activity.getChartActivity());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProgressMessage(final String message) {
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
synchronized (this) {
|
|
||||||
if (progressDialog != null) {
|
|
||||||
progressDialog.setMessage(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProgressValue(final int percent) {
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
synchronized (this) {
|
|
||||||
if (progressDialog != null) {
|
|
||||||
progressDialog.setProgress(percent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the sendToGoogleDialog
|
|
||||||
*/
|
|
||||||
public SendDialog getSendToGoogleDialog() {
|
|
||||||
return sendToGoogleDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Shows a dialog with the given message.
|
|
||||||
* Does it on the UI thread.
|
|
||||||
*
|
|
||||||
* @param success if true, displays an info icon/title, otherwise an error
|
|
||||||
* icon/title
|
|
||||||
* @param message resource string id
|
|
||||||
*/
|
|
||||||
public void showMessageDialog(final int message, final boolean success) {
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
AlertDialog dialog = null;
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
|
||||||
builder.setMessage(activity.getString(message));
|
|
||||||
builder.setNegativeButton(activity.getString(R.string.ok), null);
|
|
||||||
builder.setIcon(success ? android.R.drawable.ic_dialog_info :
|
|
||||||
android.R.drawable.ic_dialog_alert);
|
|
||||||
builder.setTitle(success ? R.string.success : R.string.error);
|
|
||||||
dialog = builder.create();
|
|
||||||
dialog.show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Just like showDialog, but will catch a {@link BadTokenException} that
|
|
||||||
* sometimes (very rarely) gets thrown. This might happen if the user hits
|
|
||||||
* the "back" button immediately after sending tracks to google.
|
|
||||||
*
|
|
||||||
* @param id the dialog id
|
|
||||||
*/
|
|
||||||
public void showDialogSafely(final int id) {
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
try {
|
|
||||||
activity.showDialog(id);
|
|
||||||
} catch (BadTokenException e) {
|
|
||||||
Log.w(MyTracksConstants.TAG,
|
|
||||||
"Could not display dialog with id " + id, e);
|
|
||||||
} catch (IllegalStateException e) {
|
|
||||||
Log.w(MyTracksConstants.TAG,
|
|
||||||
"Could not display dialog with id " + id, e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The equivalent of {@link #showDialogSafely(int)}, but for a specific
|
* The equivalent of {@link #showDialogSafely(int)}, but for a specific
|
||||||
* dialog instance.
|
* dialog instance.
|
||||||
*/
|
*/
|
||||||
public static void showDialogSafely(Activity activity, final Dialog dialog) {
|
public static void showDialogSafely(Activity activity, final Dialog dialog) {
|
||||||
|
if (activity.isFinishing()) {
|
||||||
|
Log.w(TAG, "Activity finishing - not showing dialog");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
dialog.show();
|
dialog.show();
|
||||||
} catch (BadTokenException e) {
|
} catch (BadTokenException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "Could not display dialog", e);
|
Log.w(TAG, "Could not display dialog", e);
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "Could not display dialog", e);
|
Log.w(TAG, "Could not display dialog", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dismisses the progress dialog if it is showing. Executed on the UI thread.
|
* The equivalent of {@link #dismissDialogSafely(int)}, but for a specific
|
||||||
|
* dialog instance.
|
||||||
*/
|
*/
|
||||||
public void dismissDialogSafely(final int id) {
|
public static void dismissDialogSafely(Activity activity, final Dialog dialog) {
|
||||||
|
if (activity.isFinishing()) {
|
||||||
|
Log.w(TAG, "Activity finishing - not dismissing dialog");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
activity.dismissDialog(id);
|
dialog.dismiss();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
// This will be thrown if this dialog was not shown before.
|
// This will be thrown if this dialog was not shown before.
|
||||||
}
|
}
|
||||||
@@ -213,4 +73,5 @@ public class DialogManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DialogManager() {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ class Eula {
|
|||||||
ApiFeatures.getInstance().getApiPlatformAdapter().applyPreferenceChanges(
|
ApiFeatures.getInstance().getApiPlatformAdapter().applyPreferenceChanges(
|
||||||
preferences.edit().putBoolean(PREFERENCE_EULA_ACCEPTED, true));
|
preferences.edit().putBoolean(PREFERENCE_EULA_ACCEPTED, true));
|
||||||
Intent startIntent = new Intent(activity, WelcomeActivity.class);
|
Intent startIntent = new Intent(activity, WelcomeActivity.class);
|
||||||
activity.startActivityForResult(startIntent, MyTracksConstants.WELCOME);
|
activity.startActivityForResult(startIntent, Constants.WELCOME);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void refuse(Activity activity) {
|
private static void refuse(Activity activity) {
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009 Google Inc.
|
* Copyright 2009 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -17,10 +17,10 @@ package com.google.android.apps.mytracks;
|
|||||||
|
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
||||||
import com.google.android.apps.mytracks.content.TracksColumns;
|
import com.google.android.apps.mytracks.content.TracksColumns;
|
||||||
import com.google.android.apps.mytracks.io.TrackWriter;
|
import com.google.android.apps.mytracks.io.file.TrackWriter;
|
||||||
import com.google.android.apps.mytracks.io.TrackWriterFactory;
|
import com.google.android.apps.mytracks.io.file.TrackWriterFactory;
|
||||||
import com.google.android.apps.mytracks.io.TrackWriterFactory.TrackFileFormat;
|
import com.google.android.apps.mytracks.io.file.TrackWriterFactory.TrackFileFormat;
|
||||||
import com.google.android.apps.mytracks.util.MyTracksUtils;
|
import com.google.android.apps.mytracks.util.SystemUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@@ -29,8 +29,6 @@ import android.app.ProgressDialog;
|
|||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.HandlerThread;
|
|
||||||
import android.os.PowerManager.WakeLock;
|
import android.os.PowerManager.WakeLock;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -71,14 +69,14 @@ public class ExportAllTracks {
|
|||||||
format = TrackFileFormat.TCX;
|
format = TrackFileFormat.TCX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.w(MyTracksConstants.TAG, "Unknown export format: " + which);
|
Log.w(Constants.TAG, "Unknown export format: " + which);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public ExportAllTracks(Activity activity) {
|
public ExportAllTracks(Activity activity) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
Log.i(MyTracksConstants.TAG, "ExportAllTracks: Starting");
|
Log.i(Constants.TAG, "ExportAllTracks: Starting");
|
||||||
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setSingleChoiceItems(R.array.export_formats, 0, itemClick);
|
builder.setSingleChoiceItems(R.array.export_formats, 0, itemClick);
|
||||||
@@ -91,12 +89,7 @@ public class ExportAllTracks {
|
|||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
HandlerThread handlerThread;
|
new Thread(runner, "SendToMyMaps").start();
|
||||||
Handler handler;
|
|
||||||
handlerThread = new HandlerThread("SendToMyMaps");
|
|
||||||
handlerThread.start();
|
|
||||||
handler = new Handler(handlerThread.getLooper());
|
|
||||||
handler.post(runner);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,14 +106,14 @@ public class ExportAllTracks {
|
|||||||
*/
|
*/
|
||||||
private void aquireLocksAndExport() {
|
private void aquireLocksAndExport() {
|
||||||
SharedPreferences prefs =
|
SharedPreferences prefs =
|
||||||
activity.getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
activity.getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
long recordingTrackId = -1;
|
long recordingTrackId = -1;
|
||||||
if (prefs != null) {
|
if (prefs != null) {
|
||||||
recordingTrackId =
|
recordingTrackId =
|
||||||
prefs.getLong(activity.getString(R.string.recording_track_key), -1);
|
prefs.getLong(activity.getString(R.string.recording_track_key), -1);
|
||||||
}
|
}
|
||||||
if (recordingTrackId != -1) {
|
if (recordingTrackId != -1) {
|
||||||
wakeLock = MyTracksUtils.acquireWakeLock(activity, wakeLock);
|
wakeLock = SystemUtils.acquireWakeLock(activity, wakeLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we can safely export everything.
|
// Now we can safely export everything.
|
||||||
@@ -130,10 +123,10 @@ public class ExportAllTracks {
|
|||||||
// TODO check what happens if we started recording after getting this lock.
|
// TODO check what happens if we started recording after getting this lock.
|
||||||
if (wakeLock != null && wakeLock.isHeld()) {
|
if (wakeLock != null && wakeLock.isHeld()) {
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
Log.i(MyTracksConstants.TAG, "ExportAllTracks: Releasing wake lock.");
|
Log.i(Constants.TAG, "ExportAllTracks: Releasing wake lock.");
|
||||||
}
|
}
|
||||||
Log.i(MyTracksConstants.TAG, "ExportAllTracks: Done");
|
Log.i(Constants.TAG, "ExportAllTracks: Done");
|
||||||
Toast.makeText(activity, R.string.export_done, Toast.LENGTH_SHORT).show();
|
showToast(R.string.export_done, Toast.LENGTH_SHORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void makeProgressDialog(final int trackCount) {
|
private void makeProgressDialog(final int trackCount) {
|
||||||
@@ -163,7 +156,7 @@ public class ExportAllTracks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int trackCount = cursor.getCount();
|
final int trackCount = cursor.getCount();
|
||||||
Log.i(MyTracksConstants.TAG,
|
Log.i(Constants.TAG,
|
||||||
"ExportAllTracks: Exporting: " + cursor.getCount() + " tracks.");
|
"ExportAllTracks: Exporting: " + cursor.getCount() + " tracks.");
|
||||||
int idxTrackId = cursor.getColumnIndexOrThrow(TracksColumns._ID);
|
int idxTrackId = cursor.getColumnIndexOrThrow(TracksColumns._ID);
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
@@ -186,15 +179,19 @@ public class ExportAllTracks {
|
|||||||
});
|
});
|
||||||
|
|
||||||
long id = cursor.getLong(idxTrackId);
|
long id = cursor.getLong(idxTrackId);
|
||||||
Log.i(MyTracksConstants.TAG, "ExportAllTracks: exporting: " + id);
|
Log.i(Constants.TAG, "ExportAllTracks: exporting: " + id);
|
||||||
TrackWriter writer =
|
TrackWriter writer =
|
||||||
TrackWriterFactory.newWriter(activity, providerUtils, id, format);
|
TrackWriterFactory.newWriter(activity, providerUtils, id, format);
|
||||||
|
if (writer == null) {
|
||||||
|
showToast(R.string.error_track_does_not_exist, Toast.LENGTH_LONG);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
writer.writeTrack();
|
writer.writeTrack();
|
||||||
|
|
||||||
if (!writer.wasSuccess()) {
|
if (!writer.wasSuccess()) {
|
||||||
// Abort the whole export on the first error.
|
// Abort the whole export on the first error.
|
||||||
int error = writer.getErrorMessage();
|
showToast(writer.getErrorMessage(), Toast.LENGTH_LONG);
|
||||||
Toast.makeText(activity, error, Toast.LENGTH_LONG).show();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,4 +207,13 @@ public class ExportAllTracks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showToast(final int messageId, final int length) {
|
||||||
|
activity.runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Toast.makeText(activity, messageId, length).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011 Google Inc.
|
* Copyright 2011 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -16,17 +16,15 @@
|
|||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
||||||
import com.google.android.apps.mytracks.io.GpxImporter;
|
import com.google.android.apps.mytracks.io.file.GpxImporter;
|
||||||
import com.google.android.apps.mytracks.util.FileUtils;
|
import com.google.android.apps.mytracks.util.FileUtils;
|
||||||
import com.google.android.apps.mytracks.util.MyTracksUtils;
|
import com.google.android.apps.mytracks.util.SystemUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.HandlerThread;
|
|
||||||
import android.os.PowerManager.WakeLock;
|
import android.os.PowerManager.WakeLock;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
@@ -45,7 +43,7 @@ import org.xml.sax.SAXException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A class that will import all GPX tracks in /sdcard/MyTracks/gpx/
|
* A class that will import all GPX tracks in /sdcard/MyTracks/gpx/
|
||||||
*
|
*
|
||||||
* @author David Piggott
|
* @author David Piggott
|
||||||
*/
|
*/
|
||||||
public class ImportAllTracks {
|
public class ImportAllTracks {
|
||||||
@@ -60,15 +58,11 @@ public class ImportAllTracks {
|
|||||||
|
|
||||||
public ImportAllTracks(Activity activity) {
|
public ImportAllTracks(Activity activity) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
Log.i(MyTracksConstants.TAG, "ImportAllTracks: Starting");
|
Log.i(Constants.TAG, "ImportAllTracks: Starting");
|
||||||
fileUtils = new FileUtils();
|
fileUtils = new FileUtils();
|
||||||
gpxPath = fileUtils.buildExternalDirectoryPath("gpx");
|
gpxPath = fileUtils.buildExternalDirectoryPath("gpx");
|
||||||
HandlerThread handlerThread;
|
|
||||||
Handler handler;
|
new Thread(runner).start();
|
||||||
handlerThread = new HandlerThread("ImportAllTracks");
|
|
||||||
handlerThread.start();
|
|
||||||
handler = new Handler(handlerThread.getLooper());
|
|
||||||
handler.post(runner);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Runnable runner = new Runnable() {
|
private final Runnable runner = new Runnable() {
|
||||||
@@ -82,13 +76,13 @@ public class ImportAllTracks {
|
|||||||
* track. Acquire a wake lock if there is no current track.
|
* track. Acquire a wake lock if there is no current track.
|
||||||
*/
|
*/
|
||||||
private void aquireLocksAndImport() {
|
private void aquireLocksAndImport() {
|
||||||
SharedPreferences prefs = activity.getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
SharedPreferences prefs = activity.getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
long recordingTrackId = -1;
|
long recordingTrackId = -1;
|
||||||
if (prefs != null) {
|
if (prefs != null) {
|
||||||
recordingTrackId = prefs.getLong(activity.getString(R.string.recording_track_key), -1);
|
recordingTrackId = prefs.getLong(activity.getString(R.string.recording_track_key), -1);
|
||||||
}
|
}
|
||||||
if (recordingTrackId != -1) {
|
if (recordingTrackId != -1) {
|
||||||
wakeLock = MyTracksUtils.acquireWakeLock(activity, wakeLock);
|
wakeLock = SystemUtils.acquireWakeLock(activity, wakeLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we can safely import everything.
|
// Now we can safely import everything.
|
||||||
@@ -98,15 +92,24 @@ public class ImportAllTracks {
|
|||||||
// TODO check what happens if we started recording after getting this lock.
|
// TODO check what happens if we started recording after getting this lock.
|
||||||
if (wakeLock != null && wakeLock.isHeld()) {
|
if (wakeLock != null && wakeLock.isHeld()) {
|
||||||
wakeLock.release();
|
wakeLock.release();
|
||||||
Log.i(MyTracksConstants.TAG, "ImportAllTracks: Releasing wake lock.");
|
Log.i(Constants.TAG, "ImportAllTracks: Releasing wake lock.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i(MyTracksConstants.TAG, "ImportAllTracks: Done");
|
activity.runOnUiThread(new Thread() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
showDoneDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void showDoneDialog() {
|
||||||
|
Log.i(Constants.TAG, "ImportAllTracks: Done");
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
if (gpxFileCount == 0) {
|
if (gpxFileCount == 0) {
|
||||||
builder.setMessage(activity.getString(R.string.import_empty, gpxPath + "/"));
|
builder.setMessage(activity.getString(R.string.import_multi_empty, gpxPath + "/"));
|
||||||
} else {
|
} else {
|
||||||
builder.setMessage(activity.getString(R.string.import_done, importSuccessCount, gpxFileCount,
|
builder.setMessage(activity.getString(R.string.import_multi_done, importSuccessCount, gpxFileCount,
|
||||||
gpxPath + "/"));
|
gpxPath + "/"));
|
||||||
}
|
}
|
||||||
builder.setPositiveButton(R.string.ok, null);
|
builder.setPositiveButton(R.string.ok, null);
|
||||||
@@ -141,7 +144,7 @@ public class ImportAllTracks {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i(MyTracksConstants.TAG, "ImportAllTracks: Importing: " + gpxFileCount + " tracks.");
|
Log.i(Constants.TAG, "ImportAllTracks: Importing: " + gpxFileCount + " tracks.");
|
||||||
activity.runOnUiThread(new Runnable() {
|
activity.runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
makeProgressDialog(gpxFileCount);
|
makeProgressDialog(gpxFileCount);
|
||||||
@@ -180,19 +183,19 @@ public class ImportAllTracks {
|
|||||||
* notifications and returns false on failure.
|
* notifications and returns false on failure.
|
||||||
*/
|
*/
|
||||||
private boolean importFile(File gpxFile, MyTracksProviderUtils providerUtils) {
|
private boolean importFile(File gpxFile, MyTracksProviderUtils providerUtils) {
|
||||||
Log.i(MyTracksConstants.TAG, "ImportAllTracks: importing: " + gpxFile.getName());
|
Log.i(Constants.TAG, "ImportAllTracks: importing: " + gpxFile.getName());
|
||||||
try {
|
try {
|
||||||
GpxImporter.importGPXFile(new FileInputStream(gpxFile), providerUtils);
|
GpxImporter.importGPXFile(new FileInputStream(gpxFile), providerUtils);
|
||||||
return true;
|
return true;
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "GPX file wasn't found/went missing: "
|
Log.w(Constants.TAG, "GPX file wasn't found/went missing: "
|
||||||
+ gpxFile.getAbsolutePath(), e);
|
+ gpxFile.getAbsolutePath(), e);
|
||||||
} catch (ParserConfigurationException e) {
|
} catch (ParserConfigurationException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "Error parsing file: " + gpxFile.getAbsolutePath(), e);
|
Log.w(Constants.TAG, "Error parsing file: " + gpxFile.getAbsolutePath(), e);
|
||||||
} catch (SAXException e) {
|
} catch (SAXException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "Error parsing file: " + gpxFile.getAbsolutePath(), e);
|
Log.w(Constants.TAG, "Error parsing file: " + gpxFile.getAbsolutePath(), e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w(MyTracksConstants.TAG, "Error reading file: " + gpxFile.getAbsolutePath(), e);
|
Log.w(Constants.TAG, "Error reading file: " + gpxFile.getAbsolutePath(), e);
|
||||||
}
|
}
|
||||||
Toast.makeText(activity, activity.getString(R.string.import_error, gpxFile.getName()),
|
Toast.makeText(activity, activity.getString(R.string.import_error, gpxFile.getName()),
|
||||||
Toast.LENGTH_LONG).show();
|
Toast.LENGTH_LONG).show();
|
||||||
@@ -214,4 +217,4 @@ public class ImportAllTracks {
|
|||||||
}
|
}
|
||||||
return gpxFiles;
|
return gpxFiles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,620 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
||||||
|
import com.google.android.apps.mytracks.content.Track;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub.ListenerDataType;
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataListener;
|
||||||
|
import com.google.android.apps.mytracks.content.TracksColumns;
|
||||||
|
import com.google.android.apps.mytracks.content.Waypoint;
|
||||||
|
import com.google.android.apps.mytracks.io.file.SaveActivity;
|
||||||
|
import com.google.android.apps.mytracks.io.sendtogoogle.SendActivity;
|
||||||
|
import com.google.android.apps.mytracks.services.tasks.StatusAnnouncerFactory;
|
||||||
|
import com.google.android.apps.mytracks.stats.TripStatistics;
|
||||||
|
import com.google.android.apps.mytracks.util.ApiFeatures;
|
||||||
|
import com.google.android.apps.mytracks.util.GeoRect;
|
||||||
|
import com.google.android.apps.mytracks.util.LocationUtils;
|
||||||
|
import com.google.android.maps.GeoPoint;
|
||||||
|
import com.google.android.maps.MapController;
|
||||||
|
import com.google.android.maps.MapView;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.content.ContentUris;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.location.Location;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.provider.Settings;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.ContextMenu;
|
||||||
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.SubMenu;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.View.OnCreateContextMenuListener;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.RelativeLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The map view activity of the MyTracks application.
|
||||||
|
*
|
||||||
|
* @author Leif Hendrik Wilden
|
||||||
|
* @author Rodrigo Damazio
|
||||||
|
*/
|
||||||
|
public class MapActivity extends com.google.android.maps.MapActivity
|
||||||
|
implements View.OnTouchListener, View.OnClickListener,
|
||||||
|
TrackDataListener {
|
||||||
|
|
||||||
|
// Saved instance state keys:
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
|
private static final String KEY_CURRENT_LOCATION = "currentLocation";
|
||||||
|
private static final String KEY_KEEP_MY_LOCATION_VISIBLE = "keepMyLocationVisible";
|
||||||
|
|
||||||
|
private TrackDataHub dataHub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* True if the map should be scrolled so that the pointer is always in the
|
||||||
|
* visible area.
|
||||||
|
*/
|
||||||
|
private boolean keepMyLocationVisible;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The current pointer location.
|
||||||
|
* This is kept to quickly center on it when the user requests.
|
||||||
|
*/
|
||||||
|
private Location currentLocation;
|
||||||
|
|
||||||
|
// UI elements:
|
||||||
|
// -------------
|
||||||
|
|
||||||
|
private RelativeLayout screen;
|
||||||
|
private MapView mapView;
|
||||||
|
private MapOverlay mapOverlay;
|
||||||
|
private LinearLayout messagePane;
|
||||||
|
private TextView messageText;
|
||||||
|
private LinearLayout busyPane;
|
||||||
|
private ImageButton optionsBtn;
|
||||||
|
|
||||||
|
private MenuItem myLocation;
|
||||||
|
private MenuItem toggleLayers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We are not displaying driving directions. Just an arbitrary track that is
|
||||||
|
* not associated to any licensed mapping data. Therefore it should be okay to
|
||||||
|
* return false here and still comply with the terms of service.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected boolean isRouteDisplayed() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We are displaying a location. This needs to return true in order to comply
|
||||||
|
* with the terms of service.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected boolean isLocationDisplayed() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Application life cycle:
|
||||||
|
// ------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle bundle) {
|
||||||
|
Log.d(TAG, "MapActivity.onCreate");
|
||||||
|
super.onCreate(bundle);
|
||||||
|
|
||||||
|
// The volume we want to control is the Text-To-Speech volume
|
||||||
|
int volumeStream =
|
||||||
|
new StatusAnnouncerFactory(ApiFeatures.getInstance()).getVolumeStream();
|
||||||
|
setVolumeControlStream(volumeStream);
|
||||||
|
|
||||||
|
// We don't need a window title bar:
|
||||||
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
|
|
||||||
|
// Inflate the layout:
|
||||||
|
setContentView(R.layout.mytracks_layout);
|
||||||
|
|
||||||
|
// Remove the window's background because the MapView will obscure it
|
||||||
|
getWindow().setBackgroundDrawable(null);
|
||||||
|
|
||||||
|
// Set up a map overlay:
|
||||||
|
screen = (RelativeLayout) findViewById(R.id.screen);
|
||||||
|
mapView = (MapView) findViewById(R.id.map);
|
||||||
|
mapView.requestFocus();
|
||||||
|
mapOverlay = new MapOverlay(this);
|
||||||
|
mapView.getOverlays().add(mapOverlay);
|
||||||
|
mapView.setOnTouchListener(this);
|
||||||
|
mapView.setBuiltInZoomControls(true);
|
||||||
|
messagePane = (LinearLayout) findViewById(R.id.messagepane);
|
||||||
|
messageText = (TextView) findViewById(R.id.messagetext);
|
||||||
|
busyPane = (LinearLayout) findViewById(R.id.busypane);
|
||||||
|
optionsBtn = (ImageButton) findViewById(R.id.showOptions);
|
||||||
|
|
||||||
|
optionsBtn.setOnCreateContextMenuListener(contextMenuListener);
|
||||||
|
optionsBtn.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onRestoreInstanceState(Bundle bundle) {
|
||||||
|
Log.d(TAG, "MapActivity.onRestoreInstanceState");
|
||||||
|
if (bundle != null) {
|
||||||
|
super.onRestoreInstanceState(bundle);
|
||||||
|
keepMyLocationVisible =
|
||||||
|
bundle.getBoolean(KEY_KEEP_MY_LOCATION_VISIBLE, false);
|
||||||
|
if (bundle.containsKey(KEY_CURRENT_LOCATION)) {
|
||||||
|
currentLocation = (Location) bundle.getParcelable(KEY_CURRENT_LOCATION);
|
||||||
|
if (currentLocation != null) {
|
||||||
|
showCurrentLocation();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentLocation = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
Log.d(TAG, "MapActivity.onResume");
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
dataHub = ((MyTracksApplication) getApplication()).getTrackDataHub();
|
||||||
|
dataHub.registerTrackDataListener(this, EnumSet.of(
|
||||||
|
ListenerDataType.SELECTED_TRACK_CHANGED,
|
||||||
|
ListenerDataType.POINT_UPDATES,
|
||||||
|
ListenerDataType.WAYPOINT_UPDATES,
|
||||||
|
ListenerDataType.LOCATION_UPDATES,
|
||||||
|
ListenerDataType.COMPASS_UPDATES));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
|
Log.d(TAG, "MapActivity.onSaveInstanceState");
|
||||||
|
outState.putBoolean(KEY_KEEP_MY_LOCATION_VISIBLE, keepMyLocationVisible);
|
||||||
|
if (currentLocation != null) {
|
||||||
|
outState.putParcelable(KEY_CURRENT_LOCATION, currentLocation);
|
||||||
|
}
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
Log.d(TAG, "MapActivity.onPause");
|
||||||
|
|
||||||
|
dataHub.unregisterTrackDataListener(this);
|
||||||
|
dataHub = null;
|
||||||
|
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utility functions:
|
||||||
|
// -------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the options button if a track is selected, or hide it if not.
|
||||||
|
*/
|
||||||
|
private void updateOptionsButton(boolean trackSelected) {
|
||||||
|
optionsBtn.setVisibility(
|
||||||
|
trackSelected ? View.VISIBLE : View.INVISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests if a location is visible.
|
||||||
|
*
|
||||||
|
* @param location a given location
|
||||||
|
* @return true if the given location is within the visible map area
|
||||||
|
*/
|
||||||
|
private boolean locationIsVisible(Location location) {
|
||||||
|
if (location == null || mapView == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
GeoPoint center = mapView.getMapCenter();
|
||||||
|
int latSpan = mapView.getLatitudeSpan();
|
||||||
|
int lonSpan = mapView.getLongitudeSpan();
|
||||||
|
|
||||||
|
// Bottom of map view is obscured by zoom controls/buttons.
|
||||||
|
// Subtract a margin from the visible area:
|
||||||
|
GeoPoint marginBottom = mapView.getProjection().fromPixels(
|
||||||
|
0, mapView.getHeight());
|
||||||
|
GeoPoint marginTop = mapView.getProjection().fromPixels(0,
|
||||||
|
mapView.getHeight()
|
||||||
|
- mapView.getZoomButtonsController().getZoomControls().getHeight());
|
||||||
|
int margin =
|
||||||
|
Math.abs(marginTop.getLatitudeE6() - marginBottom.getLatitudeE6());
|
||||||
|
GeoRect r = new GeoRect(center, latSpan, lonSpan);
|
||||||
|
r.top += margin;
|
||||||
|
|
||||||
|
GeoPoint geoPoint = LocationUtils.getGeoPoint(location);
|
||||||
|
return r.contains(geoPoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Moves the location pointer to the current location and center the map if
|
||||||
|
* the current location is outside the visible area.
|
||||||
|
*/
|
||||||
|
private void showCurrentLocation() {
|
||||||
|
if (mapOverlay == null || mapView == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mapOverlay.setMyLocation(currentLocation);
|
||||||
|
mapView.postInvalidate();
|
||||||
|
|
||||||
|
if (currentLocation != null && keepMyLocationVisible && !locationIsVisible(currentLocation)) {
|
||||||
|
GeoPoint geoPoint = LocationUtils.getGeoPoint(currentLocation);
|
||||||
|
MapController controller = mapView.getController();
|
||||||
|
controller.animateTo(geoPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTrackUpdated(Track track) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zooms and pans the map so that the given track is visible.
|
||||||
|
*
|
||||||
|
* @param track the track
|
||||||
|
*/
|
||||||
|
private void zoomMapToBoundaries(Track track) {
|
||||||
|
if (mapView == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (track == null || track.getNumberOfPoints() < 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TripStatistics stats = track.getStatistics();
|
||||||
|
int bottom = stats.getBottom();
|
||||||
|
int left = stats.getLeft();
|
||||||
|
int latSpanE6 = stats.getTop() - bottom;
|
||||||
|
int lonSpanE6 = stats.getRight() - left;
|
||||||
|
if (latSpanE6 > 0
|
||||||
|
&& latSpanE6 < 180E6
|
||||||
|
&& lonSpanE6 > 0
|
||||||
|
&& lonSpanE6 < 360E6) {
|
||||||
|
keepMyLocationVisible = false;
|
||||||
|
GeoPoint center = new GeoPoint(
|
||||||
|
bottom + latSpanE6 / 2,
|
||||||
|
left + lonSpanE6 / 2);
|
||||||
|
if (LocationUtils.isValidGeoPoint(center)) {
|
||||||
|
mapView.getController().setCenter(center);
|
||||||
|
mapView.getController().zoomToSpan(latSpanE6, lonSpanE6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zooms and pans the map so that the given waypoint is visible.
|
||||||
|
*/
|
||||||
|
public void showWaypoint(long waypointId) {
|
||||||
|
MyTracksProviderUtils providerUtils = MyTracksProviderUtils.Factory.get(this);
|
||||||
|
Waypoint wpt = providerUtils.getWaypoint(waypointId);
|
||||||
|
if (wpt != null && wpt.getLocation() != null) {
|
||||||
|
keepMyLocationVisible = false;
|
||||||
|
GeoPoint center = new GeoPoint(
|
||||||
|
(int) (wpt.getLocation().getLatitude() * 1E6),
|
||||||
|
(int) (wpt.getLocation().getLongitude() * 1E6));
|
||||||
|
mapView.getController().setCenter(center);
|
||||||
|
mapView.getController().setZoom(20);
|
||||||
|
mapView.invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelectedTrackChanged(final Track track, final boolean isRecording) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
boolean trackSelected = track != null;
|
||||||
|
updateOptionsButton(trackSelected);
|
||||||
|
|
||||||
|
mapOverlay.setTrackDrawingEnabled(trackSelected);
|
||||||
|
|
||||||
|
if (trackSelected) {
|
||||||
|
busyPane.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
zoomMapToBoundaries(track);
|
||||||
|
|
||||||
|
mapOverlay.setShowEndMarker(!isRecording);
|
||||||
|
busyPane.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
mapView.invalidate();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private final OnCreateContextMenuListener contextMenuListener =
|
||||||
|
new OnCreateContextMenuListener() {
|
||||||
|
@Override
|
||||||
|
public void onCreateContextMenu(ContextMenu menu, View v,
|
||||||
|
ContextMenuInfo menuInfo) {
|
||||||
|
menu.setHeaderTitle(R.string.tracklist_this_track);
|
||||||
|
menu.add(0, Constants.MENU_EDIT, 0,
|
||||||
|
R.string.tracklist_edit_track);
|
||||||
|
if (!dataHub.isRecordingSelected()) {
|
||||||
|
menu.add(0, Constants.MENU_SEND_TO_GOOGLE, 0,
|
||||||
|
R.string.tracklist_send_to_google);
|
||||||
|
SubMenu share = menu.addSubMenu(0, Constants.MENU_SHARE, 0,
|
||||||
|
R.string.tracklist_share_track);
|
||||||
|
share.add(0, Constants.MENU_SHARE_LINK, 0,
|
||||||
|
R.string.tracklist_share_link);
|
||||||
|
share.add(0, Constants.MENU_SHARE_GPX_FILE, 0,
|
||||||
|
R.string.tracklist_share_gpx_file);
|
||||||
|
share.add(0, Constants.MENU_SHARE_KML_FILE, 0,
|
||||||
|
R.string.tracklist_share_kml_file);
|
||||||
|
share.add(0, Constants.MENU_SHARE_CSV_FILE, 0,
|
||||||
|
R.string.tracklist_share_csv_file);
|
||||||
|
share.add(0, Constants.MENU_SHARE_TCX_FILE, 0,
|
||||||
|
R.string.tracklist_share_tcx_file);
|
||||||
|
SubMenu save = menu.addSubMenu(0,
|
||||||
|
Constants.MENU_WRITE_TO_SD_CARD, 0,
|
||||||
|
R.string.tracklist_write_to_sd);
|
||||||
|
save.add(0, Constants.MENU_SAVE_GPX_FILE, 0,
|
||||||
|
R.string.tracklist_save_as_gpx);
|
||||||
|
save.add(0, Constants.MENU_SAVE_KML_FILE, 0,
|
||||||
|
R.string.tracklist_save_as_kml);
|
||||||
|
save.add(0, Constants.MENU_SAVE_CSV_FILE, 0,
|
||||||
|
R.string.tracklist_save_as_csv);
|
||||||
|
save.add(0, Constants.MENU_SAVE_TCX_FILE, 0,
|
||||||
|
R.string.tracklist_save_as_tcx);
|
||||||
|
menu.add(0, Constants.MENU_CLEAR_MAP, 0,
|
||||||
|
R.string.tracklist_clear_map);
|
||||||
|
menu.add(0, Constants.MENU_DELETE, 0,
|
||||||
|
R.string.tracklist_delete_track);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
||||||
|
switch (item.getItemId()) {
|
||||||
|
case Constants.MENU_SEND_TO_GOOGLE:
|
||||||
|
SendActivity.sendToGoogle(this, dataHub.getSelectedTrackId(), false);
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_SHARE_LINK:
|
||||||
|
SendActivity.sendToGoogle(this, dataHub.getSelectedTrackId(), true);
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_SAVE_GPX_FILE:
|
||||||
|
case Constants.MENU_SAVE_KML_FILE:
|
||||||
|
case Constants.MENU_SAVE_CSV_FILE:
|
||||||
|
case Constants.MENU_SAVE_TCX_FILE:
|
||||||
|
case Constants.MENU_SHARE_GPX_FILE:
|
||||||
|
case Constants.MENU_SHARE_KML_FILE:
|
||||||
|
case Constants.MENU_SHARE_CSV_FILE:
|
||||||
|
case Constants.MENU_SHARE_TCX_FILE:
|
||||||
|
SaveActivity.handleExportTrackAction(this, dataHub.getSelectedTrackId(),
|
||||||
|
Constants.getActionFromMenuId(item.getItemId()));
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_EDIT: {
|
||||||
|
Intent intent = new Intent(this, TrackDetails.class);
|
||||||
|
// TODO: Pass in a content URI
|
||||||
|
intent.putExtra("trackid", dataHub.getSelectedTrackId());
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case Constants.MENU_DELETE: {
|
||||||
|
Uri uri = ContentUris.withAppendedId(
|
||||||
|
TracksColumns.CONTENT_URI, dataHub.getSelectedTrackId());
|
||||||
|
Intent intent = new Intent(Intent.ACTION_DELETE, uri);
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case Constants.MENU_CLEAR_MAP:
|
||||||
|
dataHub.unloadCurrentTrack();
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return super.onMenuItemSelected(featureId, item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
super.onCreateOptionsMenu(menu);
|
||||||
|
myLocation = menu.add(0, Constants.MENU_MY_LOCATION, 0,
|
||||||
|
R.string.mylocation);
|
||||||
|
myLocation.setIcon(android.R.drawable.ic_menu_mylocation);
|
||||||
|
toggleLayers = menu.add(0, Constants.MENU_TOGGLE_LAYERS, 0,
|
||||||
|
R.string.switch_to_sat);
|
||||||
|
toggleLayers.setIcon(android.R.drawable.ic_menu_mapmode);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
|
toggleLayers.setTitle(mapView.isSatellite() ?
|
||||||
|
R.string.switch_to_map : R.string.switch_to_sat);
|
||||||
|
return super.onPrepareOptionsMenu(menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
|
switch (item.getItemId()) {
|
||||||
|
case Constants.MENU_MY_LOCATION: {
|
||||||
|
dataHub.forceUpdateLocation();
|
||||||
|
keepMyLocationVisible = true;
|
||||||
|
if (mapView.getZoomLevel() < 18) {
|
||||||
|
mapView.getController().setZoom(18);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case Constants.MENU_TOGGLE_LAYERS: {
|
||||||
|
mapView.setSatellite(!mapView.isSatellite());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.onOptionsItemSelected(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (v == messagePane) {
|
||||||
|
startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));
|
||||||
|
} else if (v == optionsBtn) {
|
||||||
|
optionsBtn.performLongClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We want the pointer to become visible again in case of the next location
|
||||||
|
* update:
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View view, MotionEvent event) {
|
||||||
|
if (keepMyLocationVisible && event.getAction() == MotionEvent.ACTION_MOVE) {
|
||||||
|
if (!locationIsVisible(currentLocation)) {
|
||||||
|
keepMyLocationVisible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProviderStateChange(ProviderState state) {
|
||||||
|
final int messageId;
|
||||||
|
final boolean isGpsDisabled;
|
||||||
|
switch (state) {
|
||||||
|
case DISABLED:
|
||||||
|
messageId = R.string.status_enable_gps;
|
||||||
|
isGpsDisabled = true;
|
||||||
|
break;
|
||||||
|
case NO_FIX:
|
||||||
|
case BAD_FIX:
|
||||||
|
messageId = R.string.wait_for_fix;
|
||||||
|
isGpsDisabled = false;
|
||||||
|
break;
|
||||||
|
case GOOD_FIX:
|
||||||
|
// Nothing to show.
|
||||||
|
messageId = -1;
|
||||||
|
isGpsDisabled = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new IllegalArgumentException("Unexpected state: " + state);
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (messageId != -1) {
|
||||||
|
messageText.setText(messageId);
|
||||||
|
messagePane.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
if (isGpsDisabled) {
|
||||||
|
// Give a warning about this state.
|
||||||
|
Toast.makeText(MapActivity.this,
|
||||||
|
R.string.error_no_gps_location_provider,
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
|
// Make clicking take the user to the location settings.
|
||||||
|
messagePane.setOnClickListener(MapActivity.this);
|
||||||
|
} else {
|
||||||
|
messagePane.setOnClickListener(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
messagePane.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
screen.requestLayout();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCurrentLocationChanged(Location location) {
|
||||||
|
currentLocation = location;
|
||||||
|
showCurrentLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCurrentHeadingChanged(double heading) {
|
||||||
|
synchronized (this) {
|
||||||
|
if (mapOverlay.setHeading((float) heading)) {
|
||||||
|
mapView.postInvalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearWaypoints() {
|
||||||
|
mapOverlay.clearWaypoints();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewWaypoint(Waypoint waypoint) {
|
||||||
|
if (LocationUtils.isValidLocation(waypoint.getLocation())) {
|
||||||
|
// TODO: Optimize locking inside addWaypoint
|
||||||
|
mapOverlay.addWaypoint(waypoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewWaypointsDone() {
|
||||||
|
mapView.postInvalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearTrackPoints() {
|
||||||
|
mapOverlay.clearPoints();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewTrackPoint(Location loc) {
|
||||||
|
mapOverlay.addLocation(loc);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSegmentSplit() {
|
||||||
|
mapOverlay.addSegmentSplit();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSampledOutTrackPoint(Location loc) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewTrackPointsDone() {
|
||||||
|
mapView.postInvalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onUnitsChanged(boolean metric) {
|
||||||
|
// We don't care.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onReportSpeedChanged(boolean reportSpeed) {
|
||||||
|
// We don't care.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
+137
-118
@@ -15,8 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.Waypoint;
|
import com.google.android.apps.mytracks.content.Waypoint;
|
||||||
import com.google.android.apps.mytracks.util.MyTracksUtils;
|
import com.google.android.apps.mytracks.maps.TrackPathPainter;
|
||||||
|
import com.google.android.apps.mytracks.maps.TrackPathPainterFactory;
|
||||||
|
import com.google.android.apps.mytracks.maps.TrackPathUtilities;
|
||||||
|
import com.google.android.apps.mytracks.util.LocationUtils;
|
||||||
import com.google.android.maps.GeoPoint;
|
import com.google.android.maps.GeoPoint;
|
||||||
import com.google.android.maps.MapView;
|
import com.google.android.maps.MapView;
|
||||||
import com.google.android.maps.Overlay;
|
import com.google.android.maps.Overlay;
|
||||||
@@ -25,14 +30,16 @@ import com.google.android.maps.mytracks.R;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.Path;
|
|
||||||
import android.graphics.Point;
|
import android.graphics.Point;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -45,7 +52,7 @@ import java.util.concurrent.BlockingQueue;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksOverlay extends Overlay {
|
public class MapOverlay extends Overlay implements OnSharedPreferenceChangeListener {
|
||||||
|
|
||||||
private final Drawable[] arrows;
|
private final Drawable[] arrows;
|
||||||
private final int arrowWidth, arrowHeight;
|
private final int arrowWidth, arrowHeight;
|
||||||
@@ -54,7 +61,6 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
private final Drawable startMarker;
|
private final Drawable startMarker;
|
||||||
private final Drawable endMarker;
|
private final Drawable endMarker;
|
||||||
private final int markerWidth, markerHeight;
|
private final int markerWidth, markerHeight;
|
||||||
private final Paint selectedTrackPaint;
|
|
||||||
private final Paint errorCirclePaint;
|
private final Paint errorCirclePaint;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final List<Waypoint> waypoints;
|
private final List<Waypoint> waypoints;
|
||||||
@@ -70,29 +76,45 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
|
|
||||||
private GeoPoint lastReferencePoint;
|
private GeoPoint lastReferencePoint;
|
||||||
private Rect lastViewRect;
|
private Rect lastViewRect;
|
||||||
private Path lastPath;
|
private boolean lastPathExists;
|
||||||
|
private Location lastLocation;
|
||||||
|
private TrackPathPainter trackPathPainter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a pre-processed {@code Location} to speed up drawing.
|
* Represents a pre-processed {@code Location} to speed up drawing.
|
||||||
* This class is more like a data object and doesn't provide accessors.
|
* This class is more like a data object and doesn't provide accessors.
|
||||||
*/
|
*/
|
||||||
private static class CachedLocation {
|
public static class CachedLocation {
|
||||||
public final boolean valid;
|
public final boolean valid;
|
||||||
public final GeoPoint geoPoint;
|
public final GeoPoint geoPoint;
|
||||||
|
public final int speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for an invalid cached location.
|
||||||
|
*/
|
||||||
|
public CachedLocation() {
|
||||||
|
this.valid = false;
|
||||||
|
this.geoPoint = null;
|
||||||
|
this.speed = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for a potentially valid cached location.
|
||||||
|
*/
|
||||||
public CachedLocation(Location location) {
|
public CachedLocation(Location location) {
|
||||||
this.valid = MyTracksUtils.isValidLocation(location);
|
this.valid = LocationUtils.isValidLocation(location);
|
||||||
this.geoPoint = valid ? MyTracksUtils.getGeoPoint(location) : null;
|
this.geoPoint = valid ? LocationUtils.getGeoPoint(location) : null;
|
||||||
|
this.speed = (int) Math.floor(location.getSpeed() * 3.6);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public MyTracksOverlay(Context context) {
|
public MapOverlay(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
|
||||||
this.waypoints = new ArrayList<Waypoint>();
|
this.waypoints = new ArrayList<Waypoint>();
|
||||||
this.points = new ArrayList<CachedLocation>(1024);
|
this.points = new ArrayList<CachedLocation>(1024);
|
||||||
this.pendingPoints = new ArrayBlockingQueue<CachedLocation>(
|
this.pendingPoints = new ArrayBlockingQueue<CachedLocation>(
|
||||||
MyTracksConstants.MAX_DISPLAYED_TRACK_POINTS, true);
|
Constants.MAX_DISPLAYED_TRACK_POINTS, true);
|
||||||
|
|
||||||
// TODO: Can we use a FrameAnimation or similar here rather
|
// TODO: Can we use a FrameAnimation or similar here rather
|
||||||
// than individual resources for each arrow direction?
|
// than individual resources for each arrow direction?
|
||||||
@@ -137,23 +159,18 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
waypointMarker = resources.getDrawable(R.drawable.blue_pushpin);
|
waypointMarker = resources.getDrawable(R.drawable.blue_pushpin);
|
||||||
waypointMarker.setBounds(0, 0, markerWidth, markerHeight);
|
waypointMarker.setBounds(0, 0, markerWidth, markerHeight);
|
||||||
|
|
||||||
selectedTrackPaint = new Paint();
|
errorCirclePaint = TrackPathUtilities.getPaint(R.color.blue, context);
|
||||||
selectedTrackPaint.setColor(resources.getColor(R.color.red));
|
|
||||||
selectedTrackPaint.setStrokeWidth(3);
|
|
||||||
selectedTrackPaint.setStyle(Paint.Style.STROKE);
|
|
||||||
selectedTrackPaint.setAntiAlias(true);
|
|
||||||
|
|
||||||
errorCirclePaint = new Paint();
|
|
||||||
errorCirclePaint.setColor(resources.getColor(R.color.blue));
|
|
||||||
errorCirclePaint.setStyle(Paint.Style.STROKE);
|
|
||||||
errorCirclePaint.setStrokeWidth(3);
|
|
||||||
errorCirclePaint.setAlpha(127);
|
errorCirclePaint.setAlpha(127);
|
||||||
errorCirclePaint.setAntiAlias(true);
|
|
||||||
|
trackPathPainter = TrackPathPainterFactory.getTrackPathPainter(context);
|
||||||
|
|
||||||
|
context.getSharedPreferences(Constants.SETTINGS_NAME, 0)
|
||||||
|
.registerOnSharedPreferenceChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a location to the map overlay.
|
* Add a location to the map overlay.
|
||||||
*
|
*
|
||||||
* NOTE: This method doesn't take ownership of the given location, so it is
|
* NOTE: This method doesn't take ownership of the given location, so it is
|
||||||
* safe to reuse the same location while calling this method.
|
* safe to reuse the same location while calling this method.
|
||||||
*
|
*
|
||||||
@@ -161,7 +178,18 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
*/
|
*/
|
||||||
public void addLocation(Location l) {
|
public void addLocation(Location l) {
|
||||||
// Queue up in the pending queue until it's merged with {@code #points}.
|
// Queue up in the pending queue until it's merged with {@code #points}.
|
||||||
pendingPoints.offer(new CachedLocation(l));
|
if (!pendingPoints.offer(new CachedLocation(l))) {
|
||||||
|
Log.e(TAG, "Unable to add pending points");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a segment split to the map overlay.
|
||||||
|
*/
|
||||||
|
public void addSegmentSplit() {
|
||||||
|
if (!pendingPoints.offer(new CachedLocation())) {
|
||||||
|
Log.e(TAG, "Unable to add pending points");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addWaypoint(Waypoint wpt) {
|
public void addWaypoint(Waypoint wpt) {
|
||||||
@@ -172,7 +200,7 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumLocations() {
|
public int getNumLocations() {
|
||||||
synchronized (points) {
|
synchronized (points) {
|
||||||
return points.size() + pendingPoints.size();
|
return points.size() + pendingPoints.size();
|
||||||
@@ -180,18 +208,19 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Visible for testing.
|
// Visible for testing.
|
||||||
int getNumWaypoints() {
|
public int getNumWaypoints() {
|
||||||
synchronized (waypoints) {
|
synchronized (waypoints) {
|
||||||
return waypoints.size();
|
return waypoints.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clearPoints() {
|
public void clearPoints() {
|
||||||
synchronized (points) {
|
synchronized (getPoints()) {
|
||||||
points.clear();
|
getPoints().clear();
|
||||||
pendingPoints.clear();
|
pendingPoints.clear();
|
||||||
lastPath = null;
|
lastPathExists = false;
|
||||||
lastViewRect = null;
|
lastViewRect = null;
|
||||||
|
trackPathPainter.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,13 +246,21 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
|
|
||||||
// It's safe to keep projection within a single draw operation.
|
// It's safe to keep projection within a single draw operation.
|
||||||
final Projection projection = getMapProjection(mapView);
|
final Projection projection = getMapProjection(mapView);
|
||||||
|
if (projection == null) {
|
||||||
|
Log.w(TAG, "No projection, unable to draw");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the current viewing window.
|
// Get the current viewing window.
|
||||||
if (trackDrawingEnabled) {
|
if (trackDrawingEnabled) {
|
||||||
Rect viewRect = getMapViewRect(mapView);
|
Rect viewRect = getMapViewRect(mapView);
|
||||||
|
|
||||||
// Draw the selected track:
|
// Draw the selected track:
|
||||||
drawTrack(canvas, projection, viewRect);
|
drawTrack(canvas, projection, viewRect);
|
||||||
|
|
||||||
|
// Draw the "Start" and "End" markers:
|
||||||
|
drawMarkers(canvas, projection);
|
||||||
|
|
||||||
// Draw the waypoints:
|
// Draw the waypoints:
|
||||||
drawWaypoints(canvas, projection);
|
drawWaypoints(canvas, projection);
|
||||||
}
|
}
|
||||||
@@ -231,12 +268,34 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
// Draw the current location
|
// Draw the current location
|
||||||
drawMyLocation(canvas, projection);
|
drawMyLocation(canvas, projection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void drawMarkers(Canvas canvas, Projection projection) {
|
||||||
|
// Draw the "End" marker.
|
||||||
|
if (showEndMarker) {
|
||||||
|
for (int i = getPoints().size() - 1; i >= 0; --i) {
|
||||||
|
if (getPoints().get(i).valid) {
|
||||||
|
drawElement(canvas, projection, getPoints().get(i).geoPoint, endMarker,
|
||||||
|
-markerWidth / 2, -markerHeight);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the "Start" marker.
|
||||||
|
for (int i = 0; i < getPoints().size(); ++i) {
|
||||||
|
if (getPoints().get(i).valid) {
|
||||||
|
drawElement(canvas, projection, getPoints().get(i).geoPoint, startMarker,
|
||||||
|
-markerWidth / 2, -markerHeight);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Visible for testing.
|
// Visible for testing.
|
||||||
Projection getMapProjection(MapView mapView) {
|
Projection getMapProjection(MapView mapView) {
|
||||||
return mapView.getProjection();
|
return mapView.getProjection();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visible for testing.
|
// Visible for testing.
|
||||||
Rect getMapViewRect(MapView mapView) {
|
Rect getMapViewRect(MapView mapView) {
|
||||||
int w = mapView.getLongitudeSpan();
|
int w = mapView.getLongitudeSpan();
|
||||||
@@ -245,22 +304,22 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
int cy = mapView.getMapCenter().getLatitudeE6();
|
int cy = mapView.getMapCenter().getLatitudeE6();
|
||||||
return new Rect(cx - w / 2, cy - h / 2, cx + w / 2, cy + h / 2);
|
return new Rect(cx - w / 2, cy - h / 2, cx + w / 2, cy + h / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visible for testing.
|
// For use in testing only.
|
||||||
Path newPath() {
|
public TrackPathPainter getTrackPathPainter() {
|
||||||
return new Path();
|
return trackPathPainter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visible for testing.
|
// For use in testing only.
|
||||||
Path getLastPath() {
|
public void setTrackPathPainter(TrackPathPainter trackPathPainter) {
|
||||||
return lastPath;
|
this.trackPathPainter = trackPathPainter;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawWaypoints(Canvas canvas, Projection projection) {
|
private void drawWaypoints(Canvas canvas, Projection projection) {
|
||||||
synchronized (waypoints) {;
|
synchronized (waypoints) {;
|
||||||
for (Waypoint wpt : waypoints) {
|
for (Waypoint wpt : waypoints) {
|
||||||
Location loc = wpt.getLocation();
|
Location loc = wpt.getLocation();
|
||||||
drawElement(canvas, projection, MyTracksUtils.getGeoPoint(loc),
|
drawElement(canvas, projection, LocationUtils.getGeoPoint(loc),
|
||||||
wpt.getType() == Waypoint.TYPE_STATISTICS ? statsMarker
|
wpt.getType() == Waypoint.TYPE_STATISTICS ? statsMarker
|
||||||
: waypointMarker, -(markerWidth / 2) + 3, -markerHeight);
|
: waypointMarker, -(markerWidth / 2) + 3, -markerHeight);
|
||||||
}
|
}
|
||||||
@@ -274,106 +333,49 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Point pt = drawElement(canvas, projection,
|
Point pt = drawElement(canvas, projection,
|
||||||
MyTracksUtils.getGeoPoint(myLocation), arrows[lastHeading],
|
LocationUtils.getGeoPoint(myLocation), arrows[lastHeading],
|
||||||
-(arrowWidth / 2) + 3, -(arrowHeight / 2));
|
-(arrowWidth / 2) + 3, -(arrowHeight / 2));
|
||||||
// Draw the error circle.
|
// Draw the error circle.
|
||||||
float radius = projection.metersToEquatorPixels(myLocation.getAccuracy());
|
float radius = projection.metersToEquatorPixels(myLocation.getAccuracy());
|
||||||
canvas.drawCircle(pt.x, pt.y, radius, errorCirclePaint);
|
canvas.drawCircle(pt.x, pt.y, radius, errorCirclePaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawTrack(Canvas canvas, Projection projection, Rect viewRect) {
|
private void drawTrack(Canvas canvas, Projection projection, Rect viewRect)
|
||||||
Path path;
|
{
|
||||||
|
boolean draw;
|
||||||
|
|
||||||
synchronized (points) {
|
synchronized (points) {
|
||||||
// Merge the pending points with the list of cached locations.
|
// Merge the pending points with the list of cached locations.
|
||||||
final GeoPoint referencePoint = projection.fromPixels(0, 0);
|
final GeoPoint referencePoint = projection.fromPixels(0, 0);
|
||||||
int newPoints = pendingPoints.drainTo(points);
|
int newPoints = pendingPoints.drainTo(points);
|
||||||
boolean newProjection = !viewRect.equals(lastViewRect) ||
|
boolean newProjection = !viewRect.equals(lastViewRect) ||
|
||||||
!referencePoint.equals(lastReferencePoint);
|
!referencePoint.equals(lastReferencePoint);
|
||||||
if (newPoints == 0 && lastPath != null && !newProjection) {
|
if (newPoints == 0 && lastPathExists && !newProjection) {
|
||||||
// No need to recreate path (same points and viewing area).
|
// No need to recreate path (same points and viewing area).
|
||||||
path = lastPath;
|
draw = true;
|
||||||
} else {
|
} else {
|
||||||
int numPoints = points.size();
|
int numPoints = points.size();
|
||||||
if (numPoints < 2) {
|
if (numPoints < 2) {
|
||||||
// Not enough points to draw a path.
|
// Not enough points to draw a path.
|
||||||
path = null;
|
draw = false;
|
||||||
} else if (lastPath != null && !newProjection) {
|
} else if (!trackPathPainter.needsRedraw() && lastPathExists && !newProjection) {
|
||||||
// Incremental update of the path, without repositioning the view.
|
// Incremental update of the path, without repositioning the view.
|
||||||
path = lastPath;
|
draw = true;
|
||||||
updatePath(projection, viewRect, path, numPoints - newPoints);
|
trackPathPainter.updatePath(projection, viewRect, numPoints - newPoints, alwaysVisible, points);
|
||||||
} else {
|
} else {
|
||||||
// The view has changed so we have to start from scratch.
|
// The view has changed so we have to start from scratch.
|
||||||
path = newPath();
|
draw = true;
|
||||||
path.incReserve(numPoints);
|
trackPathPainter.updatePath(projection, viewRect, 0, alwaysVisible, points);
|
||||||
updatePath(projection, viewRect, path, 0);
|
|
||||||
}
|
}
|
||||||
lastPath = path;
|
|
||||||
}
|
}
|
||||||
lastReferencePoint = referencePoint;
|
lastReferencePoint = referencePoint;
|
||||||
lastViewRect = viewRect;
|
lastViewRect = viewRect;
|
||||||
}
|
}
|
||||||
if (path != null) {
|
if (draw) {
|
||||||
canvas.drawPath(path, selectedTrackPaint);
|
trackPathPainter.drawTrack(canvas);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Draw the "End" marker.
|
|
||||||
if (showEndMarker) {
|
|
||||||
for (int i = points.size() - 1; i >= 0; --i) {
|
|
||||||
if (points.get(i).valid) {
|
|
||||||
drawElement(canvas, projection, points.get(i).geoPoint, endMarker,
|
|
||||||
-markerWidth / 2, -markerHeight);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Draw the "Start" marker.
|
|
||||||
for (int i = 0; i < points.size(); ++i) {
|
|
||||||
if (points.get(i).valid) {
|
|
||||||
drawElement(canvas, projection, points.get(i).geoPoint, startMarker,
|
|
||||||
-markerWidth / 2, -markerHeight);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updatePath(Projection projection, Rect viewRect, Path path,
|
|
||||||
int startLocationIdx) {
|
|
||||||
// Whether to start a new segment on new valid and visible point.
|
|
||||||
boolean newSegment =
|
|
||||||
startLocationIdx > 0 ? !points.get(startLocationIdx - 1).valid : true;
|
|
||||||
boolean lastVisible = !newSegment;
|
|
||||||
final Point pt = new Point();
|
|
||||||
// Loop over track points.
|
|
||||||
for (int i = startLocationIdx; i < points.size(); ++i) {
|
|
||||||
CachedLocation loc = points.get(i);
|
|
||||||
// Check if valid, if not then indicate a new segment.
|
|
||||||
if (!loc.valid) {
|
|
||||||
newSegment = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
final GeoPoint geoPoint = loc.geoPoint;
|
|
||||||
// Check if this breaks the existing segment.
|
|
||||||
boolean visible = alwaysVisible || viewRect.contains(
|
|
||||||
geoPoint.getLongitudeE6(), geoPoint.getLatitudeE6());
|
|
||||||
if (!visible && !lastVisible) {
|
|
||||||
// This is a point outside view not connected to a visible one.
|
|
||||||
newSegment = true;
|
|
||||||
}
|
|
||||||
lastVisible = visible;
|
|
||||||
|
|
||||||
// Either move to beginning of a new segment or continue the old one.
|
|
||||||
projection.toPixels(geoPoint, pt);
|
|
||||||
if (newSegment) {
|
|
||||||
path.moveTo(pt.x, pt.y);
|
|
||||||
newSegment = false;
|
|
||||||
} else {
|
|
||||||
path.lineTo(pt.x, pt.y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Visible for testing.
|
// Visible for testing.
|
||||||
Point drawElement(Canvas canvas, Projection projection, GeoPoint geoPoint,
|
Point drawElement(Canvas canvas, Projection projection, GeoPoint geoPoint,
|
||||||
Drawable element, int offsetX, int offsetY) {
|
Drawable element, int offsetX, int offsetY) {
|
||||||
@@ -423,7 +425,7 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Location tapLocation = MyTracksUtils.getLocation(p);
|
final Location tapLocation = LocationUtils.getLocation(p);
|
||||||
double dmin = Double.MAX_VALUE;
|
double dmin = Double.MAX_VALUE;
|
||||||
Waypoint waypoint = null;
|
Waypoint waypoint = null;
|
||||||
synchronized (waypoints) {
|
synchronized (waypoints) {
|
||||||
@@ -442,11 +444,28 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
|
|
||||||
if (waypoint != null &&
|
if (waypoint != null &&
|
||||||
dmin < 15000000 / Math.pow(2, mapView.getZoomLevel())) {
|
dmin < 15000000 / Math.pow(2, mapView.getZoomLevel())) {
|
||||||
Intent intent = new Intent(context, MyTracksWaypointDetails.class);
|
Intent intent = new Intent(context, WaypointDetails.class);
|
||||||
intent.putExtra("waypointid", waypoint.getId());
|
intent.putExtra(WaypointDetails.WAYPOINT_ID_EXTRA, waypoint.getId());
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onTap(p, mapView);
|
return super.onTap(p, mapView);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the points
|
||||||
|
*/
|
||||||
|
public List<CachedLocation> getPoints() {
|
||||||
|
return points;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
|
Log.d(TAG, "MapOverlay: onSharedPreferences changed " + key);
|
||||||
|
if (key != null) {
|
||||||
|
if (key.equals(context.getString(R.string.track_color_mode_key))) {
|
||||||
|
trackPathPainter = TrackPathPainterFactory.getTrackPathPainter(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010 Google Inc.
|
* Copyright 2010 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -24,7 +24,7 @@ import android.view.MenuItem;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Manage the application menus.
|
* Manage the application menus.
|
||||||
*
|
*
|
||||||
* @author Sandor Dornbush
|
* @author Sandor Dornbush
|
||||||
*/
|
*/
|
||||||
class MenuManager {
|
class MenuManager {
|
||||||
@@ -34,7 +34,7 @@ class MenuManager {
|
|||||||
public MenuManager(MyTracks activity) {
|
public MenuManager(MyTracks activity) {
|
||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
activity.getMenuInflater().inflate(R.menu.main, menu);
|
activity.getMenuInflater().inflate(R.menu.main, menu);
|
||||||
return true;
|
return true;
|
||||||
@@ -52,7 +52,7 @@ class MenuManager {
|
|||||||
.setEnabled(isRecording)
|
.setEnabled(isRecording)
|
||||||
.setVisible(isRecording);
|
.setVisible(isRecording);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case R.id.menu_start_recording: {
|
case R.id.menu_start_recording: {
|
||||||
@@ -64,21 +64,21 @@ class MenuManager {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case R.id.menu_list_tracks: {
|
case R.id.menu_list_tracks: {
|
||||||
activity.startActivityForResult(new Intent(activity, MyTracksList.class),
|
activity.startActivityForResult(new Intent(activity, TrackList.class),
|
||||||
MyTracksConstants.SHOW_TRACK);
|
Constants.SHOW_TRACK);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case R.id.menu_list_markers: {
|
case R.id.menu_list_markers: {
|
||||||
Intent startIntent = new Intent(activity, MyTracksWaypointsList.class);
|
Intent startIntent = new Intent(activity, WaypointsList.class);
|
||||||
startIntent.putExtra("trackid", activity.getSelectedTrackId());
|
startIntent.putExtra("trackid", activity.getSelectedTrackId());
|
||||||
activity.startActivityForResult(startIntent, MyTracksConstants.SHOW_WAYPOINT);
|
activity.startActivityForResult(startIntent, Constants.SHOW_WAYPOINT);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case R.id.menu_sensor_state: {
|
case R.id.menu_sensor_state: {
|
||||||
return startActivity(SensorStateActivity.class);
|
return startActivity(SensorStateActivity.class);
|
||||||
}
|
}
|
||||||
case R.id.menu_settings: {
|
case R.id.menu_settings: {
|
||||||
return startActivity(MyTracksSettings.class);
|
return startActivity(SettingsActivity.class);
|
||||||
}
|
}
|
||||||
case R.id.menu_aggregated_stats: {
|
case R.id.menu_aggregated_stats: {
|
||||||
return startActivity(AggregatedStatsActivity.class);
|
return startActivity(AggregatedStatsActivity.class);
|
||||||
@@ -86,10 +86,6 @@ class MenuManager {
|
|||||||
case R.id.menu_help: {
|
case R.id.menu_help: {
|
||||||
return startActivity(WelcomeActivity.class);
|
return startActivity(WelcomeActivity.class);
|
||||||
}
|
}
|
||||||
case MyTracksConstants.MENU_CLEAR_MAP: {
|
|
||||||
activity.setSelectedTrackId(-1);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011 Google Inc.
|
* Copyright 2011 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -15,8 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.accounts.Account;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.io.AuthManager;
|
import com.google.android.apps.mytracks.io.AuthManager;
|
||||||
|
import com.google.android.apps.mytracks.io.AuthManager.AuthCallback;
|
||||||
import com.google.android.apps.mytracks.io.AuthManagerFactory;
|
import com.google.android.apps.mytracks.io.AuthManagerFactory;
|
||||||
import com.google.android.apps.mytracks.io.mymaps.MapsFacade;
|
import com.google.android.apps.mytracks.io.mymaps.MapsFacade;
|
||||||
import com.google.android.apps.mytracks.io.mymaps.MyMapsConstants;
|
import com.google.android.apps.mytracks.io.mymaps.MyMapsConstants;
|
||||||
@@ -25,11 +27,8 @@ import com.google.android.maps.mytracks.R;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.ContextMenu;
|
import android.util.Log;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnCreateContextMenuListener;
|
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.AdapterView.OnItemClickListener;
|
import android.widget.AdapterView.OnItemClickListener;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
@@ -42,29 +41,15 @@ import android.widget.TextView;
|
|||||||
* @author Rodrigo Damazio
|
* @author Rodrigo Damazio
|
||||||
*/
|
*/
|
||||||
public class MyMapsList extends Activity implements MapsFacade.MapsListCallback {
|
public class MyMapsList extends Activity implements MapsFacade.MapsListCallback {
|
||||||
private static final int MENU_OPEN = 0;
|
|
||||||
private static final int MENU_SHARE = 2;
|
|
||||||
private static final int GET_LOGIN = 1;
|
private static final int GET_LOGIN = 1;
|
||||||
|
|
||||||
|
public static final String EXTRA_ACCOUNT_NAME = "accountName";
|
||||||
|
public static final String EXTRA_ACCOUNT_TYPE = "accountType";
|
||||||
|
|
||||||
private MapsFacade mapsClient;
|
private MapsFacade mapsClient;
|
||||||
private AuthManager auth;
|
private AuthManager auth;
|
||||||
private MyMapsListAdapter listAdapter;
|
private MyMapsListAdapter listAdapter;
|
||||||
|
|
||||||
private int contextPosition;
|
|
||||||
|
|
||||||
private final OnCreateContextMenuListener contextMenuListener =
|
|
||||||
new OnCreateContextMenuListener() {
|
|
||||||
@Override
|
|
||||||
public void onCreateContextMenu(ContextMenu menu, View v,
|
|
||||||
ContextMenuInfo menuInfo) {
|
|
||||||
AdapterView.AdapterContextMenuInfo info =
|
|
||||||
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
|
||||||
contextPosition = info.position;
|
|
||||||
menu.add(0, MENU_OPEN, 0, R.string.open_map);
|
|
||||||
menu.add(0, MENU_SHARE, 0, R.string.share_map);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private final OnItemClickListener clickListener =
|
private final OnItemClickListener clickListener =
|
||||||
new OnItemClickListener() {
|
new OnItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -91,7 +76,6 @@ public class MyMapsList extends Activity implements MapsFacade.MapsListCallback
|
|||||||
|
|
||||||
ListView list = (ListView) findViewById(R.id.maplist);
|
ListView list = (ListView) findViewById(R.id.maplist);
|
||||||
list.setOnItemClickListener(clickListener);
|
list.setOnItemClickListener(clickListener);
|
||||||
list.setOnCreateContextMenuListener(contextMenuListener);
|
|
||||||
list.setAdapter(listAdapter);
|
list.setAdapter(listAdapter);
|
||||||
|
|
||||||
startLogin();
|
startLogin();
|
||||||
@@ -101,28 +85,33 @@ public class MyMapsList extends Activity implements MapsFacade.MapsListCallback
|
|||||||
// Starts in the UI thread.
|
// Starts in the UI thread.
|
||||||
// TODO fix this for non-froyo devices.
|
// TODO fix this for non-froyo devices.
|
||||||
if (AuthManagerFactory.useModernAuthManager()) {
|
if (AuthManagerFactory.useModernAuthManager()) {
|
||||||
MyTracks.getInstance().getAccountChooser().chooseAccount(
|
Intent intent = getIntent();
|
||||||
MyMapsList.this,
|
String accountName = intent.getStringExtra(EXTRA_ACCOUNT_NAME);
|
||||||
new AccountChooser.AccountHandler() {
|
String accountType = intent.getStringExtra(EXTRA_ACCOUNT_TYPE);
|
||||||
@Override
|
if (accountName == null || accountType == null) {
|
||||||
public void handleAccountSelected(Account account) {
|
Log.e(TAG, "Didn't receive account name or type");
|
||||||
// Account selection happens in the UI thread.
|
setResult(RESULT_CANCELED);
|
||||||
if (account != null) {
|
finish();
|
||||||
// The user did not quit and there was a valid google
|
return;
|
||||||
// account.
|
}
|
||||||
doLogin(account);
|
|
||||||
}
|
doLogin(auth.getAccountObject(accountName, accountType));
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
doLogin(null);
|
doLogin(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doLogin(final Account account) {
|
private void doLogin(final Object account) {
|
||||||
// Starts in the UI thread.
|
// Starts in the UI thread.
|
||||||
auth.doLogin(new Runnable() {
|
auth.doLogin(new AuthCallback() {
|
||||||
public void run() {
|
@Override
|
||||||
|
public void onAuthResult(boolean success) {
|
||||||
|
if (!success) {
|
||||||
|
setResult(RESULT_CANCELED);
|
||||||
|
finish();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Runs in UI thread.
|
// Runs in UI thread.
|
||||||
mapsClient = new MapsFacade(MyMapsList.this, auth);
|
mapsClient = new MapsFacade(MyMapsList.this, auth);
|
||||||
|
|
||||||
@@ -183,27 +172,4 @@ public class MyMapsList extends Activity implements MapsFacade.MapsListCallback
|
|||||||
}
|
}
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
|
||||||
switch (item.getItemId()) {
|
|
||||||
case MENU_OPEN:
|
|
||||||
clickListener.onItemClick(null, null, contextPosition, 0);
|
|
||||||
return true;
|
|
||||||
case MENU_SHARE:
|
|
||||||
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
|
||||||
shareIntent.setType("text/plain");
|
|
||||||
shareIntent.putExtra(Intent.EXTRA_SUBJECT,
|
|
||||||
getText(R.string.share_map_subject));
|
|
||||||
String[] listItem = (String[]) listAdapter.getMapListingArray(contextPosition);
|
|
||||||
shareIntent.putExtra(Intent.EXTRA_TEXT, String.format(
|
|
||||||
getText(R.string.share_map_body_format).toString(),
|
|
||||||
listItem[1],
|
|
||||||
MapsFacade.buildMapUrl(listItem[0])));
|
|
||||||
startActivity(Intent.createChooser(shareIntent,
|
|
||||||
getText(R.string.share_map).toString()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2008 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MyTracksApplication for keeping global state.
|
||||||
|
*
|
||||||
|
* @author jshih@google.com (Jimmy Shih)
|
||||||
|
*/
|
||||||
|
public class MyTracksApplication extends Application {
|
||||||
|
|
||||||
|
private TrackDataHub trackDataHub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the application's TrackDataHub.
|
||||||
|
*
|
||||||
|
* Note: use synchronized to make sure only one instance is created per application.
|
||||||
|
*/
|
||||||
|
public synchronized TrackDataHub getTrackDataHub() {
|
||||||
|
if (trackDataHub == null) {
|
||||||
|
trackDataHub = TrackDataHub.newInstance(getApplicationContext());
|
||||||
|
}
|
||||||
|
return trackDataHub;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -15,9 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import static com.google.android.apps.mytracks.MyTracksConstants.TAG;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.Sensor;
|
import com.google.android.apps.mytracks.content.Sensor;
|
||||||
import com.google.android.apps.mytracks.services.ITrackRecordingService;
|
import com.google.android.apps.mytracks.services.ITrackRecordingService;
|
||||||
|
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
|
||||||
|
import com.google.android.apps.mytracks.services.sensors.SensorManager;
|
||||||
|
import com.google.android.apps.mytracks.services.sensors.SensorManagerFactory;
|
||||||
import com.google.android.apps.mytracks.services.sensors.SensorUtils;
|
import com.google.android.apps.mytracks.services.sensors.SensorUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
import com.google.protobuf.InvalidProtocolBufferException;
|
import com.google.protobuf.InvalidProtocolBufferException;
|
||||||
@@ -53,10 +57,16 @@ public class SensorStateActivity extends Activity {
|
|||||||
|
|
||||||
private final Runnable stateUpdater = new Runnable() {
|
private final Runnable stateUpdater = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
updateState();
|
if (isVisible) // only update when UI is visible
|
||||||
|
updateState();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connection to the recording service.
|
||||||
|
*/
|
||||||
|
private TrackRecordingServiceConnection serviceConnection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A task which will update the U/I.
|
* A task which will update the U/I.
|
||||||
*/
|
*/
|
||||||
@@ -66,6 +76,23 @@ public class SensorStateActivity extends Activity {
|
|||||||
runOnUiThread(stateUpdater);
|
runOnUiThread(stateUpdater);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A temporary sensor manager, when none is available.
|
||||||
|
*/
|
||||||
|
SensorManager tempSensorManager = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A state flag set to true when the activity is active/visible,
|
||||||
|
* i.e. after resume, and before pause
|
||||||
|
*
|
||||||
|
* Used to avoid updating after the pause event, because sometimes an update
|
||||||
|
* event occurs even after the timer is cancelled. In this case,
|
||||||
|
* it could cause the {@link #tempSensorManager} to be recreated, after it
|
||||||
|
* is destroyed at the pause event.
|
||||||
|
*/
|
||||||
|
boolean isVisible = false;
|
||||||
|
|
||||||
public SensorStateActivity() {
|
public SensorStateActivity() {
|
||||||
utils = new StatsUtilities(this);
|
utils = new StatsUtilities(this);
|
||||||
@@ -79,56 +106,141 @@ public class SensorStateActivity extends Activity {
|
|||||||
|
|
||||||
setContentView(R.layout.sensor_state);
|
setContentView(R.layout.sensor_state);
|
||||||
|
|
||||||
|
serviceConnection = new TrackRecordingServiceConnection(this, stateUpdater);
|
||||||
|
serviceConnection.bindIfRunning();
|
||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
isVisible = true;
|
||||||
|
|
||||||
|
serviceConnection.bindIfRunning();
|
||||||
|
|
||||||
timer = new Timer();
|
timer = new Timer();
|
||||||
timer.schedule(new RefreshTask(), REFRESH_PERIOD_MS, REFRESH_PERIOD_MS);
|
timer.schedule(new RefreshTask(), REFRESH_PERIOD_MS, REFRESH_PERIOD_MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
isVisible = false;
|
||||||
|
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
timer.purge();
|
timer.purge();
|
||||||
timer = null;
|
timer = null;
|
||||||
|
stopTempSensorManager();
|
||||||
|
super.onPause();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
serviceConnection.unbind();
|
||||||
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateState() {
|
protected void updateState() {
|
||||||
MyTracks mt = MyTracks.getInstance();
|
Log.d(TAG, "Updating SensorStateActivity");
|
||||||
|
|
||||||
ITrackRecordingService service =
|
ITrackRecordingService service = serviceConnection.getServiceIfBound();
|
||||||
mt == null ? null : mt.getTrackRecordingService();
|
|
||||||
if (service == null) {
|
// Check if service is available, and recording.
|
||||||
Log.d(MyTracksConstants.TAG, "Could not get track recording service.");
|
boolean isRecording = false;
|
||||||
updateSensorState(Sensor.SensorState.NONE);
|
if (service != null) {
|
||||||
updateSensorData(null);
|
try {
|
||||||
return;
|
isRecording = service.isRecording();
|
||||||
}
|
} catch (RemoteException e) {
|
||||||
Sensor.SensorDataSet sds = null;
|
Log.e(TAG, "Unable to determine if service is recording.", e);
|
||||||
try {
|
|
||||||
byte[] buff = service.getSensorData();
|
|
||||||
if (buff != null) {
|
|
||||||
sds = Sensor.SensorDataSet.parseFrom(buff);
|
|
||||||
updateSensorData(sds);
|
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.e(MyTracksConstants.TAG, "Could not read sensor data.", e);
|
|
||||||
} catch (InvalidProtocolBufferException e) {
|
|
||||||
Log.e(MyTracksConstants.TAG, "Could not read sensor data.", e);
|
|
||||||
}
|
}
|
||||||
updateSensorData(sds);
|
|
||||||
|
// If either service isn't available, or not recording.
|
||||||
|
if (!isRecording) {
|
||||||
|
updateFromTempSensorManager();
|
||||||
|
} else {
|
||||||
|
updateFromSysSensorManager();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateFromTempSensorManager()
|
||||||
|
{
|
||||||
|
// Use variables to hold the sensor state and data set.
|
||||||
|
Sensor.SensorState currentState = null;
|
||||||
|
Sensor.SensorDataSet currentDataSet = null;
|
||||||
|
|
||||||
|
// If no temp sensor manager is present, create one, and start it.
|
||||||
|
if (tempSensorManager == null) {
|
||||||
|
tempSensorManager = SensorManagerFactory.getSensorManager(this);
|
||||||
|
if (tempSensorManager != null)
|
||||||
|
tempSensorManager.onStartTrack();
|
||||||
|
}
|
||||||
|
|
||||||
|
// If a temp sensor manager is available, use states from temp sensor
|
||||||
|
// manager.
|
||||||
|
if (tempSensorManager != null) {
|
||||||
|
currentState = tempSensorManager.getSensorState();
|
||||||
|
currentDataSet = tempSensorManager.getSensorDataSet();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
// Update the sensor state, and sensor data, using the variables.
|
||||||
int i = service.getSensorState();
|
updateSensorStateAndData(currentState, currentDataSet);
|
||||||
updateSensorState(Sensor.SensorState.valueOf(i));
|
}
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.e(MyTracksConstants.TAG, "Could not read sensor state.", e);
|
private void updateFromSysSensorManager()
|
||||||
updateSensorState(Sensor.SensorState.NONE);
|
{
|
||||||
|
// Use variables to hold the sensor state and data set.
|
||||||
|
Sensor.SensorState currentState = null;
|
||||||
|
Sensor.SensorDataSet currentDataSet = null;
|
||||||
|
|
||||||
|
ITrackRecordingService service = serviceConnection.getServiceIfBound();
|
||||||
|
|
||||||
|
// If a temp sensor manager is present, shut it down,
|
||||||
|
// probably recording just started.
|
||||||
|
stopTempSensorManager();
|
||||||
|
|
||||||
|
// Get sensor details from the service.
|
||||||
|
if (service == null) {
|
||||||
|
Log.d(TAG, "Could not get track recording service.");
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
byte[] buff = service.getSensorData();
|
||||||
|
if (buff != null) {
|
||||||
|
currentDataSet = Sensor.SensorDataSet.parseFrom(buff);
|
||||||
|
}
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e(TAG, "Could not read sensor data.", e);
|
||||||
|
} catch (InvalidProtocolBufferException e) {
|
||||||
|
Log.e(TAG, "Could not read sensor data.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentState = Sensor.SensorState.valueOf(service.getSensorState());
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e(TAG, "Could not read sensor state.", e);
|
||||||
|
currentState = Sensor.SensorState.NONE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the sensor state, and sensor data, using the variables.
|
||||||
|
updateSensorStateAndData(currentState, currentDataSet);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the temporary sensor manager, if one exists.
|
||||||
|
*/
|
||||||
|
private void stopTempSensorManager()
|
||||||
|
{
|
||||||
|
if (tempSensorManager != null) {
|
||||||
|
tempSensorManager.shutdown();
|
||||||
|
tempSensorManager = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateSensorStateAndData(Sensor.SensorState state, Sensor.SensorDataSet dataSet)
|
||||||
|
{
|
||||||
|
updateSensorState(state == null ? Sensor.SensorState.NONE : state);
|
||||||
|
updateSensorData(dataSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateSensorState(Sensor.SensorState state) {
|
private void updateSensorState(Sensor.SensorState state) {
|
||||||
@@ -143,6 +255,7 @@ public class SensorStateActivity extends Activity {
|
|||||||
utils.setUnknown(R.id.cadence_state_register);
|
utils.setUnknown(R.id.cadence_state_register);
|
||||||
utils.setUnknown(R.id.power_state_register);
|
utils.setUnknown(R.id.power_state_register);
|
||||||
utils.setUnknown(R.id.heart_rate_register);
|
utils.setUnknown(R.id.heart_rate_register);
|
||||||
|
utils.setUnknown(R.id.battery_level_register);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,8 +266,8 @@ public class SensorStateActivity extends Activity {
|
|||||||
|
|
||||||
if (sds.hasPower() && sds.getPower().hasValue()
|
if (sds.hasPower() && sds.getPower().hasValue()
|
||||||
&& sds.getPower().getState() == Sensor.SensorState.SENDING) {
|
&& sds.getPower().getState() == Sensor.SensorState.SENDING) {
|
||||||
utils.setText(R.id.power_state_register,
|
utils.setText(R.id.power_state_register,
|
||||||
Integer.toString(sds.getPower().getValue()));
|
Integer.toString(sds.getPower().getValue()));
|
||||||
} else {
|
} else {
|
||||||
utils.setText(R.id.power_state_register,
|
utils.setText(R.id.power_state_register,
|
||||||
SensorUtils.getStateAsString(
|
SensorUtils.getStateAsString(
|
||||||
@@ -180,14 +293,27 @@ public class SensorStateActivity extends Activity {
|
|||||||
if (sds.hasHeartRate() && sds.getHeartRate().hasValue()
|
if (sds.hasHeartRate() && sds.getHeartRate().hasValue()
|
||||||
&& sds.getHeartRate().getState() == Sensor.SensorState.SENDING) {
|
&& sds.getHeartRate().getState() == Sensor.SensorState.SENDING) {
|
||||||
utils.setText(R.id.heart_rate_register,
|
utils.setText(R.id.heart_rate_register,
|
||||||
Integer.toString(sds.getHeartRate().getValue()));
|
Integer.toString(sds.getHeartRate().getValue()));
|
||||||
} else {
|
} else {
|
||||||
utils.setText(R.id.heart_rate_register,
|
utils.setText(R.id.heart_rate_register,
|
||||||
SensorUtils.getStateAsString(
|
SensorUtils.getStateAsString(
|
||||||
sds.hasHeartRate()
|
sds.hasHeartRate()
|
||||||
? sds.getHeartRate().getState()
|
? sds.getHeartRate().getState()
|
||||||
: Sensor.SensorState.NONE,
|
: Sensor.SensorState.NONE,
|
||||||
this));
|
this));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sds.hasBatteryLevel() && sds.getBatteryLevel().hasValue()
|
||||||
|
&& sds.getBatteryLevel().getState() == Sensor.SensorState.SENDING) {
|
||||||
|
utils.setText(R.id.battery_level_register,
|
||||||
|
Integer.toString(sds.getBatteryLevel().getValue()));
|
||||||
|
} else {
|
||||||
|
utils.setText(R.id.battery_level_register,
|
||||||
|
SensorUtils.getStateAsString(
|
||||||
|
sds.hasBatteryLevel()
|
||||||
|
? sds.getBatteryLevel().getState()
|
||||||
|
: Sensor.SensorState.NONE,
|
||||||
|
this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+220
-44
@@ -15,14 +15,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import static com.google.android.apps.mytracks.MyTracksConstants.TAG;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.io.backup.BackupActivityHelper;
|
import com.google.android.apps.mytracks.io.backup.BackupActivityHelper;
|
||||||
import com.google.android.apps.mytracks.io.backup.BackupPreferencesListener;
|
import com.google.android.apps.mytracks.io.backup.BackupPreferencesListener;
|
||||||
import com.google.android.apps.mytracks.services.StatusAnnouncerFactory;
|
|
||||||
import com.google.android.apps.mytracks.services.sensors.ant.AntUtils;
|
import com.google.android.apps.mytracks.services.sensors.ant.AntUtils;
|
||||||
|
import com.google.android.apps.mytracks.services.tasks.StatusAnnouncerFactory;
|
||||||
import com.google.android.apps.mytracks.util.ApiFeatures;
|
import com.google.android.apps.mytracks.util.ApiFeatures;
|
||||||
import com.google.android.apps.mytracks.util.BluetoothDeviceUtils;
|
import com.google.android.apps.mytracks.util.BluetoothDeviceUtils;
|
||||||
|
import com.google.android.apps.mytracks.util.UnitConversions;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
@@ -32,11 +33,13 @@ import android.content.Intent;
|
|||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
|
import android.preference.EditTextPreference;
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
import android.preference.Preference.OnPreferenceChangeListener;
|
import android.preference.Preference.OnPreferenceChangeListener;
|
||||||
import android.preference.Preference.OnPreferenceClickListener;
|
import android.preference.Preference.OnPreferenceClickListener;
|
||||||
import android.preference.PreferenceActivity;
|
import android.preference.PreferenceActivity;
|
||||||
|
import android.preference.PreferenceCategory;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.preference.PreferenceScreen;
|
import android.preference.PreferenceScreen;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
@@ -50,34 +53,34 @@ import java.util.Set;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity that let's the user see and edit the settings.
|
* An activity that let's the user see and edit the settings.
|
||||||
*
|
*
|
||||||
|
* This activity has two entry points, "root" and "display" preference screen.
|
||||||
|
* If bundle.getString("open_settings_screen") is set to "display_settings_screen_key", then
|
||||||
|
* the "display" preference screen is shown, otherwise, the "root" display preference is shown.
|
||||||
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
* @author Rodrigo Damazio
|
* @author Rodrigo Damazio
|
||||||
*/
|
*/
|
||||||
public class MyTracksSettings extends PreferenceActivity {
|
public class SettingsActivity extends PreferenceActivity {
|
||||||
|
|
||||||
public static final String SETTINGS_NAME = "MyTracksSettings";
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Default values - keep in sync with those in preferences.xml.
|
|
||||||
*/
|
|
||||||
public static final int DEFAULT_AUTO_RESUME_TRACK_TIMEOUT = 10; // In min.
|
|
||||||
public static final int DEFAULT_ANNOUNCEMENT_FREQUENCY = -1;
|
|
||||||
public static final int DEFAULT_MAX_RECORDING_DISTANCE = 200;
|
|
||||||
public static final int DEFAULT_MIN_RECORDING_DISTANCE = 5;
|
|
||||||
public static final int DEFAULT_MIN_RECORDING_INTERVAL = 0;
|
|
||||||
public static final int DEFAULT_MIN_REQUIRED_ACCURACY = 200;
|
|
||||||
public static final int DEFAULT_SPLIT_FREQUENCY = 0;
|
|
||||||
|
|
||||||
private BackupPreferencesListener backupListener;
|
private BackupPreferencesListener backupListener;
|
||||||
|
|
||||||
private SharedPreferences preferences;
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
protected void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
|
|
||||||
|
initActivityCommons();
|
||||||
|
|
||||||
|
// If we only need the display setting screen nothing else needs to load.
|
||||||
|
if (processIntent())
|
||||||
|
return;
|
||||||
|
|
||||||
|
initActivitySpecifics();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initActivityCommons() {
|
||||||
// The volume we want to control is the Text-To-Speech volume
|
// The volume we want to control is the Text-To-Speech volume
|
||||||
ApiFeatures apiFeatures = ApiFeatures.getInstance();
|
ApiFeatures apiFeatures = ApiFeatures.getInstance();
|
||||||
int volumeStream =
|
int volumeStream =
|
||||||
@@ -86,7 +89,7 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
|
|
||||||
// Tell it where to read/write preferences
|
// Tell it where to read/write preferences
|
||||||
PreferenceManager preferenceManager = getPreferenceManager();
|
PreferenceManager preferenceManager = getPreferenceManager();
|
||||||
preferenceManager.setSharedPreferencesName(SETTINGS_NAME);
|
preferenceManager.setSharedPreferencesName(Constants.SETTINGS_NAME);
|
||||||
preferenceManager.setSharedPreferencesMode(0);
|
preferenceManager.setSharedPreferencesMode(0);
|
||||||
|
|
||||||
// Set up automatic preferences backup
|
// Set up automatic preferences backup
|
||||||
@@ -97,6 +100,19 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
// Load the preferences to be displayed
|
// Load the preferences to be displayed
|
||||||
addPreferencesFromResource(R.xml.preferences);
|
addPreferencesFromResource(R.xml.preferences);
|
||||||
|
|
||||||
|
// Disable TTS announcement preference if not available
|
||||||
|
if (!apiFeatures.hasTextToSpeech()) {
|
||||||
|
IntegerListPreference announcementFrequency =
|
||||||
|
(IntegerListPreference) findPreference(
|
||||||
|
getString(R.string.announcement_frequency_key));
|
||||||
|
announcementFrequency.setEnabled(false);
|
||||||
|
announcementFrequency.setValue("-1");
|
||||||
|
announcementFrequency.setSummary(
|
||||||
|
R.string.settings_not_available_summary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initActivitySpecifics() {
|
||||||
// Hook up switching of displayed list entries between metric and imperial
|
// Hook up switching of displayed list entries between metric and imperial
|
||||||
// units
|
// units
|
||||||
CheckBoxPreference metricUnitsPreference =
|
CheckBoxPreference metricUnitsPreference =
|
||||||
@@ -115,18 +131,8 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
updatePreferenceUnits(metricUnitsPreference.isChecked());
|
updatePreferenceUnits(metricUnitsPreference.isChecked());
|
||||||
|
|
||||||
customizeSensorOptionsPreferences();
|
customizeSensorOptionsPreferences();
|
||||||
|
customizeTrackColorModePreferences();
|
||||||
// Disable TTS announcement preference if not available
|
|
||||||
if (!apiFeatures.hasTextToSpeech()) {
|
|
||||||
IntegerListPreference announcementFrequency =
|
|
||||||
(IntegerListPreference) findPreference(
|
|
||||||
getString(R.string.announcement_frequency_key));
|
|
||||||
announcementFrequency.setEnabled(false);
|
|
||||||
announcementFrequency.setValue("-1");
|
|
||||||
announcementFrequency.setSummary(
|
|
||||||
R.string.settings_not_available_summary);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hook up action for resetting all settings
|
// Hook up action for resetting all settings
|
||||||
Preference resetPreference = findPreference(getString(R.string.reset_key));
|
Preference resetPreference = findPreference(getString(R.string.reset_key));
|
||||||
resetPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
resetPreference.setOnPreferenceClickListener(new OnPreferenceClickListener() {
|
||||||
@@ -136,6 +142,50 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add a confirmation dialog for the "Allow access" preference.
|
||||||
|
final CheckBoxPreference allowAccessPreference = (CheckBoxPreference) findPreference(
|
||||||
|
getString(R.string.allow_access_key));
|
||||||
|
allowAccessPreference.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||||
|
if ((Boolean) newValue) {
|
||||||
|
AlertDialog dialog = new AlertDialog.Builder(SettingsActivity.this)
|
||||||
|
.setCancelable(true)
|
||||||
|
.setTitle(getString(R.string.settings_allow_access))
|
||||||
|
.setMessage(getString(R.string.settings_allow_access_dialog_message))
|
||||||
|
.setPositiveButton(android.R.string.ok, new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int button) {
|
||||||
|
allowAccessPreference.setChecked(true);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton(android.R.string.cancel, null)
|
||||||
|
.create();
|
||||||
|
dialog.show();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean processIntent() {
|
||||||
|
boolean showDisplaySettings = false;
|
||||||
|
Bundle bundle = getIntent().getExtras();
|
||||||
|
PreferenceScreen preferenceScreen;
|
||||||
|
String intentString = getString(R.string.open_settings_screen);
|
||||||
|
|
||||||
|
if (bundle != null) {
|
||||||
|
preferenceScreen = (PreferenceScreen) findPreference(bundle.getString(intentString));
|
||||||
|
if (preferenceScreen != null) {
|
||||||
|
showDisplaySettings = true;
|
||||||
|
setPreferenceScreen(preferenceScreen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return showDisplaySettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void customizeSensorOptionsPreferences() {
|
private void customizeSensorOptionsPreferences() {
|
||||||
@@ -184,10 +234,37 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
sensorOptionsScreen.removePreference(findPreference(getString(R.string.ant_options_key)));
|
sensorOptionsScreen.removePreference(findPreference(getString(R.string.ant_options_key)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void customizeTrackColorModePreferences() {
|
||||||
|
ListPreference trackColorModePreference =
|
||||||
|
(ListPreference) findPreference(getString(R.string.track_color_mode_key));
|
||||||
|
trackColorModePreference.setOnPreferenceChangeListener(
|
||||||
|
new OnPreferenceChangeListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onPreferenceChange(Preference preference,
|
||||||
|
Object newValue) {
|
||||||
|
updateTrackColorModeSettings((String) newValue);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateTrackColorModeSettings(trackColorModePreference.getValue());
|
||||||
|
|
||||||
|
setTrackColorModePreferenceListeners();
|
||||||
|
|
||||||
|
PreferenceCategory speedOptionsCategory =
|
||||||
|
(PreferenceCategory) findPreference(getString(R.string.track_color_mode_fixed_speed_options_key));
|
||||||
|
|
||||||
|
speedOptionsCategory.removePreference(findPreference(getString(R.string.track_color_mode_fixed_speed_slow_key)));
|
||||||
|
speedOptionsCategory.removePreference(findPreference(getString(R.string.track_color_mode_fixed_speed_medium_key)));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
// If we only need the display setting screen nothing else needs to load.
|
||||||
|
if (processIntent())
|
||||||
|
return;
|
||||||
|
|
||||||
configureBluetoothPreferences();
|
configureBluetoothPreferences();
|
||||||
Preference backupNowPreference =
|
Preference backupNowPreference =
|
||||||
@@ -219,7 +296,7 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
BackupActivityHelper backupHelper =
|
BackupActivityHelper backupHelper =
|
||||||
new BackupActivityHelper(MyTracksSettings.this);
|
new BackupActivityHelper(SettingsActivity.this);
|
||||||
backupHelper.writeBackup();
|
backupHelper.writeBackup();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -229,7 +306,7 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceClick(Preference preference) {
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
BackupActivityHelper backupHelper =
|
BackupActivityHelper backupHelper =
|
||||||
new BackupActivityHelper(MyTracksSettings.this);
|
new BackupActivityHelper(SettingsActivity.this);
|
||||||
backupHelper.restoreBackup();
|
backupHelper.restoreBackup();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -246,7 +323,8 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
|
|
||||||
private void updateSensorSettings(String sensorType) {
|
private void updateSensorSettings(String sensorType) {
|
||||||
boolean usesBluetooth =
|
boolean usesBluetooth =
|
||||||
getString(R.string.zephyr_sensor_type).equals(sensorType);
|
getString(R.string.zephyr_sensor_type).equals(sensorType)
|
||||||
|
|| getString(R.string.polar_sensor_type).equals(sensorType);
|
||||||
findPreference(
|
findPreference(
|
||||||
getString(R.string.bluetooth_sensor_key)).setEnabled(usesBluetooth);
|
getString(R.string.bluetooth_sensor_key)).setEnabled(usesBluetooth);
|
||||||
findPreference(
|
findPreference(
|
||||||
@@ -264,6 +342,18 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateTrackColorModeSettings(String trackColorMode) {
|
||||||
|
boolean usesFixedSpeed = trackColorMode.equals(getString(R.string.track_color_mode_fixed));
|
||||||
|
boolean usesDynamicSpeed = trackColorMode.equals(getString(R.string.track_color_mode_dynamic));
|
||||||
|
|
||||||
|
findPreference(
|
||||||
|
getString(R.string.track_color_mode_fixed_speed_slow_display_key)).setEnabled(usesFixedSpeed);
|
||||||
|
findPreference(
|
||||||
|
getString(R.string.track_color_mode_fixed_speed_medium_display_key)).setEnabled(usesFixedSpeed);
|
||||||
|
findPreference(
|
||||||
|
getString(R.string.track_color_mode_dynamic_speed_variation_key)).setEnabled(usesDynamicSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates all the preferences which give options with distance units to use
|
* Updates all the preferences which give options with distance units to use
|
||||||
* the proper unit the user has selected.
|
* the proper unit the user has selected.
|
||||||
@@ -280,9 +370,6 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
final ListPreference minRequiredAccuracy =
|
final ListPreference minRequiredAccuracy =
|
||||||
(ListPreference) findPreference(
|
(ListPreference) findPreference(
|
||||||
getString(R.string.min_required_accuracy_key));
|
getString(R.string.min_required_accuracy_key));
|
||||||
final ListPreference splitFrequency =
|
|
||||||
(ListPreference) findPreference(
|
|
||||||
getString(R.string.split_frequency_key));
|
|
||||||
|
|
||||||
minRecordingDistance.setEntries(isMetric
|
minRecordingDistance.setEntries(isMetric
|
||||||
? R.array.min_recording_distance_options
|
? R.array.min_recording_distance_options
|
||||||
@@ -293,11 +380,20 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
minRequiredAccuracy.setEntries(isMetric
|
minRequiredAccuracy.setEntries(isMetric
|
||||||
? R.array.min_required_accuracy_options
|
? R.array.min_required_accuracy_options
|
||||||
: R.array.min_required_accuracy_options_ft);
|
: R.array.min_required_accuracy_options_ft);
|
||||||
splitFrequency.setEntries(isMetric
|
setTaskOptions(isMetric, R.string.announcement_frequency_key);
|
||||||
? R.array.split_frequency_options
|
setTaskOptions(isMetric, R.string.split_frequency_key);
|
||||||
: R.array.split_frequency_options_ft);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the user visible options for a periodic task.
|
||||||
|
*/
|
||||||
|
private void setTaskOptions(boolean isMetric, int listId) {
|
||||||
|
final ListPreference taskFrequency =
|
||||||
|
(ListPreference) findPreference(getString(listId));
|
||||||
|
taskFrequency.setEntries(isMetric
|
||||||
|
? R.array.task_frequency_options
|
||||||
|
: R.array.task_frequency_options_ft);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures preference actions related to bluetooth.
|
* Configures preference actions related to bluetooth.
|
||||||
@@ -347,7 +443,7 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
.setPositiveButton(android.R.string.ok,
|
.setPositiveButton(android.R.string.ok,
|
||||||
new OnClickListener() {
|
new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int button) {
|
public void onClick(DialogInterface dialogInterface, int button) {
|
||||||
onResetPreferencesConfirmed();
|
onResetPreferencesConfirmed();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -373,7 +469,7 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
public void run() {
|
public void run() {
|
||||||
// Give feedback to the user.
|
// Give feedback to the user.
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
MyTracksSettings.this,
|
SettingsActivity.this,
|
||||||
R.string.settings_reset_done,
|
R.string.settings_reset_done,
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
@@ -386,4 +482,84 @@ public class MyTracksSettings extends PreferenceActivity {
|
|||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the given edit text preference text.
|
||||||
|
* If the units are not metric convert the value before displaying.
|
||||||
|
*/
|
||||||
|
private void viewTrackColorModeSettings(EditTextPreference preference, int id) {
|
||||||
|
CheckBoxPreference metricUnitsPreference = (CheckBoxPreference) findPreference(
|
||||||
|
getString(R.string.metric_units_key));
|
||||||
|
if(metricUnitsPreference.isChecked()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Convert miles/h to km/h
|
||||||
|
SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
|
||||||
|
String metricspeed = prefs.getString(getString(id), null);
|
||||||
|
int englishspeed;
|
||||||
|
try {
|
||||||
|
englishspeed = (int) (Double.parseDouble(metricspeed) * UnitConversions.KMH_TO_MPH);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
englishspeed = 0;
|
||||||
|
}
|
||||||
|
preference.getEditText().setText(String.valueOf(englishspeed));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Saves the given edit text preference value.
|
||||||
|
* If the units are not metric convert the value before saving.
|
||||||
|
*/
|
||||||
|
private void validateTrackColorModeSettings(EditTextPreference preference,
|
||||||
|
String newValue, int id) {
|
||||||
|
CheckBoxPreference metricUnitsPreference = (CheckBoxPreference) findPreference(
|
||||||
|
getString(R.string.metric_units_key));
|
||||||
|
String metricspeed;
|
||||||
|
if(!metricUnitsPreference.isChecked()) {
|
||||||
|
// Convert miles/h to km/h
|
||||||
|
try {
|
||||||
|
metricspeed = String.valueOf((int) (Double.parseDouble(newValue) * UnitConversions.MPH_TO_KMH) + 1);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
metricspeed = "0";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
metricspeed = newValue;
|
||||||
|
}
|
||||||
|
SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
|
||||||
|
prefs.edit().putString(getString(id), metricspeed).commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the TrackColorMode preference listeners.
|
||||||
|
*/
|
||||||
|
private void setTrackColorModePreferenceListeners() {
|
||||||
|
setTrackColorModePreferenceListener(R.string.track_color_mode_fixed_speed_slow_display_key,
|
||||||
|
R.string.track_color_mode_fixed_speed_slow_key);
|
||||||
|
setTrackColorModePreferenceListener(R.string.track_color_mode_fixed_speed_medium_display_key,
|
||||||
|
R.string.track_color_mode_fixed_speed_medium_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a TrackColorMode preference listener.
|
||||||
|
*/
|
||||||
|
private void setTrackColorModePreferenceListener(int displayKey, final int metricKey) {
|
||||||
|
EditTextPreference trackColorModePreference =
|
||||||
|
(EditTextPreference) findPreference(getString(displayKey));
|
||||||
|
trackColorModePreference.setOnPreferenceChangeListener(
|
||||||
|
new OnPreferenceChangeListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onPreferenceChange(Preference preference,
|
||||||
|
Object newValue) {
|
||||||
|
validateTrackColorModeSettings((EditTextPreference) preference, (String) newValue, metricKey);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
trackColorModePreference.setOnPreferenceClickListener(
|
||||||
|
new OnPreferenceClickListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onPreferenceClick(Preference preference) {
|
||||||
|
viewTrackColorModeSettings((EditTextPreference) preference, metricKey);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,26 +15,22 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtilsImpl;
|
|
||||||
import com.google.android.apps.mytracks.content.Track;
|
import com.google.android.apps.mytracks.content.Track;
|
||||||
import com.google.android.apps.mytracks.content.TracksColumns;
|
import com.google.android.apps.mytracks.content.TrackDataHub;
|
||||||
import com.google.android.apps.mytracks.content.WaypointsColumns;
|
import com.google.android.apps.mytracks.content.TrackDataHub.ListenerDataType;
|
||||||
import com.google.android.apps.mytracks.services.StatusAnnouncerFactory;
|
import com.google.android.apps.mytracks.content.TrackDataListener;
|
||||||
|
import com.google.android.apps.mytracks.content.Waypoint;
|
||||||
|
import com.google.android.apps.mytracks.services.ServiceUtils;
|
||||||
|
import com.google.android.apps.mytracks.services.tasks.StatusAnnouncerFactory;
|
||||||
import com.google.android.apps.mytracks.util.ApiFeatures;
|
import com.google.android.apps.mytracks.util.ApiFeatures;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
|
||||||
import android.database.ContentObserver;
|
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.location.LocationListener;
|
|
||||||
import android.location.LocationManager;
|
|
||||||
import android.location.LocationProvider;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@@ -42,68 +38,44 @@ import android.view.MenuItem;
|
|||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity that displays track statistics to the user.
|
* An activity that displays track statistics to the user.
|
||||||
*
|
*
|
||||||
* @author Sandor Dornbush
|
* @author Sandor Dornbush
|
||||||
|
* @author Rodrigo Damazio
|
||||||
*/
|
*/
|
||||||
public class StatsActivity extends Activity
|
public class StatsActivity extends Activity implements TrackDataListener {
|
||||||
implements OnSharedPreferenceChangeListener {
|
/**
|
||||||
|
* A runnable for posting to the UI thread. Will update the total time field.
|
||||||
|
*/
|
||||||
|
private final Runnable updateResults = new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
if (dataHub != null && dataHub.isRecordingSelected()) {
|
||||||
|
utils.setTime(R.id.total_time_register,
|
||||||
|
System.currentTimeMillis() - startTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private StatsUtilities utils;
|
private StatsUtilities utils;
|
||||||
private UIUpdateThread thread;
|
private UIUpdateThread thread;
|
||||||
|
|
||||||
private ContentObserver observer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the currently selected track.
|
|
||||||
*/
|
|
||||||
private long selectedTrackId = -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The id of the currently recording track.
|
|
||||||
*/
|
|
||||||
private long recordingTrackId = -1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The start time of the selected track.
|
* The start time of the selected track.
|
||||||
*/
|
*/
|
||||||
private long startTime = -1;
|
private long startTime = -1;
|
||||||
|
|
||||||
/**
|
|
||||||
* True if distances should be displayed in metric units (from shared
|
|
||||||
* preferences).
|
|
||||||
*/
|
|
||||||
private boolean metricUnits = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* True if pace should be displayed as dist/time (from shared preferences).
|
|
||||||
*/
|
|
||||||
private boolean displaySpeed = true;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* true if activity has resumed and is on top
|
|
||||||
*/
|
|
||||||
private boolean activityOnTop = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If true, the statistics for the current segment are shown, otherwise
|
* If true, the statistics for the current segment are shown, otherwise
|
||||||
* for the full track.
|
* for the full track.
|
||||||
*/
|
*/
|
||||||
private boolean showCurrentSegment = false;
|
private boolean showCurrentSegment = false;
|
||||||
|
|
||||||
private MyTracksProviderUtils providerUtils;
|
private TrackDataHub dataHub;
|
||||||
|
private SharedPreferences preferences;
|
||||||
/**
|
|
||||||
* A runnable for posting to the UI thread. Will update the total time field.
|
|
||||||
*/
|
|
||||||
private final Runnable updateResults = new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
updateTotalTime();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A thread that updates the total time field every second.
|
* A thread that updates the total time field every second.
|
||||||
@@ -112,35 +84,33 @@ public class StatsActivity extends Activity
|
|||||||
|
|
||||||
public UIUpdateThread() {
|
public UIUpdateThread() {
|
||||||
super();
|
super();
|
||||||
Log.i(MyTracksConstants.TAG, "Created UI update thread");
|
Log.i(TAG, "Created UI update thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.i(MyTracksConstants.TAG, "Started UI update thread");
|
Log.i(TAG, "Started UI update thread");
|
||||||
while (MyTracks.getInstance().isRecording()) {
|
while (ServiceUtils.isRecording(StatsActivity.this, null, preferences)) {
|
||||||
long sleeptime = 1000;
|
|
||||||
runOnUiThread(updateResults);
|
runOnUiThread(updateResults);
|
||||||
try {
|
try {
|
||||||
Thread.sleep(sleeptime);
|
Thread.sleep(1000L);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Log.w(MyTracksConstants.TAG,
|
Log.w(TAG, "StatsActivity: Caught exception on sleep.", e);
|
||||||
"StatsActivity: Caught exception on sleep.", e);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.w(MyTracksConstants.TAG, "UIUpdateThread finished.");
|
Log.w(TAG, "UIUpdateThread finished.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called when the activity is first created. */
|
/** Called when the activity is first created. */
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
preferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
utils = new StatsUtilities(this);
|
utils = new StatsUtilities(this);
|
||||||
providerUtils = new MyTracksProviderUtilsImpl(getContentResolver());
|
|
||||||
|
|
||||||
// The volume we want to control is the Text-To-Speech volume
|
// The volume we want to control is the Text-To-Speech volume
|
||||||
int volumeStream =
|
int volumeStream =
|
||||||
new StatusAnnouncerFactory(ApiFeatures.getInstance()).getVolumeStream();
|
new StatusAnnouncerFactory(ApiFeatures.getInstance()).getVolumeStream();
|
||||||
@@ -151,40 +121,10 @@ public class StatsActivity extends Activity
|
|||||||
|
|
||||||
setContentView(R.layout.stats);
|
setContentView(R.layout.stats);
|
||||||
|
|
||||||
Handler contentHandler = new Handler();
|
|
||||||
observer = new ContentObserver(contentHandler) {
|
|
||||||
@Override
|
|
||||||
public void onChange(boolean selfChange) {
|
|
||||||
Log.d(MyTracksConstants.TAG, "StatsActivity: ContentObserver.onChange");
|
|
||||||
restoreStats();
|
|
||||||
super.onChange(selfChange);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ScrollView sv = ((ScrollView) findViewById(R.id.scrolly));
|
ScrollView sv = ((ScrollView) findViewById(R.id.scrolly));
|
||||||
sv.setScrollBarStyle(ScrollView.SCROLLBARS_OUTSIDE_INSET);
|
sv.setScrollBarStyle(ScrollView.SCROLLBARS_OUTSIDE_INSET);
|
||||||
|
|
||||||
SharedPreferences preferences =
|
showUnknownLocation();
|
||||||
getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
|
||||||
if (preferences != null) {
|
|
||||||
selectedTrackId = preferences.getLong(
|
|
||||||
getString(R.string.selected_track_key), -1);
|
|
||||||
recordingTrackId = preferences.getLong(
|
|
||||||
getString(R.string.recording_track_key), -1);
|
|
||||||
metricUnits = preferences.getBoolean(
|
|
||||||
getString(R.string.metric_units_key), true);
|
|
||||||
displaySpeed =
|
|
||||||
preferences.getBoolean(getString(R.string.report_speed_key), true);
|
|
||||||
checkLiveTrack();
|
|
||||||
restoreStats();
|
|
||||||
showUnknownLocation();
|
|
||||||
preferences.registerOnSharedPreferenceChangeListener(this);
|
|
||||||
}
|
|
||||||
utils.setMetricUnits(metricUnits);
|
|
||||||
utils.setReportSpeed(displaySpeed);
|
|
||||||
utils.updateUnits();
|
|
||||||
utils.setSpeedLabel(R.id.speed_label, R.string.speed, R.string.pace_label);
|
|
||||||
utils.setSpeedLabels();
|
|
||||||
|
|
||||||
DisplayMetrics metrics = new DisplayMetrics();
|
DisplayMetrics metrics = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||||
@@ -193,89 +133,76 @@ public class StatsActivity extends Activity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
dataHub = ((MyTracksApplication) getApplication()).getTrackDataHub();
|
||||||
|
dataHub.registerTrackDataListener(this, EnumSet.of(
|
||||||
|
ListenerDataType.SELECTED_TRACK_CHANGED,
|
||||||
|
ListenerDataType.TRACK_UPDATES,
|
||||||
|
ListenerDataType.LOCATION_UPDATES,
|
||||||
|
ListenerDataType.DISPLAY_PREFERENCES));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
unregisterLocationListener();
|
dataHub.unregisterTrackDataListener(this);
|
||||||
|
dataHub = null;
|
||||||
|
|
||||||
if (thread != null) {
|
if (thread != null) {
|
||||||
thread.interrupt();
|
thread.interrupt();
|
||||||
thread = null;
|
thread = null;
|
||||||
}
|
}
|
||||||
getContentResolver().unregisterContentObserver(observer);
|
|
||||||
activityOnTop = false;
|
super.onStop();
|
||||||
super.onPause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
public boolean onUnitsChanged(boolean metric) {
|
||||||
activityOnTop = true;
|
// Ignore if unchanged.
|
||||||
checkLiveTrack();
|
if (metric == utils.isMetricUnits()) return false;
|
||||||
restoreStats();
|
|
||||||
showUnknownLocation();
|
utils.setMetricUnits(metric);
|
||||||
super.onResume();
|
updateLabels();
|
||||||
|
|
||||||
|
return true; // Reload data
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(
|
public boolean onReportSpeedChanged(boolean displaySpeed) {
|
||||||
final SharedPreferences sharedPreferences, final String key) {
|
// Ignore if unchanged.
|
||||||
Log.d(MyTracksConstants.TAG,
|
if (displaySpeed == utils.isReportSpeed()) return false;
|
||||||
"StatsActivity: onSharedPreferences changed " + key);
|
|
||||||
if (key != null) {
|
utils.setReportSpeed(displaySpeed);
|
||||||
runOnUiThread(new Runnable() {
|
updateLabels();
|
||||||
@Override
|
|
||||||
public void run() {
|
return true; // Reload data
|
||||||
if (key.equals(getString(R.string.selected_track_key))) {
|
}
|
||||||
selectedTrackId =
|
|
||||||
sharedPreferences.getLong(
|
private void updateLabels() {
|
||||||
getString(R.string.selected_track_key),
|
runOnUiThread(new Runnable() {
|
||||||
-1);
|
@Override
|
||||||
checkLiveTrack();
|
public void run() {
|
||||||
restoreStats();
|
utils.updateUnits();
|
||||||
showUnknownLocation();
|
utils.setSpeedLabel(R.id.speed_label, R.string.speed, R.string.pace_label);
|
||||||
} else if (key.equals(getString(R.string.recording_track_key))) {
|
utils.setSpeedLabels();
|
||||||
recordingTrackId =
|
}
|
||||||
sharedPreferences.getLong(
|
});
|
||||||
getString(R.string.recording_track_key),
|
|
||||||
-1);
|
|
||||||
checkLiveTrack();
|
|
||||||
restoreStats();
|
|
||||||
showUnknownLocation();
|
|
||||||
} else if (key.equals(getString(R.string.metric_units_key))) {
|
|
||||||
metricUnits =
|
|
||||||
sharedPreferences.getBoolean(
|
|
||||||
getString(R.string.metric_units_key), true);
|
|
||||||
utils.setMetricUnits(metricUnits);
|
|
||||||
utils.updateUnits();
|
|
||||||
restoreStats();
|
|
||||||
} else if (key.equals(getString(R.string.report_speed_key))) {
|
|
||||||
displaySpeed =
|
|
||||||
sharedPreferences.getBoolean(
|
|
||||||
getString(R.string.report_speed_key),
|
|
||||||
true);
|
|
||||||
utils.setReportSpeed(displaySpeed);
|
|
||||||
utils.updateUnits();
|
|
||||||
utils.setSpeedLabel(
|
|
||||||
R.id.speed_label, R.string.speed, R.string.pace_label);
|
|
||||||
Log.w(MyTracksConstants.TAG, "Setting speed labels");
|
|
||||||
utils.setSpeedLabels();
|
|
||||||
restoreStats();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
super.onCreateOptionsMenu(menu);
|
super.onCreateOptionsMenu(menu);
|
||||||
MenuItem currentSegment = menu.add(0,
|
MenuItem currentSegment = menu.add(0,
|
||||||
MyTracksConstants.MENU_CURRENT_SEGMENT, 0, R.string.current_segment);
|
Constants.MENU_CURRENT_SEGMENT, 0, R.string.current_segment);
|
||||||
currentSegment.setIcon(R.drawable.ic_menu_lastsegment);
|
currentSegment.setIcon(R.drawable.ic_menu_lastsegment);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
MenuItem item = menu.findItem(MyTracksConstants.MENU_CURRENT_SEGMENT);
|
MenuItem item = menu.findItem(Constants.MENU_CURRENT_SEGMENT);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
item.setTitle(showCurrentSegment
|
item.setTitle(showCurrentSegment
|
||||||
? getString(R.string.current_track)
|
? getString(R.string.current_track)
|
||||||
@@ -287,139 +214,14 @@ public class StatsActivity extends Activity
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case MyTracksConstants.MENU_CURRENT_SEGMENT:
|
case Constants.MENU_CURRENT_SEGMENT:
|
||||||
showCurrentSegment = !showCurrentSegment;
|
showCurrentSegment = !showCurrentSegment;
|
||||||
restoreStats();
|
// TODO: Re-read only the data that interests us
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final LocationListener locationListener = new LocationListener() {
|
|
||||||
@Override
|
|
||||||
public void onLocationChanged(Location l) {
|
|
||||||
if (selectedTrackIsRecording()) {
|
|
||||||
showLocation(l);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProviderDisabled(String provider) {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onProviderEnabled(String provider) {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStatusChanged(String provider, int status, Bundle extras) {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers to receive location updates from the GPS location provider.
|
|
||||||
*/
|
|
||||||
private void registerLocationListener() {
|
|
||||||
LocationManager locationManager =
|
|
||||||
(LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
|
||||||
if (locationManager != null) {
|
|
||||||
LocationProvider gpsProvider =
|
|
||||||
locationManager.getProvider(MyTracksConstants.GPS_PROVIDER);
|
|
||||||
if (gpsProvider == null) {
|
|
||||||
Toast.makeText(this, getString(R.string.error_no_gps_location_provider),
|
|
||||||
Toast.LENGTH_LONG).show();
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
Log.d(MyTracksConstants.TAG, "StatsActivity: Using location provider "
|
|
||||||
+ gpsProvider.getName());
|
|
||||||
}
|
|
||||||
locationManager.requestLocationUpdates(gpsProvider.getName(),
|
|
||||||
0/*minTime*/, 0/*minDist*/, locationListener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregisters all location listener.
|
|
||||||
*/
|
|
||||||
private void unregisterLocationListener() {
|
|
||||||
LocationManager locationManager =
|
|
||||||
(LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
|
||||||
if (locationManager != null) {
|
|
||||||
locationManager.removeUpdates(locationListener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return true if the selected track is the currently recording track
|
|
||||||
*/
|
|
||||||
private boolean selectedTrackIsRecording() {
|
|
||||||
return MyTracks.getInstance().isRecording()
|
|
||||||
&& selectedTrackId == recordingTrackId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads values for selected tracks from provider and update the UI.
|
|
||||||
*/
|
|
||||||
private void restoreStats() {
|
|
||||||
if (selectedTrackId < 0) {
|
|
||||||
utils.setAllToUnknown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Track track = providerUtils.getTrack(selectedTrackId);
|
|
||||||
if (track == null || track.getStatistics() == null) {
|
|
||||||
utils.setAllToUnknown();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
startTime = track.getStatistics().getStartTime();
|
|
||||||
if (!selectedTrackIsRecording()) {
|
|
||||||
utils.setTime(R.id.total_time_register,
|
|
||||||
track.getStatistics().getTotalTime());
|
|
||||||
}
|
|
||||||
utils.setAllStats(track.getStatistics());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if this activity needs to update live track data or not.
|
|
||||||
* If so, make sure that:
|
|
||||||
* a) a thread keeps updating the total time
|
|
||||||
* b) a location listener is registered
|
|
||||||
* c) a content observer is registered
|
|
||||||
* Otherwise unregister listeners, observers, and kill update thread.
|
|
||||||
*/
|
|
||||||
private void checkLiveTrack() {
|
|
||||||
final boolean isRecording = selectedTrackIsRecording();
|
|
||||||
final boolean startThread =
|
|
||||||
(thread == null) && isRecording && activityOnTop;
|
|
||||||
final boolean killThread =
|
|
||||||
(thread != null) && (!isRecording || !activityOnTop);
|
|
||||||
if (startThread) {
|
|
||||||
thread = new UIUpdateThread();
|
|
||||||
thread.start();
|
|
||||||
getContentResolver().registerContentObserver(
|
|
||||||
TracksColumns.CONTENT_URI, false, observer);
|
|
||||||
getContentResolver().registerContentObserver(
|
|
||||||
WaypointsColumns.CONTENT_URI, false, observer);
|
|
||||||
registerLocationListener();
|
|
||||||
} else if (killThread) {
|
|
||||||
thread.interrupt();
|
|
||||||
thread = null;
|
|
||||||
getContentResolver().unregisterContentObserver(observer);
|
|
||||||
unregisterLocationListener();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateTotalTime() {
|
|
||||||
if (selectedTrackIsRecording()) {
|
|
||||||
utils.setTime(R.id.total_time_register,
|
|
||||||
System.currentTimeMillis() - startTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the given location fields (latitude, longitude, altitude) and all
|
* Updates the given location fields (latitude, longitude, altitude) and all
|
||||||
* other fields.
|
* other fields.
|
||||||
@@ -439,4 +241,125 @@ public class StatsActivity extends Activity
|
|||||||
utils.setUnknown(R.id.longitude_register);
|
utils.setUnknown(R.id.longitude_register);
|
||||||
utils.setUnknown(R.id.speed_register);
|
utils.setUnknown(R.id.speed_register);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelectedTrackChanged(Track track, boolean isRecording) {
|
||||||
|
/*
|
||||||
|
* Checks if this activity needs to update live track data or not.
|
||||||
|
* If so, make sure that:
|
||||||
|
* a) a thread keeps updating the total time
|
||||||
|
* b) a location listener is registered
|
||||||
|
* c) a content observer is registered
|
||||||
|
* Otherwise unregister listeners, observers, and kill update thread.
|
||||||
|
*/
|
||||||
|
final boolean startThread = (thread == null) && isRecording;
|
||||||
|
final boolean killThread = (thread != null) && (!isRecording);
|
||||||
|
if (startThread) {
|
||||||
|
thread = new UIUpdateThread();
|
||||||
|
thread.start();
|
||||||
|
} else if (killThread) {
|
||||||
|
thread.interrupt();
|
||||||
|
thread = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCurrentLocationChanged(final Location loc) {
|
||||||
|
TrackDataHub localDataHub = dataHub;
|
||||||
|
if (localDataHub != null && localDataHub.isRecordingSelected()) {
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (loc != null) {
|
||||||
|
showLocation(loc);
|
||||||
|
} else {
|
||||||
|
showUnknownLocation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCurrentHeadingChanged(double heading) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProviderStateChange(ProviderState state) {
|
||||||
|
switch (state) {
|
||||||
|
case DISABLED:
|
||||||
|
case NO_FIX:
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
showUnknownLocation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTrackUpdated(final Track track) {
|
||||||
|
TrackDataHub localDataHub = dataHub;
|
||||||
|
final boolean recordingSelected = localDataHub != null && localDataHub.isRecordingSelected();
|
||||||
|
runOnUiThread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (track == null || track.getStatistics() == null) {
|
||||||
|
utils.setAllToUnknown();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
startTime = track.getStatistics().getStartTime();
|
||||||
|
if (!recordingSelected) {
|
||||||
|
utils.setTime(R.id.total_time_register,
|
||||||
|
track.getStatistics().getTotalTime());
|
||||||
|
showUnknownLocation();
|
||||||
|
}
|
||||||
|
utils.setAllStats(track.getStatistics());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearWaypoints() {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewWaypoint(Waypoint wpt) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewWaypointsDone() {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearTrackPoints() {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewTrackPoint(Location loc) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSegmentSplit() {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSampledOutTrackPoint(Location loc) {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNewTrackPointsDone() {
|
||||||
|
// We don't care.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ public class StatsUtilities {
|
|||||||
public void setText(int id, double d, NumberFormat format) {
|
public void setText(int id, double d, NumberFormat format) {
|
||||||
if (!Double.isNaN(d) && !Double.isInfinite(d)) {
|
if (!Double.isNaN(d) && !Double.isInfinite(d)) {
|
||||||
setText(id, format.format(d));
|
setText(id, format.format(d));
|
||||||
|
} else {
|
||||||
|
setUnknown(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +220,7 @@ public class StatsUtilities {
|
|||||||
setGrade(R.id.max_grade_register, maxGrade);
|
setGrade(R.id.max_grade_register, maxGrade);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAllStats(TripStatistics stats) {
|
public void setAllStats(TripStatistics stats) {
|
||||||
setTime(R.id.moving_time_register, stats.getMovingTime());
|
setTime(R.id.moving_time_register, stats.getMovingTime());
|
||||||
setDistance(R.id.total_distance_register, stats.getTotalDistance() / 1000);
|
setDistance(R.id.total_distance_register, stats.getTotalDistance() / 1000);
|
||||||
setSpeed(R.id.average_speed_register, stats.getAverageSpeed() * 3.6);
|
setSpeed(R.id.average_speed_register, stats.getAverageSpeed() * 3.6);
|
||||||
@@ -235,7 +237,7 @@ public class StatsUtilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSpeedLabel(int id, int speedString, int paceString) {
|
public void setSpeedLabel(int id, int speedString, int paceString) {
|
||||||
Log.w(MyTracksConstants.TAG, "Setting view " + id +
|
Log.w(Constants.TAG, "Setting view " + id +
|
||||||
" to " + reportSpeed +
|
" to " + reportSpeed +
|
||||||
" speed: " + speedString +
|
" speed: " + speedString +
|
||||||
" pace: " + paceString);
|
" pace: " + paceString);
|
||||||
@@ -243,7 +245,7 @@ public class StatsUtilities {
|
|||||||
if (tv != null) {
|
if (tv != null) {
|
||||||
tv.setText(reportSpeed ? speedString : paceString);
|
tv.setText(reportSpeed ? speedString : paceString);
|
||||||
} else {
|
} else {
|
||||||
Log.w(MyTracksConstants.TAG, "Could not find id: " + id);
|
Log.w(Constants.TAG, "Could not find id: " + id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -37,7 +37,7 @@ import android.widget.EditText;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksDetails extends Activity implements OnClickListener {
|
public class TrackDetails extends Activity implements OnClickListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The id of the track being edited (taken from bundle, "trackid")
|
* The id of the track being edited (taken from bundle, "trackid")
|
||||||
@@ -56,7 +56,7 @@ public class MyTracksDetails extends Activity implements OnClickListener {
|
|||||||
// Required extra when launching this intent:
|
// Required extra when launching this intent:
|
||||||
trackId = getIntent().getLongExtra("trackid", -1);
|
trackId = getIntent().getLongExtra("trackid", -1);
|
||||||
if (trackId < 0) {
|
if (trackId < 0) {
|
||||||
Log.d(MyTracksConstants.TAG,
|
Log.d(Constants.TAG,
|
||||||
"MyTracksDetails intent was launched w/o track id.");
|
"MyTracksDetails intent was launched w/o track id.");
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
+120
-52
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008 Google Inc.
|
* Copyright 2008 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -15,17 +15,26 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.TracksColumns;
|
import com.google.android.apps.mytracks.content.TracksColumns;
|
||||||
|
import com.google.android.apps.mytracks.io.file.SaveActivity;
|
||||||
|
import com.google.android.apps.mytracks.io.sendtogoogle.SendActivity;
|
||||||
|
import com.google.android.apps.mytracks.services.ServiceUtils;
|
||||||
|
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
|
||||||
import com.google.android.apps.mytracks.util.StringUtils;
|
import com.google.android.apps.mytracks.util.StringUtils;
|
||||||
import com.google.android.apps.mytracks.util.UnitConversions;
|
import com.google.android.apps.mytracks.util.UnitConversions;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.ListActivity;
|
import android.app.ListActivity;
|
||||||
|
import android.content.ContentUris;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
import android.view.ContextMenu.ContextMenuInfo;
|
import android.view.ContextMenu.ContextMenuInfo;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
@@ -45,7 +54,7 @@ import android.widget.TextView;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksList extends ListActivity
|
public class TrackList extends ListActivity
|
||||||
implements SharedPreferences.OnSharedPreferenceChangeListener,
|
implements SharedPreferences.OnSharedPreferenceChangeListener,
|
||||||
View.OnClickListener {
|
View.OnClickListener {
|
||||||
|
|
||||||
@@ -70,45 +79,54 @@ public class MyTracksList extends ListActivity
|
|||||||
AdapterView.AdapterContextMenuInfo info =
|
AdapterView.AdapterContextMenuInfo info =
|
||||||
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
||||||
contextPosition = info.position;
|
contextPosition = info.position;
|
||||||
trackId = MyTracksList.this.listView.getAdapter().getItemId(
|
trackId = TrackList.this.listView.getAdapter().getItemId(
|
||||||
contextPosition);
|
contextPosition);
|
||||||
menu.add(0, MyTracksConstants.MENU_SHOW, 0,
|
menu.add(0, Constants.MENU_SHOW, 0,
|
||||||
R.string.tracklist_show_track);
|
R.string.tracklist_show_track);
|
||||||
menu.add(0, MyTracksConstants.MENU_EDIT, 0,
|
menu.add(0, Constants.MENU_EDIT, 0,
|
||||||
R.string.tracklist_edit_track);
|
R.string.tracklist_edit_track);
|
||||||
if (!MyTracks.getInstance().isRecording()
|
if (!isRecording() || trackId != recordingTrackId) {
|
||||||
|| trackId != recordingTrackId) {
|
menu.add(0, Constants.MENU_SEND_TO_GOOGLE, 0,
|
||||||
menu.add(0, MyTracksConstants.MENU_SEND_TO_GOOGLE, 0,
|
|
||||||
R.string.tracklist_send_to_google);
|
R.string.tracklist_send_to_google);
|
||||||
SubMenu share = menu.addSubMenu(0, MyTracksConstants.MENU_SHARE, 0,
|
SubMenu share = menu.addSubMenu(0, Constants.MENU_SHARE, 0,
|
||||||
R.string.tracklist_share_track);
|
R.string.tracklist_share_track);
|
||||||
share.add(0, MyTracksConstants.MENU_SHARE_LINK, 0,
|
share.add(0, Constants.MENU_SHARE_LINK, 0,
|
||||||
R.string.tracklist_share_link);
|
R.string.tracklist_share_link);
|
||||||
share.add(0, MyTracksConstants.MENU_SHARE_GPX_FILE, 0,
|
share.add(0, Constants.MENU_SHARE_GPX_FILE, 0,
|
||||||
R.string.tracklist_share_gpx_file);
|
R.string.tracklist_share_gpx_file);
|
||||||
share.add(0, MyTracksConstants.MENU_SHARE_KML_FILE, 0,
|
share.add(0, Constants.MENU_SHARE_KML_FILE, 0,
|
||||||
R.string.tracklist_share_kml_file);
|
R.string.tracklist_share_kml_file);
|
||||||
share.add(0, MyTracksConstants.MENU_SHARE_CSV_FILE, 0,
|
share.add(0, Constants.MENU_SHARE_CSV_FILE, 0,
|
||||||
R.string.tracklist_share_csv_file);
|
R.string.tracklist_share_csv_file);
|
||||||
share.add(0, MyTracksConstants.MENU_SHARE_TCX_FILE, 0,
|
share.add(0, Constants.MENU_SHARE_TCX_FILE, 0,
|
||||||
R.string.tracklist_share_tcx_file);
|
R.string.tracklist_share_tcx_file);
|
||||||
SubMenu save = menu.addSubMenu(0,
|
SubMenu save = menu.addSubMenu(0,
|
||||||
MyTracksConstants.MENU_WRITE_TO_SD_CARD, 0,
|
Constants.MENU_WRITE_TO_SD_CARD, 0,
|
||||||
R.string.tracklist_write_to_sd);
|
R.string.tracklist_write_to_sd);
|
||||||
save.add(0, MyTracksConstants.MENU_SAVE_GPX_FILE, 0,
|
save.add(0, Constants.MENU_SAVE_GPX_FILE, 0,
|
||||||
R.string.tracklist_save_as_gpx);
|
R.string.tracklist_save_as_gpx);
|
||||||
save.add(0, MyTracksConstants.MENU_SAVE_KML_FILE, 0,
|
save.add(0, Constants.MENU_SAVE_KML_FILE, 0,
|
||||||
R.string.tracklist_save_as_kml);
|
R.string.tracklist_save_as_kml);
|
||||||
save.add(0, MyTracksConstants.MENU_SAVE_CSV_FILE, 0,
|
save.add(0, Constants.MENU_SAVE_CSV_FILE, 0,
|
||||||
R.string.tracklist_save_as_csv);
|
R.string.tracklist_save_as_csv);
|
||||||
save.add(0, MyTracksConstants.MENU_SAVE_TCX_FILE, 0,
|
save.add(0, Constants.MENU_SAVE_TCX_FILE, 0,
|
||||||
R.string.tracklist_save_as_tcx);
|
R.string.tracklist_save_as_tcx);
|
||||||
menu.add(0, MyTracksConstants.MENU_DELETE, 0,
|
menu.add(0, Constants.MENU_DELETE, 0,
|
||||||
R.string.tracklist_delete_track);
|
R.string.tracklist_delete_track);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private final Runnable serviceBindingChanged = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
updateButtonsEnabled();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private TrackRecordingServiceConnection serviceConnection;
|
||||||
|
private SharedPreferences preferences;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSharedPreferenceChanged(
|
public void onSharedPreferenceChanged(
|
||||||
SharedPreferences sharedPreferences, String key) {
|
SharedPreferences sharedPreferences, String key) {
|
||||||
@@ -132,45 +150,61 @@ public class MyTracksList extends ListActivity
|
|||||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||||
Intent result = new Intent();
|
Intent result = new Intent();
|
||||||
result.putExtra("trackid", id);
|
result.putExtra("trackid", id);
|
||||||
setResult(MyTracksConstants.SHOW_TRACK, result);
|
setResult(Constants.SHOW_TRACK, result);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
||||||
if (!super.onMenuItemSelected(featureId, item)) {
|
switch (item.getItemId()) {
|
||||||
switch (item.getItemId()) {
|
case Constants.MENU_SHOW: {
|
||||||
case MyTracksConstants.MENU_SHOW: {
|
onListItemClick(null, null, 0, trackId);
|
||||||
onListItemClick(null, null, 0, trackId);
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case MyTracksConstants.MENU_EDIT: {
|
|
||||||
Intent intent = new Intent(this, MyTracksDetails.class);
|
|
||||||
intent.putExtra("trackid", trackId);
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case MyTracksConstants.MENU_SHARE:
|
|
||||||
case MyTracksConstants.MENU_WRITE_TO_SD_CARD:
|
|
||||||
return false;
|
|
||||||
default: {
|
|
||||||
Intent result = new Intent();
|
|
||||||
result.putExtra("trackid", trackId);
|
|
||||||
setResult(
|
|
||||||
MyTracksConstants.getActionFromMenuId(item.getItemId()), result);
|
|
||||||
finish();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
case Constants.MENU_EDIT: {
|
||||||
|
Intent intent = new Intent(this, TrackDetails.class);
|
||||||
|
intent.putExtra("trackid", trackId);
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
case Constants.MENU_SHARE:
|
||||||
|
case Constants.MENU_WRITE_TO_SD_CARD:
|
||||||
|
return false;
|
||||||
|
case Constants.MENU_SEND_TO_GOOGLE:
|
||||||
|
SendActivity.sendToGoogle(this, trackId, false);
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_SHARE_LINK:
|
||||||
|
SendActivity.sendToGoogle(this, trackId, true);
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_SAVE_GPX_FILE:
|
||||||
|
case Constants.MENU_SAVE_KML_FILE:
|
||||||
|
case Constants.MENU_SAVE_CSV_FILE:
|
||||||
|
case Constants.MENU_SAVE_TCX_FILE:
|
||||||
|
case Constants.MENU_SHARE_GPX_FILE:
|
||||||
|
case Constants.MENU_SHARE_KML_FILE:
|
||||||
|
case Constants.MENU_SHARE_CSV_FILE:
|
||||||
|
case Constants.MENU_SHARE_TCX_FILE:
|
||||||
|
SaveActivity.handleExportTrackAction(this, trackId,
|
||||||
|
Constants.getActionFromMenuId(item.getItemId()));
|
||||||
|
return true;
|
||||||
|
case Constants.MENU_DELETE: {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_DELETE);
|
||||||
|
Uri uri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, trackId);
|
||||||
|
intent.setDataAndType(uri, TracksColumns.CONTENT_ITEMTYPE);
|
||||||
|
startActivity(intent);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
Log.w(TAG, "Unknown menu item: " + item.getItemId() + "(" + item.getTitle() + ")");
|
||||||
|
return super.onMenuItemSelected(featureId, item);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.tracklist_btn_delete_all: {
|
case R.id.tracklist_btn_delete_all: {
|
||||||
Handler h = new MyTracksDeleteAllTracks(this, null);
|
Handler h = new DeleteAllTracks(this, null);
|
||||||
h.handleMessage(null);
|
h.handleMessage(null);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -197,12 +231,19 @@ public class MyTracksList extends ListActivity
|
|||||||
listView = getListView();
|
listView = getListView();
|
||||||
listView.setOnCreateContextMenuListener(contextMenuListener);
|
listView.setOnCreateContextMenuListener(contextMenuListener);
|
||||||
|
|
||||||
findViewById(R.id.tracklist_btn_delete_all).setOnClickListener(this);
|
preferences = getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
findViewById(R.id.tracklist_btn_export_all).setOnClickListener(this);
|
serviceConnection = new TrackRecordingServiceConnection(this, serviceBindingChanged);
|
||||||
|
|
||||||
|
View deleteAll = findViewById(R.id.tracklist_btn_delete_all);
|
||||||
|
deleteAll.setOnClickListener(this);
|
||||||
|
|
||||||
|
View exportAll = findViewById(R.id.tracklist_btn_export_all);
|
||||||
|
exportAll.setOnClickListener(this);
|
||||||
|
|
||||||
|
updateButtonsEnabled();
|
||||||
|
|
||||||
findViewById(R.id.tracklist_btn_import_all).setOnClickListener(this);
|
findViewById(R.id.tracklist_btn_import_all).setOnClickListener(this);
|
||||||
|
|
||||||
SharedPreferences preferences =
|
|
||||||
getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
|
||||||
preferences.registerOnSharedPreferenceChangeListener(this);
|
preferences.registerOnSharedPreferenceChangeListener(this);
|
||||||
metricUnits =
|
metricUnits =
|
||||||
preferences.getBoolean(getString(R.string.metric_units_key), true);
|
preferences.getBoolean(getString(R.string.metric_units_key), true);
|
||||||
@@ -215,6 +256,29 @@ public class MyTracksList extends ListActivity
|
|||||||
setListAdapter();
|
setListAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
|
||||||
|
serviceConnection.bindIfRunning();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
serviceConnection.unbind();
|
||||||
|
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateButtonsEnabled() {
|
||||||
|
View deleteAll = findViewById(R.id.tracklist_btn_delete_all);
|
||||||
|
View exportAll = findViewById(R.id.tracklist_btn_export_all);
|
||||||
|
|
||||||
|
boolean notRecording = !isRecording();
|
||||||
|
deleteAll.setEnabled(notRecording);
|
||||||
|
exportAll.setEnabled(notRecording);
|
||||||
|
}
|
||||||
|
|
||||||
private void setListAdapter() {
|
private void setListAdapter() {
|
||||||
// Get a cursor with all tracks
|
// Get a cursor with all tracks
|
||||||
SimpleCursorAdapter adapter = new SimpleCursorAdapter(
|
SimpleCursorAdapter adapter = new SimpleCursorAdapter(
|
||||||
@@ -278,4 +342,8 @@ public class MyTracksList extends ListActivity
|
|||||||
});
|
});
|
||||||
setListAdapter(adapter);
|
setListAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isRecording() {
|
||||||
|
return ServiceUtils.isRecording(TrackList.this, serviceConnection.getServiceIfBound(), preferences);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+5
-3
@@ -28,6 +28,7 @@ import android.os.Bundle;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.AutoCompleteTextView;
|
import android.widget.AutoCompleteTextView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -39,7 +40,7 @@ import android.widget.ImageView;
|
|||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksWaypointDetails extends Activity
|
public class WaypointDetails extends Activity
|
||||||
implements OnClickListener {
|
implements OnClickListener {
|
||||||
|
|
||||||
public static final String WAYPOINT_ID_EXTRA = "com.google.android.apps.mytracks.WAYPOINT_ID";
|
public static final String WAYPOINT_ID_EXTRA = "com.google.android.apps.mytracks.WAYPOINT_ID";
|
||||||
@@ -65,7 +66,7 @@ public class MyTracksWaypointDetails extends Activity
|
|||||||
|
|
||||||
utils = new StatsUtilities(this);
|
utils = new StatsUtilities(this);
|
||||||
SharedPreferences preferences =
|
SharedPreferences preferences =
|
||||||
getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
if (preferences != null) {
|
if (preferences != null) {
|
||||||
boolean useMetric =
|
boolean useMetric =
|
||||||
preferences.getBoolean(getString(R.string.metric_units_key), true);
|
preferences.getBoolean(getString(R.string.metric_units_key), true);
|
||||||
@@ -82,7 +83,7 @@ public class MyTracksWaypointDetails extends Activity
|
|||||||
// Required extra when launching this intent:
|
// Required extra when launching this intent:
|
||||||
waypointId = getIntent().getLongExtra(WAYPOINT_ID_EXTRA, -1);
|
waypointId = getIntent().getLongExtra(WAYPOINT_ID_EXTRA, -1);
|
||||||
if (waypointId < 0) {
|
if (waypointId < 0) {
|
||||||
Log.d(MyTracksConstants.TAG,
|
Log.d(Constants.TAG,
|
||||||
"MyTracksWaypointsDetails intent was launched w/o waypoint id.");
|
"MyTracksWaypointsDetails intent was launched w/o waypoint id.");
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
@@ -139,6 +140,7 @@ public class MyTracksWaypointDetails extends Activity
|
|||||||
utils.setAllStats(waypointStats);
|
utils.setAllStats(waypointStats);
|
||||||
utils.setAltitude(
|
utils.setAltitude(
|
||||||
R.id.elevation_register, waypoint.getLocation().getAltitude());
|
R.id.elevation_register, waypoint.getLocation().getAltitude());
|
||||||
|
name.setImeOptions(EditorInfo.IME_ACTION_DONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
icon.setImageDrawable(getResources().getDrawable(iconId));
|
icon.setImageDrawable(getResources().getDrawable(iconId));
|
||||||
+97
-52
@@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009 Google Inc.
|
* Copyright 2009 Google Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
* use this file except in compliance with the License. You may obtain a copy of
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
* the License at
|
* the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
@@ -15,10 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
|
||||||
import com.google.android.apps.mytracks.content.Waypoint;
|
import com.google.android.apps.mytracks.content.Waypoint;
|
||||||
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
|
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
|
||||||
import com.google.android.apps.mytracks.content.WaypointsColumns;
|
import com.google.android.apps.mytracks.content.WaypointsColumns;
|
||||||
|
import com.google.android.apps.mytracks.services.ITrackRecordingService;
|
||||||
|
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
|
||||||
import com.google.android.apps.mytracks.util.StringUtils;
|
import com.google.android.apps.mytracks.util.StringUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
@@ -43,24 +47,25 @@ import android.widget.ImageView;
|
|||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.SimpleCursorAdapter;
|
import android.widget.SimpleCursorAdapter;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Activity which shows the list of waypoints in a track.
|
* Activity which shows the list of waypoints in a track.
|
||||||
*
|
*
|
||||||
* @author Leif Hendrik Wilden
|
* @author Leif Hendrik Wilden
|
||||||
*/
|
*/
|
||||||
public class MyTracksWaypointsList extends ListActivity
|
public class WaypointsList extends ListActivity
|
||||||
implements View.OnClickListener {
|
implements View.OnClickListener {
|
||||||
|
|
||||||
private int contextPosition = -1;
|
private int contextPosition = -1;
|
||||||
private long trackId = -1;
|
private long trackId = -1;
|
||||||
private long waypointId = -1;
|
private long selectedWaypointId = -1;
|
||||||
private ListView listView = null;
|
private ListView listView = null;
|
||||||
private Button insertWaypointButton = null;
|
private Button insertWaypointButton = null;
|
||||||
private Button insertStatisticsButton = null;
|
private Button insertStatisticsButton = null;
|
||||||
private long recordingTrackId = -1;
|
private long recordingTrackId = -1;
|
||||||
private long selectedTrackId = -1;
|
|
||||||
private MyTracksProviderUtils providerUtils;
|
private MyTracksProviderUtils providerUtils;
|
||||||
|
private TrackRecordingServiceConnection serviceConnection;
|
||||||
|
|
||||||
private Cursor waypointsCursor = null;
|
private Cursor waypointsCursor = null;
|
||||||
|
|
||||||
@@ -72,57 +77,65 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
AdapterView.AdapterContextMenuInfo info =
|
AdapterView.AdapterContextMenuInfo info =
|
||||||
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
(AdapterView.AdapterContextMenuInfo) menuInfo;
|
||||||
contextPosition = info.position;
|
contextPosition = info.position;
|
||||||
waypointId = MyTracksWaypointsList.this.listView.getAdapter()
|
selectedWaypointId = WaypointsList.this.listView.getAdapter()
|
||||||
.getItemId(contextPosition);
|
.getItemId(contextPosition);
|
||||||
int type = providerUtils.getWaypoint(info.id).getType();
|
Waypoint waypoint = providerUtils.getWaypoint(info.id);
|
||||||
menu.add(0, MyTracksConstants.MENU_SHOW, 0,
|
if (waypoint != null) {
|
||||||
R.string.waypointslist_show_waypoint);
|
int type = waypoint.getType();
|
||||||
menu.add(0, MyTracksConstants.MENU_EDIT, 0,
|
menu.add(0, Constants.MENU_SHOW, 0,
|
||||||
R.string.waypointslist_edit_waypoint);
|
R.string.waypointslist_show_waypoint);
|
||||||
menu.add(0, MyTracksConstants.MENU_DELETE, 0,
|
menu.add(0, Constants.MENU_EDIT, 0,
|
||||||
R.string.waypointslist_delete_waypoint).setEnabled(
|
R.string.waypointslist_edit_waypoint);
|
||||||
recordingTrackId < 0 || type == Waypoint.TYPE_WAYPOINT ||
|
menu.add(0, Constants.MENU_DELETE, 0,
|
||||||
info.id != providerUtils.getLastWaypointId(recordingTrackId));
|
R.string.waypointslist_delete_waypoint).setEnabled(
|
||||||
|
recordingTrackId < 0 || type == Waypoint.TYPE_WAYPOINT ||
|
||||||
|
info.id != providerUtils.getLastWaypointId(recordingTrackId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onListItemClick(ListView l, View v, int position, long id) {
|
protected void onListItemClick(ListView l, View v, int position, long id) {
|
||||||
Intent result = new Intent();
|
editWaypoint(id);
|
||||||
result.putExtra("trackid", trackId);
|
|
||||||
result.putExtra(MyTracksWaypointDetails.WAYPOINT_ID_EXTRA, id);
|
|
||||||
setResult(MyTracksConstants.EDIT_WAYPOINT, result);
|
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
public boolean onMenuItemSelected(int featureId, MenuItem item) {
|
||||||
if (!super.onMenuItemSelected(featureId, item)) {
|
if (!super.onMenuItemSelected(featureId, item)) {
|
||||||
switch (item.getItemId()) {
|
switch (item.getItemId()) {
|
||||||
case MyTracksConstants.MENU_SHOW: {
|
case Constants.MENU_SHOW: {
|
||||||
onListItemClick(null, null, 0, waypointId);
|
Intent result = new Intent();
|
||||||
|
result.putExtra("trackid", trackId);
|
||||||
|
result.putExtra(WaypointDetails.WAYPOINT_ID_EXTRA, selectedWaypointId);
|
||||||
|
setResult(RESULT_OK, result);
|
||||||
|
finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case MyTracksConstants.MENU_EDIT: {
|
case Constants.MENU_EDIT: {
|
||||||
Intent intent = new Intent(this, MyTracksWaypointDetails.class);
|
editWaypoint(selectedWaypointId);
|
||||||
intent.putExtra("trackid", trackId);
|
|
||||||
intent.putExtra(MyTracksWaypointDetails.WAYPOINT_ID_EXTRA, waypointId);
|
|
||||||
startActivity(intent);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case MyTracksConstants.MENU_DELETE: {
|
case Constants.MENU_DELETE: {
|
||||||
deleteWaypoint(waypointId);
|
deleteWaypoint(selectedWaypointId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void editWaypoint(long waypointId) {
|
||||||
|
Intent intent = new Intent(this, WaypointDetails.class);
|
||||||
|
intent.putExtra("trackid", trackId);
|
||||||
|
intent.putExtra(WaypointDetails.WAYPOINT_ID_EXTRA, waypointId);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
providerUtils = MyTracksProviderUtils.Factory.get(this);
|
providerUtils = MyTracksProviderUtils.Factory.get(this);
|
||||||
|
serviceConnection = new TrackRecordingServiceConnection(this, null);
|
||||||
|
|
||||||
// We don't need a window title bar:
|
// We don't need a window title bar:
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||||
@@ -139,7 +152,10 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
(Button) findViewById(R.id.waypointslist_btn_insert_statistics);
|
(Button) findViewById(R.id.waypointslist_btn_insert_statistics);
|
||||||
insertStatisticsButton.setOnClickListener(this);
|
insertStatisticsButton.setOnClickListener(this);
|
||||||
SharedPreferences preferences =
|
SharedPreferences preferences =
|
||||||
getSharedPreferences(MyTracksSettings.SETTINGS_NAME, 0);
|
getSharedPreferences(Constants.SETTINGS_NAME, 0);
|
||||||
|
|
||||||
|
// TODO: Get rid of selected and recording track IDs
|
||||||
|
long selectedTrackId = -1;
|
||||||
if (preferences != null) {
|
if (preferences != null) {
|
||||||
recordingTrackId =
|
recordingTrackId =
|
||||||
preferences.getLong(getString(R.string.recording_track_key), -1);
|
preferences.getLong(getString(R.string.recording_track_key), -1);
|
||||||
@@ -157,7 +173,7 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
trackId = -1;
|
trackId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
final long firstWaypointId = providerUtils.getFirstWaypointId(trackId);
|
final long firstWaypointId = providerUtils.getFirstWaypointId(trackId);
|
||||||
waypointsCursor = getContentResolver().query(
|
waypointsCursor = getContentResolver().query(
|
||||||
WaypointsColumns.CONTENT_URI, null,
|
WaypointsColumns.CONTENT_URI, null,
|
||||||
WaypointsColumns.TRACKID + "=" + trackId + " AND "
|
WaypointsColumns.TRACKID + "=" + trackId + " AND "
|
||||||
@@ -166,6 +182,20 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
setListAdapter();
|
setListAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
|
||||||
|
serviceConnection.bindIfRunning();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
serviceConnection.unbind();
|
||||||
|
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
WaypointCreationRequest request;
|
WaypointCreationRequest request;
|
||||||
@@ -179,25 +209,40 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long id;
|
long id = insertWaypoint(request);
|
||||||
try {
|
|
||||||
id = MyTracks.getInstance().insertWaypoint(request);
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.e(MyTracksConstants.TAG, "Cannot insert marker.", e);
|
|
||||||
return;
|
|
||||||
} catch (IllegalStateException e) {
|
|
||||||
Log.e(MyTracksConstants.TAG, "Cannot insert marker.", e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
Log.e(MyTracksConstants.TAG, "Failed to insert marker.");
|
Toast.makeText(this, R.string.error_unable_to_insert_marker,
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
Log.e(Constants.TAG, "Failed to insert marker.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Intent intent = new Intent(this, MyTracksWaypointDetails.class);
|
Intent intent = new Intent(this, WaypointDetails.class);
|
||||||
intent.putExtra(MyTracksWaypointDetails.WAYPOINT_ID_EXTRA, id);
|
intent.putExtra(WaypointDetails.WAYPOINT_ID_EXTRA, id);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private long insertWaypoint(WaypointCreationRequest request) {
|
||||||
|
try {
|
||||||
|
ITrackRecordingService trackRecordingService = serviceConnection.getServiceIfBound();
|
||||||
|
if (trackRecordingService != null) {
|
||||||
|
long waypointId = trackRecordingService.insertWaypoint(request);
|
||||||
|
if (waypointId >= 0) {
|
||||||
|
Toast.makeText(this, R.string.status_statistics_inserted,
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
return waypointId;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, "Not connected to service, not inserting waypoint");
|
||||||
|
}
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
Log.e(Constants.TAG, "Cannot insert marker.", e);
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
Log.e(Constants.TAG, "Cannot insert marker.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
private void setListAdapter() {
|
private void setListAdapter() {
|
||||||
// Get a cursor with all tracks
|
// Get a cursor with all tracks
|
||||||
SimpleCursorAdapter adapter = new SimpleCursorAdapter(
|
SimpleCursorAdapter adapter = new SimpleCursorAdapter(
|
||||||
@@ -207,7 +252,7 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
new String[] { WaypointsColumns.NAME, WaypointsColumns.TIME,
|
new String[] { WaypointsColumns.NAME, WaypointsColumns.TIME,
|
||||||
WaypointsColumns.CATEGORY, WaypointsColumns.TYPE },
|
WaypointsColumns.CATEGORY, WaypointsColumns.TYPE },
|
||||||
new int[] { R.id.waypointslist_item_name,
|
new int[] { R.id.waypointslist_item_name,
|
||||||
R.id.waypointslist_item_time,
|
R.id.waypointslist_item_time,
|
||||||
R.id.waypointslist_item_category,
|
R.id.waypointslist_item_category,
|
||||||
R.id.waypointslist_item_icon });
|
R.id.waypointslist_item_icon });
|
||||||
|
|
||||||
@@ -217,7 +262,7 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
waypointsCursor.getColumnIndexOrThrow(WaypointsColumns.TYPE);
|
waypointsCursor.getColumnIndexOrThrow(WaypointsColumns.TYPE);
|
||||||
adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
|
adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
|
||||||
@Override
|
@Override
|
||||||
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
|
||||||
if (columnIndex == timeIdx) {
|
if (columnIndex == timeIdx) {
|
||||||
long time = cursor.getLong(timeIdx);
|
long time = cursor.getLong(timeIdx);
|
||||||
TextView textView = (TextView) view;
|
TextView textView = (TextView) view;
|
||||||
@@ -256,17 +301,17 @@ public class MyTracksWaypointsList extends ListActivity
|
|||||||
builder.setPositiveButton(getString(R.string.yes),
|
builder.setPositiveButton(getString(R.string.yes),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
dialog.dismiss();
|
dialogInterface.dismiss();
|
||||||
providerUtils.deleteWaypoint(waypointId,
|
providerUtils.deleteWaypoint(waypointId,
|
||||||
new StringUtils(MyTracksWaypointsList.this));
|
new StringUtils(WaypointsList.this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setNegativeButton(getString(R.string.no),
|
builder.setNegativeButton(getString(R.string.no),
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
dialog.dismiss();
|
dialogInterface.dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dialog = builder.create();
|
dialog = builder.create();
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.google.android.apps.mytracks;
|
package com.google.android.apps.mytracks;
|
||||||
|
|
||||||
import com.google.android.apps.mytracks.util.MyTracksUtils;
|
import com.google.android.apps.mytracks.util.SystemUtils;
|
||||||
import com.google.android.maps.mytracks.R;
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@@ -82,6 +82,6 @@ public class WelcomeActivity extends Activity {
|
|||||||
AlertDialog dialog = builder.create();
|
AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
((TextView) dialog.findViewById(R.id.about_version_register)).
|
((TextView) dialog.findViewById(R.id.about_version_register)).
|
||||||
setText(MyTracksUtils.getMyTracksVersion(this));
|
setText(SystemUtils.getMyTracksVersion(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,265 @@
|
|||||||
|
package com.google.android.apps.mytracks.content;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.TAG;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.content.TrackDataHub.ListenerDataType;
|
||||||
|
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
|
import android.database.ContentObserver;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorEvent;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
import android.location.Location;
|
||||||
|
import android.location.LocationListener;
|
||||||
|
import android.location.LocationManager;
|
||||||
|
import android.location.LocationProvider;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* External data source manager, which converts system-level events into My Tracks data events.
|
||||||
|
*
|
||||||
|
* @author Rodrigo Damazio
|
||||||
|
*/
|
||||||
|
class DataSourceManager {
|
||||||
|
|
||||||
|
/** Single interface for receiving system events that were registered for. */
|
||||||
|
interface DataSourceListener {
|
||||||
|
void notifyTrackUpdated();
|
||||||
|
void notifyWaypointUpdated();
|
||||||
|
void notifyPointsUpdated();
|
||||||
|
void notifyPreferenceChanged(String key);
|
||||||
|
void notifyLocationProviderEnabled(boolean enabled);
|
||||||
|
void notifyLocationProviderAvailable(boolean available);
|
||||||
|
void notifyLocationChanged(Location loc);
|
||||||
|
void notifyHeadingChanged(float heading);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final DataSourceListener listener;
|
||||||
|
|
||||||
|
/** Observer for when the tracks table is updated. */
|
||||||
|
private class TrackObserver extends ContentObserver {
|
||||||
|
public TrackObserver() {
|
||||||
|
super(contentHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChange(boolean selfChange) {
|
||||||
|
listener.notifyTrackUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Observer for when the waypoints table is updated. */
|
||||||
|
private class WaypointObserver extends ContentObserver {
|
||||||
|
public WaypointObserver() {
|
||||||
|
super(contentHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChange(boolean selfChange) {
|
||||||
|
listener.notifyWaypointUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Observer for when the points table is updated. */
|
||||||
|
private class PointObserver extends ContentObserver {
|
||||||
|
public PointObserver() {
|
||||||
|
super(contentHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onChange(boolean selfChange) {
|
||||||
|
listener.notifyPointsUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Listener for when preferences change. */
|
||||||
|
private class HubSharedPreferenceListener implements OnSharedPreferenceChangeListener {
|
||||||
|
@Override
|
||||||
|
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||||
|
listener.notifyPreferenceChanged(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Listener for the current location (independent from track data). */
|
||||||
|
private class CurrentLocationListener implements
|
||||||
|
LocationListener {
|
||||||
|
@Override
|
||||||
|
public void onStatusChanged(String provider, int status, Bundle extras) {
|
||||||
|
if (!LocationManager.GPS_PROVIDER.equals(provider)) return;
|
||||||
|
|
||||||
|
listener.notifyLocationProviderAvailable(status == LocationProvider.AVAILABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProviderEnabled(String provider) {
|
||||||
|
if (!LocationManager.GPS_PROVIDER.equals(provider)) return;
|
||||||
|
|
||||||
|
listener.notifyLocationProviderEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onProviderDisabled(String provider) {
|
||||||
|
if (!LocationManager.GPS_PROVIDER.equals(provider)) return;
|
||||||
|
|
||||||
|
listener.notifyLocationProviderEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLocationChanged(Location location) {
|
||||||
|
listener.notifyLocationChanged(location);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Listener for compass readings. */
|
||||||
|
private class CompassListener implements
|
||||||
|
SensorEventListener {
|
||||||
|
@Override
|
||||||
|
public void onSensorChanged(SensorEvent event) {
|
||||||
|
listener.notifyHeadingChanged(event.values[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Wrapper for registering internal listeners. */
|
||||||
|
private final DataSourcesWrapper dataSources;
|
||||||
|
|
||||||
|
// Internal listeners (to receive data from the system)
|
||||||
|
private final Set<ListenerDataType> registeredListeners =
|
||||||
|
EnumSet.noneOf(ListenerDataType.class);
|
||||||
|
private final Handler contentHandler;
|
||||||
|
private final ContentObserver pointObserver;
|
||||||
|
private final ContentObserver waypointObserver;
|
||||||
|
private final ContentObserver trackObserver;
|
||||||
|
private final LocationListener locationListener;
|
||||||
|
private final OnSharedPreferenceChangeListener preferenceListener;
|
||||||
|
private final SensorEventListener compassListener;
|
||||||
|
|
||||||
|
DataSourceManager(DataSourceListener listener, DataSourcesWrapper dataSources) {
|
||||||
|
this.listener = listener;
|
||||||
|
this.dataSources = dataSources;
|
||||||
|
|
||||||
|
contentHandler = new Handler();
|
||||||
|
pointObserver = new PointObserver();
|
||||||
|
waypointObserver = new WaypointObserver();
|
||||||
|
trackObserver = new TrackObserver();
|
||||||
|
|
||||||
|
compassListener = new CompassListener();
|
||||||
|
locationListener = new CurrentLocationListener();
|
||||||
|
preferenceListener = new HubSharedPreferenceListener();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Updates the internal (sensor, position, etc) listeners. */
|
||||||
|
void updateAllListeners(EnumSet<ListenerDataType> externallyNeededListeners) {
|
||||||
|
EnumSet<ListenerDataType> neededListeners = EnumSet.copyOf(externallyNeededListeners);
|
||||||
|
|
||||||
|
// Special case - map sampled-out points type to points type since they
|
||||||
|
// correspond to the same internal listener.
|
||||||
|
if (neededListeners.contains(ListenerDataType.SAMPLED_OUT_POINT_UPDATES)) {
|
||||||
|
neededListeners.remove(ListenerDataType.SAMPLED_OUT_POINT_UPDATES);
|
||||||
|
neededListeners.add(ListenerDataType.POINT_UPDATES);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.d(TAG, "Updating internal listeners to types " + neededListeners);
|
||||||
|
|
||||||
|
// Unnecessary = registered - needed
|
||||||
|
Set<ListenerDataType> unnecessaryListeners = EnumSet.copyOf(registeredListeners);
|
||||||
|
unnecessaryListeners.removeAll(neededListeners);
|
||||||
|
|
||||||
|
// Missing = needed - registered
|
||||||
|
Set<ListenerDataType> missingListeners = EnumSet.copyOf(neededListeners);
|
||||||
|
missingListeners.removeAll(registeredListeners);
|
||||||
|
|
||||||
|
// Remove all unnecessary listeners.
|
||||||
|
for (ListenerDataType type : unnecessaryListeners) {
|
||||||
|
unregisterListener(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add all missing listeners.
|
||||||
|
for (ListenerDataType type : missingListeners) {
|
||||||
|
registerListener(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now all needed types are registered.
|
||||||
|
registeredListeners.clear();
|
||||||
|
registeredListeners.addAll(neededListeners);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerListener(ListenerDataType type) {
|
||||||
|
switch (type) {
|
||||||
|
case COMPASS_UPDATES: {
|
||||||
|
// Listen to compass
|
||||||
|
Sensor compass = dataSources.getSensor(Sensor.TYPE_ORIENTATION);
|
||||||
|
if (compass != null) {
|
||||||
|
Log.d(TAG, "TrackDataHub: Now registering sensor listener.");
|
||||||
|
dataSources.registerSensorListener(compassListener, compass, SensorManager.SENSOR_DELAY_UI);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LOCATION_UPDATES:
|
||||||
|
dataSources.requestLocationUpdates(locationListener);
|
||||||
|
break;
|
||||||
|
case POINT_UPDATES:
|
||||||
|
dataSources.registerContentObserver(
|
||||||
|
TrackPointsColumns.CONTENT_URI, false, pointObserver);
|
||||||
|
break;
|
||||||
|
case TRACK_UPDATES:
|
||||||
|
dataSources.registerContentObserver(TracksColumns.CONTENT_URI, false, trackObserver);
|
||||||
|
break;
|
||||||
|
case WAYPOINT_UPDATES:
|
||||||
|
dataSources.registerContentObserver(
|
||||||
|
WaypointsColumns.CONTENT_URI, false, waypointObserver);
|
||||||
|
break;
|
||||||
|
case DISPLAY_PREFERENCES:
|
||||||
|
dataSources.registerOnSharedPreferenceChangeListener(preferenceListener);
|
||||||
|
break;
|
||||||
|
case SAMPLED_OUT_POINT_UPDATES:
|
||||||
|
throw new IllegalArgumentException("Should have been mapped to point updates");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void unregisterListener(ListenerDataType type) {
|
||||||
|
switch (type) {
|
||||||
|
case COMPASS_UPDATES:
|
||||||
|
dataSources.unregisterSensorListener(compassListener);
|
||||||
|
break;
|
||||||
|
case LOCATION_UPDATES:
|
||||||
|
dataSources.removeLocationUpdates(locationListener);
|
||||||
|
break;
|
||||||
|
case POINT_UPDATES:
|
||||||
|
dataSources.unregisterContentObserver(pointObserver);
|
||||||
|
break;
|
||||||
|
case TRACK_UPDATES:
|
||||||
|
dataSources.unregisterContentObserver(trackObserver);
|
||||||
|
break;
|
||||||
|
case WAYPOINT_UPDATES:
|
||||||
|
dataSources.unregisterContentObserver(waypointObserver);
|
||||||
|
break;
|
||||||
|
case DISPLAY_PREFERENCES:
|
||||||
|
dataSources.unregisterOnSharedPreferenceChangeListener(preferenceListener);
|
||||||
|
break;
|
||||||
|
case SAMPLED_OUT_POINT_UPDATES:
|
||||||
|
throw new IllegalArgumentException("Should have been mapped to point updates");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Unregisters all internal (sensor, position, etc.) listeners. */
|
||||||
|
void unregisterAllListeners() {
|
||||||
|
dataSources.removeLocationUpdates(locationListener);
|
||||||
|
dataSources.unregisterSensorListener(compassListener);
|
||||||
|
dataSources.unregisterContentObserver(trackObserver);
|
||||||
|
dataSources.unregisterContentObserver(waypointObserver);
|
||||||
|
dataSources.unregisterContentObserver(pointObserver);
|
||||||
|
dataSources.unregisterOnSharedPreferenceChangeListener(preferenceListener);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2011 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks.content;
|
||||||
|
|
||||||
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
|
import android.database.ContentObserver;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.location.Location;
|
||||||
|
import android.location.LocationListener;
|
||||||
|
import android.net.Uri;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for abstracting registration of external data source listeners.
|
||||||
|
*
|
||||||
|
* @author Rodrigo Damazio
|
||||||
|
*/
|
||||||
|
interface DataSourcesWrapper {
|
||||||
|
// Preferences
|
||||||
|
void registerOnSharedPreferenceChangeListener(
|
||||||
|
OnSharedPreferenceChangeListener listener);
|
||||||
|
void unregisterOnSharedPreferenceChangeListener(
|
||||||
|
OnSharedPreferenceChangeListener listener);
|
||||||
|
|
||||||
|
// Content provider
|
||||||
|
void registerContentObserver(Uri contentUri, boolean descendents,
|
||||||
|
ContentObserver observer);
|
||||||
|
void unregisterContentObserver(ContentObserver observer);
|
||||||
|
|
||||||
|
// Sensors
|
||||||
|
Sensor getSensor(int type);
|
||||||
|
void registerSensorListener(SensorEventListener listener,
|
||||||
|
Sensor sensor, int sensorDelay);
|
||||||
|
void unregisterSensorListener(SensorEventListener listener);
|
||||||
|
|
||||||
|
// Location
|
||||||
|
boolean isLocationProviderEnabled(String provider);
|
||||||
|
void requestLocationUpdates(LocationListener listener);
|
||||||
|
void removeLocationUpdates(LocationListener listener);
|
||||||
|
Location getLastKnownLocation();
|
||||||
|
}
|
||||||
@@ -0,0 +1,166 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2011 Google Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
|
* use this file except in compliance with the License. You may obtain a copy of
|
||||||
|
* the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations under
|
||||||
|
* the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.apps.mytracks.content;
|
||||||
|
|
||||||
|
import static com.google.android.apps.mytracks.Constants.MAX_LOCATION_AGE_MS;
|
||||||
|
import static com.google.android.apps.mytracks.Constants.MAX_NETWORK_AGE_MS;
|
||||||
|
|
||||||
|
import com.google.android.apps.mytracks.Constants;
|
||||||
|
import com.google.android.maps.mytracks.R;
|
||||||
|
|
||||||
|
import android.content.ContentResolver;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
|
||||||
|
import android.database.ContentObserver;
|
||||||
|
import android.hardware.Sensor;
|
||||||
|
import android.hardware.SensorEventListener;
|
||||||
|
import android.hardware.SensorManager;
|
||||||
|
import android.location.Location;
|
||||||
|
import android.location.LocationListener;
|
||||||
|
import android.location.LocationManager;
|
||||||
|
import android.location.LocationProvider;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Real implementation of the data sources, which talks to system services.
|
||||||
|
*
|
||||||
|
* @author Rodrigo Damazio
|
||||||
|
*/
|
||||||
|
class DataSourcesWrapperImpl implements DataSourcesWrapper {
|
||||||
|
// System services
|
||||||
|
private final SensorManager sensorManager;
|
||||||
|
private final LocationManager locationManager;
|
||||||
|
private final ContentResolver contentResolver;
|
||||||
|
private final SharedPreferences sharedPreferences;
|
||||||
|
private final Context context;
|
||||||
|
|
||||||
|
DataSourcesWrapperImpl(Context context, SharedPreferences sharedPreferences) {
|
||||||
|
this.context = context;
|
||||||
|
this.sensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||||
|
this.locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
|
||||||
|
this.contentResolver = context.getContentResolver();
|
||||||
|
this.sharedPreferences = sharedPreferences;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerOnSharedPreferenceChangeListener(
|
||||||
|
OnSharedPreferenceChangeListener listener) {
|
||||||
|
sharedPreferences.registerOnSharedPreferenceChangeListener(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterOnSharedPreferenceChangeListener(
|
||||||
|
OnSharedPreferenceChangeListener listener) {
|
||||||
|
sharedPreferences.unregisterOnSharedPreferenceChangeListener(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerContentObserver(Uri contentUri, boolean descendents,
|
||||||
|
ContentObserver observer) {
|
||||||
|
contentResolver.registerContentObserver(contentUri, descendents, observer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterContentObserver(ContentObserver observer) {
|
||||||
|
contentResolver.unregisterContentObserver(observer);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sensor getSensor(int type) {
|
||||||
|
return sensorManager.getDefaultSensor(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerSensorListener(SensorEventListener listener,
|
||||||
|
Sensor sensor, int sensorDelay) {
|
||||||
|
sensorManager.registerListener(listener, sensor, sensorDelay);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void unregisterSensorListener(SensorEventListener listener) {
|
||||||
|
sensorManager.unregisterListener(listener);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isLocationProviderEnabled(String provider) {
|
||||||
|
return locationManager.isProviderEnabled(provider);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void requestLocationUpdates(LocationListener listener) {
|
||||||
|
// Check if the provider exists.
|
||||||
|
LocationProvider gpsProvider = locationManager.getProvider(LocationManager.GPS_PROVIDER);
|
||||||
|
if (gpsProvider == null) {
|
||||||
|
listener.onProviderDisabled(LocationManager.GPS_PROVIDER);
|
||||||
|
locationManager.removeUpdates(listener);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Listen to GPS location.
|
||||||
|
String providerName = gpsProvider.getName();
|
||||||
|
Log.d(Constants.TAG, "TrackDataHub: Using location provider " + providerName);
|
||||||
|
locationManager.requestLocationUpdates(providerName,
|
||||||
|
0 /*minTime*/, 0 /*minDist*/, listener);
|
||||||
|
|
||||||
|
// Give an initial update on provider state.
|
||||||
|
if (locationManager.isProviderEnabled(providerName)) {
|
||||||
|
listener.onProviderEnabled(providerName);
|
||||||
|
} else {
|
||||||
|
listener.onProviderDisabled(providerName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Listen to network location
|
||||||
|
try {
|
||||||
|
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
|
||||||
|
1000 * 60 * 5 /*minTime*/, 0 /*minDist*/, listener);
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
// If anything at all goes wrong with getting a cell location do not
|
||||||
|
// abort. Cell location is not essential to this app.
|
||||||
|
Log.w(Constants.TAG, "Could not register network location listener.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Location getLastKnownLocation() {
|
||||||
|
// TODO: Let's look at more advanced algorithms to determine the best
|
||||||
|
// current location.
|
||||||
|
|
||||||
|
Location loc = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
|
||||||
|
final long now = System.currentTimeMillis();
|
||||||
|
if (loc == null || loc.getTime() < now - MAX_LOCATION_AGE_MS) {
|
||||||
|
// We don't have a recent GPS fix, just use cell towers if available
|
||||||
|
loc = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
|
||||||
|
|
||||||
|
int toastResId = R.string.status_approximate_location;
|
||||||
|
if (loc == null || loc.getTime() < now - MAX_NETWORK_AGE_MS) {
|
||||||
|
// We don't have a recent cell tower location, let the user know:
|
||||||
|
toastResId = R.string.status_no_location;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let the user know we have only an approximate location:
|
||||||
|
Toast.makeText(context, context.getString(toastResId), Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
return loc;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeLocationUpdates(LocationListener listener) {
|
||||||
|
locationManager.removeUpdates(listener);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user