These are chat archives for angular/angular-2-ionic-2

23rd
Feb 2018
ragul
@ragulra
Feb 23 04:07
{
"message":{
"pickupRequestDTOs":[
{
"pickupRequestId":null,
"bookingId":null,
"consolidatedTripId":3,
"consigneeName":null,
"consignerName":null,
"startLocationLatitude":null,
"startLocationLongitude":null,
"startLocationPostalCode":null,
"startLocationAddress":"xxxx",
"endLocationLatitude":null,
"endLocationLongitude":null,
"endLocationPostalCode":null,
"endLocationAddress":"yyyyy",
"pickupDate":null,
"deliveryDate":null,
"weightTonnage":"100.00",
"status":"OPEN",
"requestCreatedTime":"2018-02-20 05:21:29 PM",
"pickupRequests":[
{
"pickupRequestId":201,
"bookingId":100032,
"consigneeName":null,
"consignerName":null,
"pickupLocationLatitude":"42.98492330",
"pickupLocationLongitude":"-81.24527680",
"pickupLocationPostalCode":"Canada",
"pickupLocationAddress":"London, ON, Canada",
"deliveryLocationLatitude":"12.23688430",
"deliveryLocationLongitude":"79.64995060",
"deliveryLocationPostalCode":"604001",
"deliveryLocationAddress":"Tindivanam, Tamil Nadu 604001, India",
"pickupDate":"2017-11-09 12:00:00 AM",
"deliveryDate":"2017-11-10 12:00:00 AM",
"weightTonnage":"120.00",
"status":"1"
},
{
"pickupRequestId":202,
"bookingId":100033,
"consigneeName":null,
"consignerName":null,
"pickupLocationLatitude":"13.00656800",
"pickupLocationLongitude":"80.24221100",
"pickupLocationPostalCode":"600036",
"pickupLocationAddress":"Sardar Patel Rd, Indian Institute Of Technology, Chennai, Tamil Nadu 600036, India",
"deliveryLocationLatitude":"14.25502850",
"deliveryLocationLongitude":"80.10130070",
"deliveryLocationPostalCode":"524344",
"deliveryLocationAddress":"Krishnapatnam Port, Thamminapatnam, Andhra Pradesh 524344, India",
"pickupDate":"2017-11-25 12:00:00 AM",
"deliveryDate":"2017-11-26 12:00:00 AM",
"weightTonnage":"16.00",
"status":"1"
}
],
"fullLoad":false
}
],
"size":1
},
"status":"success"
}
can any one tell me how to get the pickupRequests arrys
marianharbist
@marianharbist
Feb 23 08:32
I generated new project and .sass files in variables.scss are bad imported by default, all of them, ionic.globals, ionic.theme.default etc..how to solve that? thx
Owen Melbourne
@OwenMelbz
Feb 23 08:32
what is "bad" ?
bad like michael jackson?or bad like they all say the word "bad" ?
marianharbist
@marianharbist
Feb 23 08:33
webstorm says that cannot resolve name...
so it cant find it
Owen Melbourne
@OwenMelbz
Feb 23 08:33
does it compile okay though?
marianharbist
@marianharbist
Feb 23 08:34
  error ../../theme/variables.scss (Line 15: File to import not found or unreadable: ionic.globals.)
nope
Owen Melbourne
@OwenMelbz
Feb 23 08:36
does it fail every time you do ionic start somethingnew ?
like does it break every time you start a new project
marianharbist
@marianharbist
Feb 23 08:36
yes..
Owen Melbourne
@OwenMelbz
Feb 23 08:37
if it does, then check node/ionic are all running the recommended versions - if it still doesnt work then you must have something funky with your set up, rather than ionic itself
if it was a core issue, many people will probably have had it - so then best to check google or github issues for similar
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 08:40
@jorrit-wehelp Guys can you help? This method resolveLocalFilesystemUrl(fileUrl) returns me {"zone_symbolstate":null,"zone_symbolvalue":[]}
How am I able to call this method
  private getImage(path: string): void {
    this.test = this.file.resolveLocalFilesystemUrl(path);
  }
is that correct? my path is file:///storage/emulated/0/Android/data/com.names/cache/1519375155244-cropped.jpg?1519375156822
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 08:46
My target is to show that file. <im [src]="test"> What I do wrong?
UncertaintyP
@UncertaintyP
Feb 23 09:07

So this is how it is written in the documentation:

resolveLocalFileSystemURL('cdvfile://localhost/temporary/path/to/file.mp4', function(entry) {
    var nativePath = entry.toURL();
    console.log('Native URI: ' + nativePath);
    document.getElementById('video').src = nativePath;
})

