Problems creating a mobile first database - json

I’m experiencing problems with the mobile hybrid app on Bluemix. I’ve created a new app twice to make sure. The mobile data service reports that it ‘cannot get storage’ when I access the Manage Data tab. When I try to import json data it fails. It is the identical json data file that I import into an existing mobile hybrid app.
I have two customer facing apps to make ( they need iOS and Android versions ) - please can you advise me if it is still possible to drag and drop static json data files onto the mobile database?
Also, the link 'For more information about the file formats you can import, see importing data into the mobile data service' is broken.
Error 404: java.io.FileNotFoundException: SRVE0190E: File not found: /"https://www.ng.bluemix.net/docs/
If this is not the best way to build native apps for iOS and Android on Bluemix, please let me know.

We identified an issue with the Mobile Data Service earlier today that has just been fixed. Please let me know if you still experience this problem and apologies for any inconvenience this has caused.

You can try using the cloudant or mongolab for your datastorage requirement.
1.Take the Mobile cloud boilerplate and get the security and app id
2.Take Mongo or cloudant as DB and bind it with your mobile application just created
3.In the mobile client and server code, initialize with IBMBluemix.jar initialization functions
4.Now you are ready to read/write data to the database.
Hope this helps.You can refer a sample code in the git below:
If this does not help, then as henry asked, pls. provide more details. https://github.com/RajeshJeyapaul/Beacons-Messenger
video: https://youtu.be/Gn03yIZiCAc

Related

Forge ARKit: Cannot load model in Unity

With the latest ForgeARKit-update-6-2018.1, I was trying to load my model in Unity, with the sample Unity scene 'loadAtStartup'. I can successfully load the sample models from 'Sandbox', but I couldn't load my model, which was uploaded through script 'test-2legged'.
Error message shows 504, it seems not reaching the service:
AsyncRequestCompleted The remote server returned an error: (504) Gateway Time-out.
UnityEngine.Debug:Log(Object)
Autodesk.Forge.ARKit.RequestQueueMgr:AsyncRequestCompleted(Object, AsyncCompletedEventArgs) (at Assets/Forge/CodeBase/RequestQueue.cs:322)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
Model URN:
dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bWFvbGlua3ppOHM3cnlvZWx4bjVndnR4bjcyZWc2N2l0dGp0a2MvMmZsb29yX0FyYy5pZmM=
[Update 23/4/2019]
I found that I can successfully load the same model with ForgeARKit-update-3-2017.1.2f1. I compare the Forge code in Unity. I think it has something to do with the service URL. The version 6 is fetching models from 'https://developer-api-beta.autodesk.io' while version 3 is fetching from 'https://developer-api.autodesk.io'. Meanwhile the shell script 'test-2legged' is uploading to the latter one ('https://developer-api.autodesk.io'). That is why it counldn'd find the resource. Question here is how can I upload model to the 'beta' ARKit? I tried modifying the URL in script 'test-2legged' but it doesn't work. Below screen-shot is the output of script 'test-2legged' when fetching from 'beta' ARkit. It seems model is uploaded successfully, but some parsing post-work failed. I guess the response format is also changed in the beta version. Is there a beta version of 'test-2legged' scripts (and other Scene Preparation scripts)?
Please comments, Thanks.
This is correct. My apologizes for this, I know we did not documented very well on the server changes.
This update6 assumes you are using the new server under beta right now. The scripts and update 3 are using the legacy server. Note that the 2 servers are not necessarily compatible and store the data in different places, so make sure to always use the same server in Unity as the one you used to prepare the scene. When we will switch everyone to the new server, we will transfer the data from the legacy server to the new server cloud storage.
The Update3 package will still be able to read scenes from the new server, as we make sure the old Unity code stays compatible.
Note as well you need to use SafeBase64 encoded string everywhere. I saw in your description that you are using base64 encoded (not safe). The new server will be more strict of parameters and format, so I encourage you to test your scripts/code on the beta server.
Last, I am working on a new Unity code update, and documentation which will be released next week. Make sure to use this version - it adds support for 3legged, automatic 2/3legged token refresh, and more. If you got scenes failing, please contact me directly and share your models and URN. I'll either test it on my development environment, or look into our log files for the reason to fail. My email address is my first name at autodesk.com
Thank you Cyrille for your help!! I am replying you here as it's easier to insert images.
I replaced the function 'xbase64encode()' with 'xbase64safeencode()', and now it works! However it seems for some model it still responds some error and in that case it cannot be loaded in Unity. (as the image below). I checked the script and I think all the encoding are using SafeBase64. Any clue of that? Or is that caused by my model?
BTW, the loading performance is greatly improved than the legacy version!! It looks almost the same as the web client. Huge Thanks for that!
Good to know that there is going to be an update next week. Yes I will test it and get back to you later.

