**** BEGIN LOGGING AT Sat Jan 31 02:59:58 2015 Jan 31 11:44:16 morning from Madrid :P Jan 31 11:44:57 morphis: did PR for the sounds. We might want to add more but these are the basic ones. I tested them briefly seems OK. Didn't test the boot & shutdown ones yet though. Jan 31 11:46:48 Garfonso: Got some SMS while arriving in Spain (the regular operator stuff when abroad). Seems chatthreader shows all messages for all threads. So I received SMS from 3 different numbers, messaging shows 3 threads however each of them contain exactly the Jan 31 11:46:48 same messages. So I see messages from number 1 in the thread of number 2 etc. Jan 31 11:47:23 Basically all messages are in all threads. Not sure it's the chatthreader or messaging app though. Could be either I guess. Jan 31 11:49:30 Hm.. Jan 31 11:50:12 You understand what I mean? I basically get all messages in all threads, not only the ones from that specific sender like it should. Jan 31 11:50:14 can you do luna-send -n 1 -a org.webosports.app.messaging palm://com.palm.db/find '{"query":{"from": "com.palm.chatthread:1"}}' sometime? :) Jan 31 11:50:35 I understood: you have three threads that are identical Jan 31 11:50:48 Yeah will do when get back to hotel... This 5* one still charges for wifi :s Jan 31 11:50:54 but you expected three threads with different messages Jan 31 11:51:03 hehe Jan 31 11:51:10 So on FreeTether with roaming which is cheaper LOL Jan 31 11:51:22 Yeah indeed. Jan 31 11:51:26 that should give you the summary and you see which is the last message that chatthreader assigned. Jan 31 11:51:37 But receiving SMS works properly :P Jan 31 11:51:49 or you can do the same for com.palm.message:1 and see if they have one or three entries in the conversations field. Jan 31 11:51:58 that's nice. :) Jan 31 11:58:20 Just I didn't have multiple threads before because it's a prepaid number I only use in my N4 :P Jan 31 11:58:35 So only sent SMS from and to my Veer before Jan 31 11:58:57 Herrie: have you heard about https://en.wikipedia.org/wiki/Survivorship_bias ? :) Jan 31 12:01:09 nizovn: Yes :P I'm optimistic by nature (I guess being from NL is partly causing that :P). So I assume stuff "works" and doesn't have bugs LOL :P Jan 31 12:01:44 Unrealtistic when it comes to newly written software I know :P Jan 31 12:02:52 :) Jan 31 12:04:52 it's even worse with software... if you can not find bugs in the first tests of newly written code, you should be suspicious and expect bugs that will surface only under certain circumstances and are hard to find. ;) Jan 31 12:06:20 Yeah, random stuff is the biggest pain to troubleshoot :P But well I'm quite sure you and Cage1___ will figure this one out quickly once I pull the data :) Jan 31 13:16:41 Garfonso/Cage1___:http://issues.webos-ports.org/issues/847 Jan 31 13:17:40 Added both logs + screenshot there Jan 31 13:29:25 nizovn: pong Jan 31 13:29:39 Herrie: PR looks good Jan 31 13:30:29 morphis: i freed and can work on something Jan 31 13:32:06 morphis: Maybe nizovn could work on rotation? Jan 31 13:32:12 nizovn: great Jan 31 13:32:19 Herrie|Laptop: you mean sensors? Jan 31 13:32:35 btw found another bug caused 100% cpu in luna-next Jan 31 13:32:44 Yeah sensors Jan 31 13:32:45 nizovn: really? Jan 31 13:32:58 it Jan 31 13:33:51 I'll be wondering about in Madrid again, time for some lunch :P Jan 31 13:34:37 nizovn: sensors are a very good idea Jan 31 13:34:38 it's caused by systemmenu, when tap wifi and scroll, seems something wrong with animation and height Jan 31 13:35:02 nizovn: you fixed it? Jan 31 13:35:05 no Jan 31 13:35:21 found 5mis ago Jan 31 13:35:30 ah ok Jan 31 13:35:56 if you find the reason feel free to push a PR otherwise Tofe or thrrgilag might be the right ones too look into this Jan 31 13:36:42 what about sensors? Jan 31 13:37:43 nizovn: basically we can use them through libhybris Jan 31 13:37:54 there is a small test_sensors test program in libhybris already Jan 31 13:38:26 next step will be to wrap this into LuneOS Jan 31 13:39:17 nizovn: something you want to work on? Jan 31 13:40:00 yes, but i new to libhybris Jan 31 13:40:07 that shouldn't be a problem Jan 31 13:40:18 you don't have to deal with libhybris directly Jan 31 13:40:30 ok Jan 31 13:40:36 the work to wrap the android HAL libs through libhybris is already done Jan 31 13:40:40 you just have to use the C API Jan 31 13:42:03 but you could go with vibration first if you want Jan 31 13:42:16 might be simpler and would give you a godd overview of to work with such things Jan 31 13:47:19 nizovn: your choice :) Jan 31 13:49:01 ok, will start with vibration Jan 31 13:49:08 good Jan 31 13:49:21 nizovn: then let me describe how it looks Jan 31 13:49:42 there is a ls2 API to controller the vibration motor in LunaSysMgr Jan 31 13:49:47 https://github.com/webOS-ports/luna-sysmgr/blob/webOS-ports/master/Src/base/HapticsController.cpp Jan 31 13:50:21 this currently only implements the API but does nothing to send the commands to the hardware Jan 31 13:50:36 the class has some virtual methods Jan 31 13:50:49 those are implemented in https://github.com/openwebos/luna-sysmgr/blob/master/Src/base/HapticsControllerCastle.cpp Jan 31 13:50:58 which we need to integrate back into our LunaSysMgr Jan 31 13:51:27 next step is to implement the nyx module as part of https://github.com/webOS-ports/nyx-modules-hybris Jan 31 13:52:08 which then uses the android HAL API to control the motor (see https://github.com/webOS-ports/phablet-headers/blob/master/hardware_legacy/vibrator.h) Jan 31 13:52:43 libhybris has a simple test program for this as well: https://github.com/webOS-ports/libhybris/blob/webOS-ports/master/hybris/tests/test_vibrator.c Jan 31 13:54:14 nizovn: that is all Jan 31 13:54:46 ok, understood :) Jan 31 13:54:53 for implementing the different effects we might need to simulate that somehow Jan 31 13:55:01 not sure what the differences are Jan 31 13:55:28 but for the first implementation it should be fine to only support NYX_HAPTICS_EFFECT_UNDEFINED Jan 31 13:55:32 see https://github.com/openwebos/luna-sysmgr/blob/master/Src/base/HapticsControllerCastle.cpp#L120 Jan 31 13:55:59 if you have some good idea about the other effects feel free to implement them as well Jan 31 14:00:09 nizovn: sensors will work the same way but will be a bit more complex Jan 31 14:04:04 morphis: ok Jan 31 14:09:58 so it seems the data structure is different between mock and real chatthreader. Jan 31 14:10:24 in mock, com.palm.message:1 is a hash, with hash keys being the conversation id's Jan 31 14:10:38 in real, com.palm.message:1 appears to be an array of all messages Jan 31 14:11:46 that fact that it's displayin gsomething in real indicates there may be two bugs. one in chatreader not creating the hash and one in app that is somehow taking the array even though it expects a hash Jan 31 14:12:58 i can change the client code to accept the array of messages (rather than current hash). however, i dont know what the performance implications are....if there are 1000 messages, is it better to create the hash on device "server" code or device "client" code Jan 31 14:13:21 in browser world, it's usually better to deal with these things on server side... Jan 31 14:21:51 and also, the conversation id in each message sent is not correct Jan 31 14:22:15 Cage1___: can you show me an example for both? Jan 31 14:23:07 examples for data structures are in db8SourceMock.js (dataArray at end of file) Jan 31 14:24:13 Cage1___: you mean https://github.com/webOS-ports/org.webosports.messaging/blob/master/app/source/data/db8SourceMock.js#L146? Jan 31 14:26:42 yes Jan 31 14:27:34 so the "0", "1" elements in the dictionary are just for the mock Jan 31 14:27:41 Cage1___: when you do a query against db8 Jan 31 14:27:44 Morning Jan 31 14:28:01 luna-send -n 1 luna://com.palm.db/find '{"query":{"from":"com.palm.message:1"}}' Jan 31 14:28:05 ka6sox: morning Jan 31 14:28:10 Cage1___: what you get back then is Jan 31 14:28:38 { ... "results": [ {_id: "0", _kind: "com.palm.smsmessage:1", conversations: ["0"], ...}, {_id: "0", _kind: "com.palm.smsmessage:1", conversations: ["1"], ...} ] } Jan 31 14:30:13 Cage1___: so in real db8 world messages are not listed per chatthread Jan 31 14:32:11 Cage1___: you need to query them by conversation Jan 31 14:33:31 like luna-send -n 1 luna://com.palm.db/find '{"query":{"from":"com.palm.message:1","where":[{"prop":"conversations","op":"=","val":},{"prop":"folder","op":"=","val":"inbox"}]}}' Jan 31 14:34:04 Cage1___: see https://developer.palm.com/content/api/reference/data-types/db8.html#Query Jan 31 14:36:55 so basically, all the messages for all conversations ever are returned ??? what if there are 1000's of messages? Jan 31 14:40:23 Cage1___: when you do a simple luna-send -n 1 luna://com.palm.db/find '{"query":{"from":"com.palm.message:1"}} then, yes Jan 31 14:40:40 Cage1___: but db8 is great here, see https://developer.palm.com/content/api/reference/data-types/db8.html#Query Jan 31 14:40:44 it does paging for you Jan 31 14:41:03 so you can set a limit and get back a page key to get the next page when you want it Jan 31 14:42:30 Cage1___: you have the emulator to test? Jan 31 14:51:55 yes sort of Jan 31 14:52:07 well at least the sorting problem was easy to fix Jan 31 14:53:20 hmm, still concerned about future state wrt messages... Jan 31 14:54:13 is db8Source in messaging doing a query for all messages, or is it being smarter and only querying for messages for specific thread / conversation? Jan 31 14:54:52 i.e., i hope it's not the query that herrie used to get the data... Jan 31 14:56:47 i'm worried that https://github.com/webOS-ports/org.webosports.messaging/blob/master/app/source/data/db8Source.js#L54 is asking for all records... Jan 31 14:57:13 not by threadid Jan 31 14:58:33 Cage1___: query only for all chatthreads. Jan 31 14:58:47 and show only the summary in the list.. Jan 31 14:59:02 if a user selects a chatthread get only the messages for that thread from the db. Jan 31 14:59:48 Cage1___: right.. that query is not a good idea, if used for messages directly. Jan 31 15:01:01 so it is okay for me to change that code?? i worry about changing db8Source Jan 31 15:01:02 best would be to fix that and add a where-field to the opts hash that it gets and then you can define the filter in the messaging app. Jan 31 15:01:59 sure.. I wrote that last year for the contacts app and it is far from perfect. Jan 31 15:02:56 it even still has the hint that it will fail for > 500 items. :) Jan 31 15:03:22 so you'll get 500 messages maximum anyway and will probably experience strange issues... ^^ Jan 31 15:03:29 can you help me with the where clause? Jan 31 15:03:57 i want to search against the conversation array in com.palm.smsmessage:1 Jan 31 15:04:45 if it werent' an array my where would be : {where: {conversations: rec.threadId}} Jan 31 15:04:52 but since it is an array...??? Jan 31 15:04:52 I won't restrict it to smsmessage. Better query against com.palm.message:1 directly.. then you won't have to change things for IM messages later. :) Jan 31 15:05:31 it is an array, because you can have multiple conditions... just do "where":[{"prop":"conversations","op":"=","val":}] Jan 31 15:06:09 hm.. wait a moment... that won't work here, because conversations is an array. Jan 31 15:09:11 ah.. ok. Just played a bit with it and it seems to work nonetheless. Does exactly what we want, returns all messages that are part of that conversation, even if they are in multiple conversations already. Jan 31 15:10:05 Cage1___: format for the condition is explained here, btw: https://developer.palm.com/content/api/reference/data-types/db8.html#WhereClause Jan 31 15:14:12 so i'm changing the line to: Jan 31 15:14:24 options = {query: {from: rec.dbKind, where: [{prop:"conversations",op:"=",val:rec.get("threadId")}]}, count: true, watch: true}; Jan 31 15:16:23 which line? I would change dbSource.js#54 to options = {query: {from: rec.dbKind, where: opts.where}, count: true, watch: true}; Jan 31 15:16:33 and supply it the where clause where you call fetch. Jan 31 15:16:52 you use dbSource for chatthread, too, right? Jan 31 15:16:55 line https://github.com/webOS-ports/org.webosports.messaging/blob/master/app/source/data/db8Source.js#L54 Jan 31 15:17:08 so if you hardcode the clause it won't find any chatthreads anymore. :) Jan 31 15:17:16 icic Jan 31 15:18:40 should that be where: opts.where||null ? Jan 31 15:18:47 i mean "" Jan 31 15:19:02 or if it ends up being where:null it will get all messages? Jan 31 15:19:43 if opts.where is undefined options.where will be undefined, too, which is what you want, i.e. no where clauses, you get all db entries Jan 31 15:20:18 (or all till 500, we'll have to implement paging there someday.) Jan 31 15:21:28 awesome, muchos gracias Jan 31 15:28:15 okay, i've fixed and pushed Jan 31 15:28:31 the remaining issue is that i dont think the conversation id is being set correctly Jan 31 15:28:39 (for the mssages sent by client) Jan 31 15:29:07 i think when i send the message, and palmservice responds, i need to use the returned _id and set the conversation based on that... Jan 31 15:30:07 hmm, how can a message belong to multiple conversations btw? Jan 31 15:31:22 strike comment from 16:29 starting with "i think when..." Jan 31 15:32:00 i can send the threadId in when i send the message.....however, what about new threads...where i dont know the threadId until palmservice assigns one to it... Jan 31 15:33:09 so: the two pushes should fix (in theory) the issues brought up. still pending is what to do with new threads and conversation ids Jan 31 15:52:18 Cage1___: yes... those messages were not processed by chatthreader. And I now see why: It requires a flags: { visible: true } field in the messages. Currently. Jan 31 15:53:18 I took that from legacy... not sure if this requirement makes sense? But that's something you'll have to set in the app for new messages, please. :) Jan 31 15:55:49 Cage1___: for new messages without a chatthread, you should not do anything now. The app should watch for new chatthreads to come up in the db and then show them. The service will create a new chatthread for them, when it processes the message Jan 31 15:57:19 so i should add a flags: {visible:true} to all new messages sent from app? Jan 31 15:57:38 Cage1___: if you send a message to multiple recipients, there will be only one message object in db. But it will belong to multiple chatthreads with different people. That's when you have more than one conversation id. That might be important, when deleting messages. Probably you want to only remove the conversation id for those messages and delete the Jan 31 15:57:38 complete message only if no other chatthreads are left? Just a thought. Jan 31 15:57:47 oops, just read your second message Jan 31 15:57:51 Cage1___: yes, please. :) Jan 31 15:57:56 coloring in this irc client is weird :) Jan 31 15:58:03 hehe Jan 31 16:00:00 still haven't figured out the watch thing...i see that db8Source fetch sets it...but if something changes what function is it calling? my success handler again??? or something else? Jan 31 16:00:34 flag added and pushed Jan 31 16:04:00 Cage1___: from what I understood: yes. But it will not have results from the db, but just a field "fired: true". If that happens, in db8 terms you have to run the query again. So maybe you can just call fetch again in that case? **** ENDING LOGGING AT Sun Feb 01 02:59:59 2015