now compare it to yours

Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:12
@UncertaintyP which class call this method resolveLocalFileSystemURL
I am not able to call File.resolveLocalFileSystemURL
and my file is not on localhost
UncertaintyP
@UncertaintyP
Feb 23 09:14
Your file is not on the device but you want to resolve a local system url?
ist the native file plugin from cordova btw
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:15
My file is in Android local system
file:///storage/emulated/0/Android/data/com.names/cache/1519375155244-cropped.jpg?1519375156822
problem is that if I set pat like this did not work. Neither like this: this.test = /1519375155244-cropped.jpg?1519375156822
UncertaintyP
@UncertaintyP
Feb 23 09:16
Oh actually the Ionic wrapper returns a Promise<Entry>
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:16
yes
I get entry.fullPath = /1519375155244-cropped.jpg
also not working
UncertaintyP
@UncertaintyP
Feb 23 09:19
And what about entry.toURL() or entry.toInternalURL() ?
The toURL() function should return a path thats usable in a src tag according to the manual
Sudeep Tavarkhed
@coddypotter
Feb 23 09:20
Guys need little help on auto start whenever the app is killed. Anybody?
starting*
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:20
toURL = file:///storage/emulated/0/Android/data/com.names/cache/1519375155244-cropped.jpg
UncertaintyP
@UncertaintyP
Feb 23 09:21
What is auto starting?
You mean the app starts itself without user interaction although it's not running?
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:22
toInternalURL = cdvfile://localhost/cache-external/1519375155244-cropped.jpg
Sudeep Tavarkhed
@coddypotter
Feb 23 09:22
Yes
UncertaintyP
@UncertaintyP
Feb 23 09:22
Sounds highly unlikely that google or apple will provide such functionality ^^
Sudeep Tavarkhed
@coddypotter
Feb 23 09:24
There is a work around in Native App to achieve this. So thought of asking in the community if its possible with Ionic 2.
Teodor Kolev
@Teodor_ASA_twitter
Feb 23 09:24
also not working
UncertaintyP
@UncertaintyP
Feb 23 09:25
Wow there is indeed such thing, sounds like a terrible idea from user perspective :D
If used for bad intentions of course
Sudeep Tavarkhed
@coddypotter
Feb 23 09:28
@UncertaintyP Yea. Actually the app i was writing was to track school bus. But i wanted to implement the above functionality wit ionic2
did not find anything on internet
UncertaintyP
@UncertaintyP
Feb 23 09:29
There is a background geolocation tracker plugin
But haven't heard about that revive functionality so far
Sudeep Tavarkhed
@coddypotter
Feb 23 09:33
background geo plugins stops if app is killed
Owen Melbourne
@OwenMelbz
Feb 23 09:33
it shouldnt, unless the process takes to long, it needs to send the "complete" signal to keep alive, otherwise the OS kills it (i found that out hte other day :D )
Sudeep Tavarkhed
@coddypotter
Feb 23 09:36
@OwenMelbz Somehow background geo do nt wrk all te time so need a workaround.
Owen Melbourne
@OwenMelbz
Feb 23 09:37
to give suggestions, you might need to give more information e.g what platform? what actually consititutes as "doesnt work" etc
Sudeep Tavarkhed
@coddypotter
Feb 23 09:54
@OwenMelbz Okay. I wanted to build the location trcking app targeting android platform. I have written the backend using nodejs n jwt authentication. Basically this app stores the location of drivers and the attendance of kids boarding the bus.
Owen Melbourne
@OwenMelbz
Feb 23 09:55
and what "doesnt work" does it crash? not run at all? only run once?
Sudeep Tavarkhed
@coddypotter
Feb 23 09:57
I thought ionic2 would be great for such a small requirement. Now the problem that i found out on test run that drivers frequently close all the recent apps.
if they do so the app stops storing the locations
it runs without any crashs. But stops working when drivers click on clear all apps button. I need to somehow start the app again so that it works all fine again
Same with uber/ola whenever the driver kills the app or clears it from recent apps stack. the app reopens all by itself.
Owen Melbourne
@OwenMelbz
Feb 23 10:21
ask them nicely not to...
what package you using to track location in bg?
although uber says
The latest update, 3.222.4, gives Uber permission to constantly access location data so long as the app is still running in the background
so are you sure they can? might be chasing something thats not possible yet
theres more advance systems like https://www.transistorsoft.com/shop/products/cordova-background-geolocation which claim to be accurate and do everything
LalitKushwah
@LalitKushwah
Feb 23 12:48
will it be feasible to prepare csv file from json and send it to in the network request in mobile devie
*device
Owen Melbourne
@OwenMelbz
Feb 23 16:27
anybody know if its possible to use ionic serve with cordova.js im trying to use the nativestorage api - which supports browser, but when using serve it fails as cordova is not injected