Cordova File Download and open it using cordova

Please forgive my ignorance, Any advice/directional assistance would be greatly appreciated.
I have a small app that reads data from an API with json requests.
One of the actions the app needs to do is to download a given PDF and open it either in the app, or in the OS default viewer.
I have followed several guides, but I think I am not including all needed files or something. The guides don't speak of including files of any type, but I still get errors.
In this link for example I followed the steps, but I am getting an error when I add these two lines in to the script at the bottom of the page:
var fileTransfer = new FileTransfer();
console.log(FileTransfer);
When running that I get the error Uncaught ReferenceError: FileTransfer is not defined at employee_documents.html:102
I am sure that either i am not including the files correctly in netbeans or I am missing something simple...
Any advise would be greatly appreciated.
To answer the question specifically. In order to solve the error, you need to run the cordova app using the CLI. In that way, the plugins installed from your cordova will be used otherwise if you're only running it via refresh or something similar it will produce an error like this.
In other words, type this command in your CLI:
cordova run browser
You can change this to your preferred platform (android, ios)

dartdocgen: how to view docs locally

I am having trouble using dartdocgen and dartdoc-viewer to pump my JSON files to the browser. I have had success getting all the JSON files from my application but haven't had any success actually viewing them in the browser. Based on my research, the best way to do this is hosting dartdoc-viewer on a local server as mentioned by this document:
https://www.dartlang.org/tools/dartdocgen/#deploy
However I just cannot seem to get it to work following these directions (I would like to approach it via dartium):
https://github.com/dart-lang/dartdoc-viewer/
I understand that once I am able to run pub build and compile to javascript that I dump the client/build folder into my server along with the docs folder under the URL, I am golden. That's where the issue is, how to get it from the docs folder to javascript to the browser.
I would like to be able to use dartdocgen to it's full potential so can I get some ideas?
Just run dartdocgen --serve .
see https://www.dartlang.org/tools/dartdocgen/#view-locally
Is not what you are looking for?

Creating a server / service client

I have been developing an app that has to access a DB and return data has charts in a web page. since it is to be added to another software i had to create it as a local server / servce, using self host web api, returning the data as json so i can read it in my html file and create the charts.
The server / service works, but my problem remains on the client. I don't know if i have to create another project for my html or if i just add a folder with my html and all css and javascript.
Basically when i run it i have to display my html file.
I have been looking the web for examples / solutions but i can't seem to find one that will help me, i've checked:
creating help pages with T4, but it includes all my css and js files in my html and when i want to change something i have to remove the include, debug and include it again;
create a web app but when i run it it creates me 2 servers, the one i've created and the web page server, although my web page will access it using angularjs, i can't have the second server;
I'm a little lost on how i will do it.
Can someone give me some help?
I'm using VS2010, self-host WebApi, console app, entity framework, angularjs, nvd3 and d3.
thk
If you have developed your project using MVC4 you can create view/controller related to report in webapi project.Point add html files to this view.This won't create 2 servers.

JSON data from website

I'm currently using VB .NET 2010. I'm trying to read data from a JSON request from the website https://tradingpost-live.ncplatform.net/ws/search.json (Guild Wars 2 site).
The website requires you to be logged in via the forums. Even having this in my vb app via a webbrowser object, I am still receiving a 401 Unauthorized error. I assume some sort of cookie is needed???
The biggest issue I have is trying to run the larger search # https://tradingpost-live.ncplatform.net/ws/search.json?text=&levelmin=0&levelmax=80&count=0
This gives me the error "Unable to download search.json from tradingpost-live.ncplatform.net. Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
By using Firefox, I can login and view each of these 2 sites without any issues. Any chance I can get a pointer in the right direction? So far I've installed JSON.NET but have no clue how to use it or if I should be doing something else...... almost midnight and my brain is fried!