android - Posting data from webservice to ionic app -


everyone, asking because can't understand how can send data webservice(vb.net) ionic app(android/ios/windows).

i used firebase cloud messaging , worked fine, there's case need handle , wanted use fcm can't because needs internet connection.

basically, want send signal 1 app localserver , localserver sends post app via lan, can't have internet connection.

how can achieve this?
need use external service manage connections devices?

this did in receiving , reading json own wcf.

import http: import { http } '@angular/http';

add constructor: public http: http

getting data uri:

this.http.get('http://your_url').map(res => res.text()).subscribe(data => {         console.log("xml mo: "+data.tostring());            this.databind(data); 

reading response:

databind(data: any) {

    var parser = new domparser();     var xmldoc = parser.parsefromstring(data.tostring(),"text/xml");      this.customertitle = xmldoc.getelementsbytagname("mydata")        } 

and in html file:

<ion-item>   <ion-label floating>my data</ion-label>   <ion-input enabled="false" type="text" [(ngmodel)]="mydata"></ion-input> </ion-item> 

you should know ion-input textfield. , should work already


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -