Tag: android

从外部访问android localhost

我已经find了一些方法来运行我的android设备上的node.js服务器。 我发现了一些很好的文章描述它: https : //medium.freecodecamp.com/building-a-node-js-application-on-android-part-1-termux-vim-and-node-js-dfa90c28958f#.xrh3v0du1 。 我遵循教程,在我的设备上安装了linux vm,并安装了node.js. 我已经成功运行我的node.js脚本,并从Android浏览器访问它。 但我无法find任何方式来打开此网页以外的我的Android设备的IP地址。

如何使用nodejs / js框架开发移动应用程序?

我是新来的节点js,是否有任何常见的js框架或工具来开发支持android,ios,windows mobile的移动应用程序。

离子build立错误代码137

我正在尝试构build我的android应用程序。 它build立了罚款第一次,但有一些错别字,所以我编辑了HTML,现在我正在尝试构build应用程序。 它给出了退出状态137的错误。nodejs是最新的,npm也是最新的。 我已经检查了大约700MB的可用内存。 新离子所以现在我无法弄清楚这个错误。 还重build了节点sass。 没有任何工作。 sass开始后花费太多时间,然后自动死亡。 附加debugging文件 14 verbose stack Exit status 137 14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at […]

改造得到400不好的请求,但与邮递员合作

我的api基地的url是: https://locodealapi.herokuapp.com/api/deals 在邮递员通过后面的标题,它工作正常。 x-access-token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ.5XFJnJqTsfID9uqOwkNf46oraj9jDxic7qNSqBdunD0 在改造接口我有以下但得到400坏请求 @POST("api/deals") Call<ResponseBody> deals(@Header("x-access-token") String x_access_token) 调用代码: Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://locodealapi.herokuapp.com") .addConverterFactory(GsonConverterFactory.create()) .client(httpClient.build()) .build(); AppRestAPI client = retrofit.create(AppRestAPI.class); Call<ResponseBody> call1 = client.deals( token ); call1.enqueue(new Callback<ResponseBody>() { @Override public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) { Log.i(TAG, "The response is " + response.message()); Log.i(TAG, "The response is " + response.body()); […]

后端的select?

我正在做我的第一个后端的应用程序,应该适用于Android和iPhone。 它应该有一些类似于instagram的function,有一些照片和文字。 目前我正在寻找与谷歌应用程序引擎。 对于这样的后端,与用户,post,评论等。我应该使用数据存储选项或SQL? 我知道JAVA所以使用谷歌应用程序引擎应该相当简单。 但是,它也很容易使它与iOS的工作? 如果你认为有更好的地方做后端,比如node.js, 应该是容易的,快速的,可扩展的。 你会有什么build议?

cordova问题不能添加平台android

C:\Users\pratik.agrawal\AppData\Roaming\npm>cordova create hello com.example.hello HelloWorld Creating a new cordova project with name "HelloWorld" and id "com.example.hello" at location "C:\Users\pratik.agrawal\AppData\Roaming\npm\hello" Downloading cordova library for www… Download complete C:\Users\pratik.agrawal\AppData\Roaming\npm>cd hello C:\Users\pratik.agrawal\AppData\Roaming\npm\hello>cordova platform add android 'cordova' is not recognized as an internal or external command, operable program or batch file. C:\Users\pratik.agrawal\AppData\Roaming\npm\hello>

Phonegap 3.3生成Android失败

我试图build立一个项目,但是当我input: cordova build android发生以下错误: Generating config.xml from defaults for platform "android" Preparing android project Compiling app on platform "android" via command "../platforms/android/cordova/build" Error: An error occurred while building the android project.Error executing "ant debug -f "../platforms/android/build.xml"":BUILD FAILED /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:932:The following error occurred while executing this line: /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:950:null returned: 1 Total time: 18 seconds at ChildProcess. < […]

从android的socket.io发送JSON数据

我在android中使用https://github.com/Gottox/socket.io-java-client进行套接字编程。 现在我正在接收JSON响应,现在我想从我的Android应用程序发送JSON数据到这个node.js服务器,请帮助我。 这是我的代码 buttonConnect.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { // socket = null; try { SocketIO socket = new SocketIO( "http://104.131.225.38:8001/"); socket.connect(new IOCallback() { @Override public void onMessage(JSONObject arg0, IOAcknowledge arg1) { try { Log.i("Server saidwsssss:", "sssss" + arg0.toString(2)); } catch (JSONException e) { e.printStackTrace(); } } @Override public void onMessage(String arg0, […]

当没有第三方应用程序涉及时需要OAUTH2?

目前我正在尝试使用REST api在node.js中创build一个服务器,以便在Android和iOS中进行的应用程序执行CRUD调用。 当然,我希望这个REST API尽可能的安全。 花费最近几天试图find最好的方法来做这个似乎是一个Oauth2服务器通过HTTPS。 我知道这里有很多,但我无法find任何简单的解释应该如何工作。 所以请不要把这个标记为重复的问题,因为我实际上对此感到困惑。 阅读关于Oauth2 android / ios中的应用程序将需要注册与服务器。 我看到的所有地方都被认为是第三方的应用程序,这不是我的情况。 如果用户决定允许第三方应用程序访问我的REST API,Oauth2似乎更安全。 就像任何支持使用Facebook或G +login的应用程序一样。 但是原始应用程序如何做呢? 像Facebook,Twitter和Google+的官方应用程序? 是否有可能,他们使用Oauth2基本访问/请求眉毛等,但跳过整个用户审批部分,因为它不是第三方的应用程序。 或者他们可能会使用更简单的用户名和密码在标题或通过https发布? 我真的不知道如果我目前不打算添加第三方访问我的api采取什么方式。 什么是一个好的方法来进行?

离子不在Windows 7上安装 – 获取许多错误

我正在尝试安装Ionic时遇到此错误 $ npm install ionic cordova -g npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"4.2.2","npm":"2.14.7"}) npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\ansi-regex\2.0.0\package.tgz npm ERR! not a package C:\Users\Sridhar\AppData\Roaming\npm-cache\delayed-stream\0.0.5\package.tgz npm ERR! […]