Tag: android

离子运行android – 错误:找不到模块“内部/ fs” – 窗口

当我试图通过使用Windows操作系统在我的真实设备中运行Ionic应用程序 这个cmd: >离子运行android 得到这个错误: Error: Cannot find module 'internal/fs' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at evalmachine.<anonymous>:18:20 at Object.<anonymous> (C:\Users\MyPC\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:11:1) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) Cannot find module 'internal/fs' (CLI v1.7.16) Your system information: Cordova CLI: 6.3.1 Ionic Framework Version: 1.3.1 Ionic […]

使用Google云打印从应用打印到餐馆中的指定打印机

我正在使用的餐厅在他们的砖和灰浆build设有一个pos打印机。 所以当用户在应用程序上进行购买时,我们使用方形作为支付处理器,我想使用谷歌云打印将作业发送到餐厅本身的打印机。 使用谷歌云打印,虽然你似乎需要用户使用应用程序先login到谷歌,这对应用程序的stream程没有任何意义,因为它不是我们发送工作的用户打印机。 我在后端使用node.js和parse-server,这将在iOS和Android应用程序中实现。

从Android应用程序发送到nodejs服务器通过HTTP发送后,我的JSON看起来不同

当我试图通过HTTP发送一个JSON作为一个string到一个nodejs服务器,当我试图loggingrequest.body它看起来不同,我不能访问任何领域。 我的类发送请求到服务器: public class SendData extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String… strings) { String data = ""; HttpURLConnection httpURLConnection = null; try{ httpURLConnection = (HttpURLConnection)new URL(strings[0]).openConnection(); httpURLConnection.setRequestMethod("POST"); httpURLConnection.setDoOutput(true); DataOutputStream wr = new DataOutputStream(httpURLConnection.getOutputStream()); wr.writeBytes(strings[1]); wr.flush(); wr.close(); InputStreamReader inputStreamReader = new InputStreamReader(httpURLConnection.getInputStream()); int inputStreamData = inputStreamReader.read(); while (inputStreamData != -1){ char current = […]

安卓发布请求使用凌空

我在我的android代码中使用了Volley,HttpClient和HttpUrlConnection,它们从传感器pipe理器获取传感器指标。 我需要通过POST请求将这些指标导出到nodejs服务器。 每当传感器值发生变化时,我需要一个发送请求asynchronous到http服务器 MainActivity.java package com.example.rpothuraju.gyrometrics; import android.app.Activity; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.Bundle; import android.util.Log; import android.widget.TextView; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; public class MainActivity extends Activity implements SensorEventListener{ TextView textView; private SensorManager sensorManager; //private Sensor sensor; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = […]

通知不会出现在使用Firebase的应用程序的死亡状态中

我试图在上传post时将通知推送给应用的最终用户。 它在应用程序处于前景和背景时正常工作,但在应用程序被终止或closures时不显示(不在背景和前景中)。 有没有什么办法显示应用程序closures时的通知。 这里是我部署到firebase函数的index.js代码。 const functions = require('firebase-functions'); let admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendPush = functions.database.ref('/promos').onWrite(event => { var topic = "deals_notification"; let projectStateChanged = false; let projectCreated = false; let projectData = event.data.val(); if (((event.data.numChildren())-(event.data.previous.numChildren()))>0) { let msg="notification arrived" let payload = { data: { "msg":msg } }; admin.messaging().sendToTopic(topic, payload).then(function(response) { console.log("Successfully sent message:", […]

使用Android和iOS在Nodejs中推送通知系统

我想在nodejs创build一个推送通知系统,它将适用于iOS和Android 。 我一直在寻找,目前我在想这个: http://devcenter.kinvey.com/nodejs/guides/push 谁能一直在做这样的事情,能告诉我什么是最好的实施方式?

我发送推送通知时,用户注册,它只发送通知给注册用户,我可以改变,每个人都使用该应用程序?

下面的代码是我的firebase函数index.js文件 const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendNotification = functions.database.ref("Notifications/{userId}") .onWrite(event => { var request = event.data.val(); var payload = { data: { title: "Welcome to ChitChat Group", message: "You may have new messages" } }; admin.messaging().sendToDevice(request.token, payload) .then(function (response) { console.log("Successfully sent message: ", response); }) .catch(function (error) { console.log("Error sending […]

React-Native项目停留在:app:installDebug

每次运行我的react-native项目时,它都会陷入99%的困境。 我试图运行./Gradlew干净,杀死亚行,但没有任何作品。 我已经使用我的设备通过USB,genymotion和Android工作室模拟器,它总是相同的… 在设备上构build和安装应用程序(cd android && gradlew.bat install Debug)…增量java编译是一项孵化function。 :app:prebuild UP-TO-DATE:app:preDebugBuild UP-TO-DATE:app:checkDebugManifest:app:preReleaseBuild UP-TO-DATE:react-native-maps:preBuild UP-TO-DATE:react-native-maps :preReleaseBuild UP-TO-DATE:react-native-maps:checkReleaseManifest:react-native-maps:preDebugAndroidTestBuild UP-TO-DATE:react-native-maps:preDebugBuild UP-TO-DATE:react-native-maps:preDebugUnitTestBuild UP -TO-DATE:react-native-maps:pre-releaseUnitTestBuild UP-TO-DATE:react-native-maps:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE:react-native-maps:prepareComAndroidSupportSupportV42400Library UP-TO-DATE:react-native-maps: prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoDrawee130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFbcore130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoFresco130Library UP-TO-DATE:react-native- maps:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE:react-native-maps: prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE:react-native-maps:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE:react-native-maps:prepareComFacebookReactReactNative0493Library UP-TO-DATE:react-native-maps:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE:react-native- maps:prepareComGoogleAndroidGmsPlayServicesBase1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBasement1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesMaps1024Library UP-TO-DATE:react-native-maps:prepareComGoogleAndroidGmsPlayServicesTasks1024Library UP-TO-DATE:react- native-maps:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE:react-native-maps:prepareReleaseDependencies:react-native-maps:compileReleaseAidl UP-TO-DATE:react-native-maps:compileReleaseNdk UP-TO-DATE:react-native-maps :compileLint UP-TO-DATE:react-native-maps:copyReleaseLint UP-TO-DATE:react-native-maps:compileReleaseRenderscript UP-TO-DATE: react-native-maps:generateReleaseBuildConfig UP-TO-DATE:react-native-maps:generateReleaseResValues UP-TO-DATE:react-native-maps:generateReleaseResources UP-TO-DATE:react-native-maps:mergeReleaseResources UP-TO- DATE:react-native-maps:processReleaseManifest UP-TO-DATE:react-native-maps:processReleaseResources […]

制作Node.js服务器的独立解决scheme

Node.js似乎是为我的Android应用程序创buildAPI的完美解决scheme。 我希望将其托pipe在我自己的networking域上,而不使用Heroku,Firebase,AWS等任何商业解决scheme。 在本地主机上运行服务器似乎很简单,但find一个解决scheme,我可以如何托pipe它在我自己的服务器上是一个问题。 当您购买自己的域名时,如果您想要使用MongoDB数据库托pipeNode.js应用程序,还需要处理大量存储的媒体,那么您应该在支持的技术方面寻找什么? 有没有其他方法可以不使用云解决scheme,而是创build自己的后端解决scheme,以便完全控制托pipe内容,安装的内容以及工作原理。

从Android模拟器访问本地VirtualBox上的Node.js

作为学习Node.js的一部分,我决定使用它作为Android客户端的服务器端。 我部署了一个带有Node,NPM,Android SDK和Netbeans 7的Ubuntu 11 VirtualBox – 然后去了它。 问题:我无法从模拟器访问我的本地主机。 这是我的尝试: 1.节点“hello world”脚本: var app = require('express').createServer(); app.get('/', function(req, res){ res.send('Hello World\r\n'); }); app.listen(3000); 2.terminal> ifconfig返回'inet addr:10.0.2.15' 3. Terminal> curl 10.0.2.15:3000 – >“Hello World” 4.浏览器> http://10.0.2.15:3000 – >“Hello World” 5. Android模拟器>应用程序试图访问http://10.0.2.15:3000 – >“连接到http://10.0.2.15:3000拒绝” 6. Android模拟器> Android浏览器> http://10.0.2.15:3000 >“网页不可用” 只是为了validation,我做了Android模拟器>浏览器>任何其他页面 – 工程。 所以它看起来像Android模拟器不能访问本地的VirtualBox IP。 VBox中没有运行防火墙,我知道模拟器内部没有设置可以更改。 起初,我认为这是我的应用程序(虽然它是一个虚拟的“获取url”小应用程序与清单中的android.permission.INTERNET ),但我甚至无法从浏览器达到它。 […]