{"id":150715,"date":"2024-11-01T16:38:20","date_gmt":"2024-11-01T08:38:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/150715\/"},"modified":"2024-11-01T16:38:21","modified_gmt":"2024-11-01T08:38:21","slug":"%e5%ae%89%e5%8d%93%e6%95%b8%e6%93%9a%e5%ba%ab%e5%a4%a7%e5%b0%8f%e9%81%b8%e5%a4%9a%e5%a4%a7%e6%9c%80%e5%90%88%e9%81%a9%ef%bc%9f-android%e6%95%b8%e6%93%9a%e5%ba%ab%e5%a4%9a%e5%a4%a7%e5%90%88%e9%81%a9","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/150715\/","title":{"rendered":"\u5b89\u5353\u6578\u64da\u5eab\u5927\u5c0f\u9078\u591a\u5927\u6700\u5408\u9069\uff1f (android\u6578\u64da\u5eab\u591a\u5927\u5408\u9069)"},"content":{"rendered":"<h1 id=\"%e5%ae%89%e5%8d%93%e6%95%b8%e6%93%9a%e5%ba%ab%e5%a4%a7%e5%b0%8f%e9%81%b8%e5%a4%9a%e5%a4%a7%e6%9c%80%e5%90%88%e9%81%a9%ef%bc%9f-lLjeXKnkvs\">\u5b89\u5353\u6578\u64da\u5eab\u5927\u5c0f\u9078\u591a\u5927\u6700\u5408\u9069\uff1f<\/h1>\n<p>\u5728\u958b\u767c\u5b89\u5353\u61c9\u7528\u7a0b\u5f0f\u6642\uff0c\u6578\u64da\u5eab\u7684\u9078\u64c7\u548c\u5927\u5c0f\u662f\u975e\u5e38\u91cd\u8981\u7684\u8003\u91cf\u56e0\u7d20\u3002\u6578\u64da\u5eab\u7684\u5927\u5c0f\u4e0d\u50c5\u5f71\u97ff\u61c9\u7528\u7684\u6027\u80fd\uff0c\u9084\u6703\u5f71\u97ff\u7528\u6236\u9ad4\u9a57\u548c\u8a2d\u5099\u7684\u5b58\u5132\u7a7a\u9593\u3002\u56e0\u6b64\uff0c\u4e86\u89e3\u5982\u4f55\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u5927\u5c0f\u5c0d\u65bc\u958b\u767c\u8005\u4f86\u8aaa\u81f3\u95dc\u91cd\u8981\u3002<\/p>\n<h2 id=\"%e5%ae%89%e5%8d%93%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e9%a1%9e%e5%9e%8b-lLjeXKnkvs\">\u5b89\u5353\u6578\u64da\u5eab\u7684\u985e\u578b<\/h2>\n<p>\u5728\u5b89\u5353\u5e73\u53f0\u4e0a\uff0c\u6700\u5e38\u7528\u7684\u6578\u64da\u5eab\u985e\u578b\u4e3b\u8981\u6709\u4ee5\u4e0b\u5e7e\u7a2e\uff1a<\/p>\n<ul>\n<li><strong>SQLite\uff1a<\/strong>\u9019\u662f\u5b89\u5353\u7cfb\u7d71\u5167\u5efa\u7684\u8f15\u91cf\u7d1a\u6578\u64da\u5eab\uff0c\u9069\u5408\u5c0f\u578b\u61c9\u7528\u548c\u55ae\u4e00\u7528\u6236\u7684\u6578\u64da\u5b58\u5132\u9700\u6c42\u3002<\/li>\n<li><strong>Realm\uff1a<\/strong>\u9019\u662f\u4e00\u500b\u79fb\u52d5\u6578\u64da\u5eab\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7684\u6027\u80fd\u548c\u66f4\u7c21\u55ae\u7684API\uff0c\u9069\u5408\u9700\u8981\u9ad8\u6548\u6578\u64da\u5b58\u53d6\u7684\u61c9\u7528\u3002<\/li>\n<li><strong>Firebase Realtime Database\uff1a<\/strong>\u9019\u662f\u4e00\u500b\u96f2\u7aef\u6578\u64da\u5eab\uff0c\u9069\u5408\u9700\u8981\u5be6\u6642\u6578\u64da\u540c\u6b65\u7684\u61c9\u7528\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e5%a4%a7%e5%b0%8f%e7%9a%84%e8%80%83%e9%87%8f%e5%9b%a0%e7%b4%a0-lLjeXKnkvs\">\u6578\u64da\u5eab\u5927\u5c0f\u7684\u8003\u91cf\u56e0\u7d20<\/h2>\n<p>\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u5927\u5c0f\u6642\uff0c\u9700\u8981\u8003\u616e\u4ee5\u4e0b\u5e7e\u500b\u56e0\u7d20\uff1a<\/p>\n<h3 id=\"1-%e6%87%89%e7%94%a8%e7%9a%84%e5%8a%9f%e8%83%bd%e9%9c%80%e6%b1%82-lLjeXKnkvs\">1. \u61c9\u7528\u7684\u529f\u80fd\u9700\u6c42<\/h3>\n<p>\u61c9\u7528\u7684\u529f\u80fd\u9700\u6c42\u76f4\u63a5\u5f71\u97ff\u6578\u64da\u5eab\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff0c\u5982\u679c\u61c9\u7528\u9700\u8981\u5b58\u5132\u5927\u91cf\u7684\u7528\u6236\u6578\u64da\u3001\u5716\u7247\u6216\u5176\u4ed6\u5a92\u9ad4\u6587\u4ef6\uff0c\u90a3\u9ebc\u6578\u64da\u5eab\u7684\u5927\u5c0f\u5c31\u9700\u8981\u76f8\u61c9\u589e\u5927\u3002<\/p>\n<h3 id=\"2-%e7%94%a8%e6%88%b6%e6%95%b8%e9%87%8f-lLjeXKnkvs\">2. \u7528\u6236\u6578\u91cf<\/h3>\n<p>\u7528\u6236\u6578\u91cf\u7684\u589e\u9577\u6703\u5c0e\u81f4\u6578\u64da\u91cf\u7684\u589e\u52a0\uff0c\u56e0\u6b64\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\uff0c\u61c9\u8003\u616e\u5230\u672a\u4f86\u7528\u6236\u589e\u9577\u7684\u53ef\u80fd\u6027\u3002\u9019\u6a23\u53ef\u4ee5\u907f\u514d\u5728\u7528\u6236\u589e\u9577\u5f8c\u983b\u7e41\u9032\u884c\u6578\u64da\u5eab\u7684\u64f4\u5c55\u3002<\/p>\n<h3 id=\"3-%e6%95%b8%e6%93%9a%e7%9a%84%e7%b5%90%e6%a7%8b-lLjeXKnkvs\">3. \u6578\u64da\u7684\u7d50\u69cb<\/h3>\n<p>\u6578\u64da\u7684\u7d50\u69cb\u4e5f\u6703\u5f71\u97ff\u6578\u64da\u5eab\u7684\u5927\u5c0f\u3002\u8907\u96dc\u7684\u6578\u64da\u7d50\u69cb\u53ef\u80fd\u9700\u8981\u66f4\u591a\u7684\u5b58\u5132\u7a7a\u9593\uff0c\u800c\u7c21\u55ae\u7684\u7d50\u69cb\u5247\u53ef\u4ee5\u7bc0\u7701\u7a7a\u9593\u3002<\/p>\n<h3 id=\"4-%e6%80%a7%e8%83%bd%e9%9c%80%e6%b1%82-lLjeXKnkvs\">4. \u6027\u80fd\u9700\u6c42<\/h3>\n<p>\u6578\u64da\u5eab\u7684\u5927\u5c0f\u6703\u5f71\u97ff\u67e5\u8a62\u6027\u80fd\u3002\u904e\u5927\u7684\u6578\u64da\u5eab\u53ef\u80fd\u5c0e\u81f4\u67e5\u8a62\u901f\u5ea6\u8b8a\u6162\uff0c\u56e0\u6b64\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\uff0c\u61c9\u8003\u616e\u5230\u6027\u80fd\u9700\u6c42\uff0c\u9078\u64c7\u5408\u9069\u7684\u5927\u5c0f\u4ee5\u4fdd\u6301\u826f\u597d\u7684\u6027\u80fd\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e9%81%b8%e6%93%87%e5%90%88%e9%81%a9%e7%9a%84%e6%95%b8%e6%93%9a%e5%ba%ab%e5%a4%a7%e5%b0%8f-lLjeXKnkvs\">\u5982\u4f55\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u5927\u5c0f<\/h2>\n<p>\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u5927\u5c0f\u53ef\u4ee5\u9075\u5faa\u4ee5\u4e0b\u5e7e\u500b\u6b65\u9a5f\uff1a<\/p>\n<ul>\n<li><strong>\u9810\u6e2c\u6578\u64da\u589e\u9577\uff1a<\/strong>\u6839\u64da\u61c9\u7528\u7684\u529f\u80fd\u9700\u6c42\u548c\u7528\u6236\u6578\u91cf\uff0c\u9810\u6e2c\u672a\u4f86\u7684\u6578\u64da\u589e\u9577\uff0c\u4e26\u6839\u64da\u9810\u6e2c\u7d50\u679c\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u5927\u5c0f\u3002<\/li>\n<li><strong>\u9032\u884c\u6027\u80fd\u6e2c\u8a66\uff1a<\/strong>\u5728\u958b\u767c\u904e\u7a0b\u4e2d\uff0c\u9032\u884c\u6027\u80fd\u6e2c\u8a66\u4ee5\u78ba\u4fdd\u6578\u64da\u5eab\u7684\u5927\u5c0f\u80fd\u5920\u6eff\u8db3\u6027\u80fd\u9700\u6c42\u3002<\/li>\n<li><strong>\u8003\u616e\u64f4\u5c55\u6027\uff1a<\/strong>\u9078\u64c7\u4e00\u500b\u53ef\u4ee5\u8f15\u9b06\u64f4\u5c55\u7684\u6578\u64da\u5eab\uff0c\u4ee5\u4fbf\u5728\u9700\u8981\u6642\u80fd\u5920\u5feb\u901f\u589e\u52a0\u5b58\u5132\u7a7a\u9593\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-lLjeXKnkvs\">\u7d50\u8ad6<\/h2>\n<p>\u9078\u64c7\u5408\u9069\u7684\u5b89\u5353\u6578\u64da\u5eab\u5927\u5c0f\u662f\u4e00\u500b\u9700\u8981\u4ed4\u7d30\u8003\u616e\u7684\u904e\u7a0b\u3002\u958b\u767c\u8005\u61c9\u6839\u64da\u61c9\u7528\u7684\u529f\u80fd\u9700\u6c42\u3001\u7528\u6236\u6578\u91cf\u3001\u6578\u64da\u7d50\u69cb\u548c\u6027\u80fd\u9700\u6c42\u4f86\u9078\u64c7\u5408\u9069\u7684\u5927\u5c0f\u3002\u901a\u904e\u5408\u7406\u7684\u9810\u6e2c\u548c\u6e2c\u8a66\uff0c\u53ef\u4ee5\u78ba\u4fdd\u6578\u64da\u5eab\u5728\u672a\u4f86\u80fd\u5920\u7a69\u5b9a\u904b\u884c\uff0c\u4e26\u63d0\u4f9b\u826f\u597d\u7684\u7528\u6236\u9ad4\u9a57\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u652f\u6301\u60a8\u7684\u5b89\u5353\u61c9\u7528\u958b\u767c\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u7684\u5ba2\u6236\u3002\u7121\u8ad6\u662f\u5c0f\u578b\u61c9\u7528\u9084\u662f\u5927\u578b\u7cfb\u7d71\uff0c\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a> \u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u5b89\u5353\u6578\u64da\u5eab\u7684\u6700\u4f73\u5927\u5c0f\u9078\u64c7\uff0c\u4e86\u89e3\u5982\u4f55\u5e73\u8861\u6027\u80fd\u8207\u5b58\u5132\u9700\u6c42\uff0c\u78ba\u4fdd\u61c9\u7528\u904b\u884c\u6d41\u66a2\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-150715","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/150715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=150715"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/150715\/revisions"}],"predecessor-version":[{"id":150716,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/150715\/revisions\/150716"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=150715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=150715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=150715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}