ඇප් බැක්ග්‍රවුන්ඩ් සර්විස් ප්‍රශ්ණය

wpmanoj

Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    ඒ වගෙ දේකට firebase cloud massages / GCM ගන්න පුලුවන්නෙ
    ඒක තමයි පාවිච්චි කරන්නෙ බං. ඒක වට්ස්ඇප් , ඉමෝ පාවිච්චි කරන තාක්ෂණය තරම් 20% ක් වත් සාර්තක නෑ බං. ඇප් එක කිල් වෙලා තියෙද්දි ෆයර්බේස් හරියට ඇප් එක එක්ක සම්බන්ධයක් නෑ. පැකට් ලොස් වෙනවා. ප්‍රශ්ණ ගොඩයි. වෙන විසදුමක් දියන් කො.
     
    • Dislike
    Reactions: timetraveler1921

    Solo Rider

    Well-known member
  • Sep 4, 2020
    35,922
    1
    157,341
    113
    98
    හෝමාගම
    ඒක තමයි පාවිච්චි කරන්නෙ බං. ඒක වට්ස්ඇප් , ඉමෝ පාවිච්චි කරන තාක්ෂණය තරම් 20% ක් වත් සාර්තක නෑ බං. ඇප් එක කිල් වෙලා තියෙද්දි ෆයර්බේස් හරියට ඇප් එක එක්ක සම්බන්ධයක් නෑ. පැකට් ලොස් වෙනවා. ප්‍රශ්ණ ගොඩයි. වෙන විසදුමක් දියන් කො.
    ඇප් එක කිල් වෙලා තියෙද්දි ෆයර්බේස් හරියට ඇප් එක එක්ක සම්බන්ධයක් නෑ ??

    Ok, later

    -------

    server එකට ඕනෙ වෙලාව වෙනුවට ඇප් එකට ඕනෙ වෙලාවට server එකට call කරොත් ?
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    server එකට ඕනෙ වෙලාව වෙනුවට ඇප් එකට ඕනෙ වෙලාවට server එකට call කරොත් ?

    මෙහෙමනෙ මචං. දැන් හිතහං කිරියෙ උඹ මොකක් හරි දැම්මම මට නොටිෆිකේෂන් එක ඒ වෙලාවෙම නෙ එන්න ඕන. ඉතින් සර්වර් එකට ඩිවයිස් එකට කෝල් කරන්න වෙනවා නෙ. නිකමට හිතහන් කො මේක රියල්ටයිම් ප්‍රොසෙසින් කේස් එකක් කියල. ඇප් එකට පුළුවන් නම් ඩේටා ලොකුවට පාවිච්චි නොකර. බැටරි ඩ්‍රේන් නොකර හාර්ඩ්වෙයා බිසි නොකර කනෙක්ෂන් එකක් ඇප් එක කිල්වෙලා තියෙද්දිත් කරගෙන යන්න server එකට ඕනෙ වෙලාව වෙනුවට ඇප් එකට ඕනෙ වෙලාවට server එකට call කරාට අවුලක් නෑ.

    uba monawahari rat tool ekak develop karanawada?
    phone spying wage wadakata :P :P
    පිස්සුද කොල්ලො. මේක රියල් වර්ල්ඩ් එකේදී රියල්ටයිම් ඇප් හදන හැමෝටම එන ගැටළුවක් නෙ.
     

    chanzKolla

    Well-known member
  • Nov 5, 2015
    1,218
    1,052
    113
    iOS nam kill wela tiyeddi notification tap ekakin hari user tap ekakin hari witharane on karanna puluwan danna widihata, silent push wada karanneth background foreground ne, silent music play karala (not working more than 3 hours), continuous location track karalanam kill nokara silent push walata call wena service ekak liyanna puluwan wei, visible notification ekak yawala thama mchn app eka kill nam update karanna wenne
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    iOS nam kill wela tiyeddi notification tap ekakin hari user tap ekakin hari witharane on karanna puluwan danna widihata, silent push wada karanneth background foreground ne, silent music play karala (not working more than 3 hours), continuous location track karalanam kill nokara silent push walata call wena service ekak liyanna puluwan wei, visible notification ekak yawala thama mchn app eka kill nam update karanna wenne
    ඔව් බං. වැරදිලා හරි යූසර් නොටිෆිකේෂන් එක ක්ලික් නොකර ස්විප් කලොත් ඩේටා නැති වෙනවා. ඇප් එකට යන්නෙ නෑ.
     
    • Dislike
    Reactions: timetraveler1921

    Solo Rider

    Well-known member
  • Sep 4, 2020
    35,922
    1
    157,341
    113
    98
    හෝමාගම
    මෙහෙමනෙ මචං. දැන් හිතහං කිරියෙ උඹ මොකක් හරි දැම්මම මට නොටිෆිකේෂන් එක ඒ වෙලාවෙම නෙ එන්න ඕන. ඉතින් සර්වර් එකට ඩිවයිස් එකට කෝල් කරන්න වෙනවා නෙ. නිකමට හිතහන් කො මේක රියල්ටයිම් ප්‍රොසෙසින් කේස් එකක් කියල. ඇප් එකට පුළුවන් නම් ඩේටා ලොකුවට පාවිච්චි නොකර. බැටරි ඩ්‍රේන් නොකර හාර්ඩ්වෙයා බිසි නොකර කනෙක්ෂන් එකක් ඇප් එක කිල්වෙලා තියෙද්දිත් කරගෙන යන්න server එකට ඕනෙ වෙලාව වෙනුවට ඇප් එකට ඕනෙ වෙලාවට server එකට call කරාට අවුලක්


    Puluwan ithin schdule ehekata.
    Hama welawelama, real time server ekata one welawata widiyak danne ne.

    Firebase high priorizy messages hari yanne nane neh
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    Puluwan ithin schdule ehekata.
    Hama welawelama, real time server ekata one welawata widiyak danne ne.

    Firebase high priorizy messages hari yanne nane neh
    ෆයර් බේස් පාවිච්චි කරන්න පුළුවන් මේ විදියට. ඇප් එක කිල් වෙලා තියෙද්දිත් ලිස්න් කරන්න මොකක් හරි ක්‍රමයකට පුෂ් නොටිෆිකේෂන් වලට බ්‍රෝඩ්කාස්ට් රිසීවර් එකක් වගේ එකක් දාගන්න පුළුවන් නම්.
     
    • Dislike
    Reactions: timetraveler1921

    chanzKolla

    Well-known member
  • Nov 5, 2015
    1,218
    1,052
    113
    ඔව් බං. වැරදිලා හරි යූසර් නොටිෆිකේෂන් එක ක්ලික් නොකර ස්විප් කලොත් ඩේටා නැති වෙනවා. ඇප් එකට යන්නෙ නෑ.
    eka hari, ekane wenna one kohomath, app eka kill kaloth monath wenna one nane, uba notification batch count eka update karapan visible notification wala, notification category karanna, special task walata, category balala, ona update eka server ekata gahanna user aye app eka on kalama. fetch ekaknam ekath karala app ekath update karanna, badth count eka balala eka kalakine
     
    • Like
    Reactions: wpmanoj

    Solo Rider

    Well-known member
  • Sep 4, 2020
    35,922
    1
    157,341
    113
    98
    හෝමාගම
    ෆයර් බේස් පාවිච්චි කරන්න පුළුවන් මේ විදියට. ඇප් එක කිල් වෙලා තියෙද්දිත් ලිස්න් කරන්න මොකක් හරි ක්‍රමයකට පුෂ් නොටිෆිකේෂන් වලට බ්‍රෝඩ්කාස්ට් රිසීවර් එකක් වගේ එකක් දාගන්න පුළුවන් නම්.

    Sleep kiyala awulak ne, CPU eka wakeup karanna puluwan. E welawema notification eka ewanna server, device time tally wena widiyata.

    Ehema arenna, always On widiyak dannne ne ban
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    eka hari, ekane wenna one kohomath, app eka kill kaloth monath wenna one nane, uba notification batch count eka update karapan visible notification wala, notification category karanna, special task walata, category balala, ona update eka server ekata gahanna user aye app eka on kalama. fetch ekaknam ekath karala app ekath update karanna, badth count eka balala eka kalakine
    දැනට යන්නෙ උඹ කියන විදියට. ලොකු ඩෙවෙලොප්මන්ට් වලදි හැම එකටම alter ලියනව කියන්නෙ පිස්සු හැදෙනව බං.

    Sleep kiyala awulak ne, CPU eka wakeup karanna puluwan. E welawema notification eka ewanna server, device time tally wena widiyata.

    Ehema arenna, always On widiyak dannne ne ban
    ඉමෝ වගේ ඇප් දැනටම මොන මගුල අනත් කනෙක්ට් සර්වර් එකට. උන් අවුරුදු බර ගානක ඉදන් කරන නිසා අනිවා ක්‍රමයක් ඇති.
     

    chanzKolla

    Well-known member
  • Nov 5, 2015
    1,218
    1,052
    113
    packet loss eka adu kara ganna puluwan user app eka kill kaloth, iOS poddak witharai danne mchn, android nam kohomada danne na, user app eka kill karaddi uba userge fcm ekata adala state ekak backend eke update kara ganna killed kiyala, ethakota ubata eken check karala normal packet yawana eka nawatthanna puluwanne, aye u foreground awama update kara ganna, foreground kiyala, uba yawana packet walata response packet ekakuth tiya ganna, response kaalayak yaddi awe nathnum aye killed kiyala backend update karanna, eken adu kara ganna puluwan packet loss.
     
    • Like
    Reactions: wpmanoj

    HAneo

    Well-known member
  • Jan 30, 2007
    12,969
    29,168
    113
    Homagama
    එලකිරියෙ ඇප් හදන උන් ගොඩක් ඉන්නව නෙ. දන්න එකෙක් එහෙම නැත්නම් විසදුමක් තියන එකෙක් මේකට ක්‍රමයක් කියහල්ලා.

    ඇප් ඩිවෙලොපින් වලදි තියන ලොකුම ප්‍රශ්ණය ෆොග්‍රවුන්ඩ් සර්විසස් නැතිවෙද්දි බොහොම ඉක්මනට බැක්ග්‍රවුන්ඩ් සර්විසස් සිස්ටම් එකෙන් කිල් කරල දානවා. ගොඩක් උන් විසදුම විදියට තියන් ඉන්නෙ ෆයර්බේස් වගේ පුෂ් නොටිවිකේෂන් සර්විසස්. මමත් ඕක තමයි කරන්නෙ. ලබ්බෙ ඇපොල් අප්පරියයි. මුන් කිල් කරනව කොච්චර මෙන්ටේන් එකේ රන් කරත් කිල් කරනවා. ඒත් බලහන් ඉමෝ වගේ ඇප් වල, අපි සිස්ටම් සෙටින්ස් ගිහින් ෆෝර්ස් ඩිසේබල් කරත් ලබ්බට මැසේජ් එනව කෝල් එනවා.

    ඉන්ටර් නෙටියෙ දැන් අවුරුදු ගානක් විසදුම් හෙව්වත් සාර්තක විසදුමක් නම් තාම ලැබුනෙ නෑ. එක්සාම්පල් සියගාණක් කරල ඇති සාර්තක නෑ.

    දන්න එකෙක් හුදී හෙල යක්ඛ ජනී පහසුව සදහා කියල දියල්ලා. අපි වාඩි වෙලා අහගෙන ඉන්නෙ.
    1. to my best knowledge you cannot handle android service disposal call backs. that's how it created. for example, if the user swapped out the app, uninstall the app, or disposal of background services you cannot track that.
    2. the only way to do this is to implement presence using uninterrupted service. if the server tracks the interruption of the service then we can take this as the app was killed or uninstalled.
    3. for firebase ".info/connected" is what I used I guess you know that already. and it worked so far for me on a large scale. but as I see it's not a good solution. I tell you why

    --first thing is that android doesn't allow us to track app kills cus it's the end user's choice. so build an app that the user doesn't suddenly close the apps (you have to design a system that every level of user can guess the next step. and clear paths end with a button to close a given transaction. this way user always ends up with an input at the end of every transaction. after that it doesn't matter if user kill the app or not )

    -- since we cannot handle the user's choices we can ask the user to perform his presence every time we need it. simply use some push notification service and update his presence on your datastore

    -- I always update users' last online time and last action performed and if they complete it. that way I know for sure before he kills or goes offline he did complete the last transaction. if not I load the uncompleted trans once he online and asked if you want to continue or open fresh

    as you told for the developers, that is a headache. but we cannot change it, right? so try alternative things for that

    ඉමෝ වගේ ඇප් දැනටම මොන මගුල අනත් කනෙක්ට් සර්වර් එකට. උන් අවුරුදු බර ගානක ඉදන් කරන නිසා අනිවා ක්‍රමයක් ඇති.
    I agree with you on this.
    I experienced this when I created some windows apps. some X company gave us a DLL for their devices and we can perform general tasks using that for some advance automation we request and they provide us another static lib + implementation and once we create a wrapper to make it used in our app it allows us to use device's windows memory locations and perform tasks by pointing it. I guess this kind of functionality must be there in android and companies like IMO must have some advanced access to them. but sadly there is no sign of that in any of the Android documents they have published
    ------ Post added on Jul 5, 2021 at 5:25 AM
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    1. to my best knowledge you cannot handle android service disposal call backs. that's how it created. for example, if the user swapped out the app, uninstall the app, or disposal of background services you cannot track that.
    2. the only way to do this is to implement presence using uninterrupted service. if the server tracks the interruption of the service then we can take this as the app was killed or uninstalled.
    3. for firebase ".info/connected" is what I used I guess you know that already. and it worked so far for me on a large scale. but as I see it's not a good solution. I tell you why

    --first thing is that android doesn't allow us to track app kills cus it's the end user's choice. so build an app that the user doesn't suddenly close the apps (you have to design a system that every level of user can guess the next step. and clear paths end with a button to close a given transaction. this way user always ends up with an input at the end of every transaction. after that it doesn't matter if user kill the app or not )

    -- since we cannot handle the user's choices we can ask the user to perform his presence every time we need it. simply use some push notification service and update his presence on your datastore

    -- I always update users' last online time and last action performed and if they complete it. that way I know for sure before he kills or goes offline he did complete the last transaction. if not I load the uncompleted trans once he online and asked if you want to continue or open fresh

    as you told for the developers, that is a headache. but we cannot change it, right? so try alternative things for that


    I agree with you on this.
    I experienced this when I created some windows apps. some X company gave us a DLL for their devices and we can perform general tasks using that for some advance automation we request and they provide us another static lib + implementation and once we create a wrapper to make it used in our app it allows us to use device's windows memory locations and perform tasks by pointing it. I guess this kind of functionality must be there in android and companies like IMO must have some advanced access to them. but sadly there is no sign of that in any of the Android documents they have published
    ------ Post added on Jul 5, 2021 at 5:25 AM
    Thanks Machan. Sounds like we have no any chance to do. Anyway, lets try. There have many legendary developers and they will help us someday when they see this thread.
     
    • Like
    Reactions: HAneo

    HAneo

    Well-known member
  • Jan 30, 2007
    12,969
    29,168
    113
    Homagama
    Thanks Machan. Sounds like we have no any chance to do. Anyway, lets try. There have many legendary developers and they will help us someday when they see this thread.
    I say this has all to do with some special dev permissions sort of thing to access those hidden interfaces so we can perform those tasks.
    if they allow this is a very easy things to implement
     
    • Like
    Reactions: wpmanoj

    wpmanoj

    Well-known member
  • Nov 18, 2010
    2,681
    6,468
    113
    I say this has all to do with some special dev permissions sort of thing to access those hidden interfaces so we can perform those tasks.
    if they allow this is a very easy things to implement
    Yes few times I saw in stack overflow. Some apps like WhatsApp, viber they got few permissions through manufacturers. Mostly they gave access as a system app.
     
    • Like
    Reactions: HAneo

    asiridol

    Active member
  • Dec 29, 2006
    756
    234
    43
    Still on earth
    I say this has all to do with some special dev permissions sort of thing to access those hidden interfaces so we can perform those tasks.
    if they allow this is a very easy things to implement
    This is not completely true. Apple has strict policies a developer need to adhere and they won't grant special permissions to use private APIs for a million dollar company. Google in the other hand has a relaxed policy about private APIs but there's no guarantee something works in a specific API level will work in a future release. You'll have to be mindful and architect an app to work in all scenarios. A mobile device has limited hardware capabilities and internet connection can be very fragile. That's why most apps use offline caches, even with no internet connection an app shouldn't render useless.

    For an iOS app you could use background fetch that'll run in a specific interval period. For android you could use new WorkManager APIs. Push notification does not guarantee a delivery. Either you'll have to use something like azure notification hub to queue push notifications or use a third party push notification alternative like https://pushy.me/ that relies on MQTT. And you could use silent push notification to trigger a background refresh, in iOS you can leverage notification extension app as well.
     

    HAneo

    Well-known member
  • Jan 30, 2007
    12,969
    29,168
    113
    Homagama
    This is not completely true. Apple has strict policies a developer need to adhere and they won't grant special permissions to use private APIs for a million dollar company. Google in the other hand has a relaxed policy about private APIs but there's no guarantee something works in a specific API level will work in a future release. You'll have to be mindful and architect an app to work in all scenarios. A mobile device has limited hardware capabilities and internet connection can be very fragile. That's why most apps use offline caches, even with no internet connection an app shouldn't render useless.

    For an iOS app you could use background fetch that'll run in a specific interval period. For android you could use new WorkManager APIs. Push notification does not guarantee a delivery. Either you'll have to use something like azure notification hub to queue push notifications or use a third party push notification alternative like https://pushy.me/ that relies on MQTT. And you could use silent push notification to trigger a background refresh, in iOS you can leverage notification extension app as well.
    most people not using WorkManager because it's different behavior with API levels.
    For flutter, I've tested (not used at scale ) workmanager 0.4.1, and still full of issues that are not answered or even have a workaround. it's not cus of the flutter wrapper around WorkManager has those issues but native workmanager raised those

    used Rabbit MQTT plugin for the web but not for gathering telemetry data for devices. I will try this https://pushy.me/ right now and I hope this will ease us. I guess you propose MQTT cus it uses a very low bandwidth for sending data back and forth right? Can you please give us more details on this as well?

    Thanks for the info really helpful
    :love:
     

    asiridol

    Active member
  • Dec 29, 2006
    756
    234
    43
    Still on earth
    most people not using WorkManager because it's different behavior with API levels.
    For flutter, I've tested (not used at scale ) workmanager 0.4.1, and still full of issues that are not answered or even have a workaround. it's not cus of the flutter wrapper around WorkManager has those issues but native workmanager raised those

    used Rabbit MQTT plugin for the web but not for gathering telemetry data for devices. I will try this https://pushy.me/ right now and I hope this will ease us. I guess you propose MQTT cus it uses a very low bandwidth for sending data back and forth right? Can you please give us more details on this as well?

    Thanks for the info really helpful
    :love:
    I don't have first hand experience with pushy, but it looks like a promising alternative. I was looking at something similar couple of years ago. The product name is different may be they changed it since. One potential problem though, might not work if the app is killed, I just read their doco, it relies on a pub/sub architecture. If your app is not subscribed it won't work. But doing a quick POC should be easy enough.

    I thought android workmanager is production ready. What are the issues you are facing? In our project we are planning to migrate to work manager.
     

    HAneo

    Well-known member
  • Jan 30, 2007
    12,969
    29,168
    113
    Homagama
    I don't have first hand experience with pushy, but it looks like a promising alternative. I was looking at something similar couple of years ago. The product name is different may be they changed it since. One potential problem though, might not work if the app is killed, I just read their doco, it relies on a pub/sub architecture. If your app is not subscribed it won't work. But doing a quick POC should be easy enough.

    I thought android workmanager is production ready. What are the issues you are facing? In our project we are planning to migrate to work manager.
    cus of issues I abandon the work manager some months back

    ON native
    ======
    1 . as I remember there was a java error when initializing the Workmanager and the same logged at git as an issue.
    2. another one as I remember is I added some network callback inside Workmanager and update the UI in the loading state as well. when the network is ok then it was working fine. but once the network has gone callback has canceled itself. (This network call must be there cus we have no other choice. and this is random that's why I leave this and move on to other solutions )

    (i was updated android to androidx and maybe that was not compatible with Workmanager )

    ON Flutter side
    ----------------
    Most famous "Unhandled Exception: MissingPluginException" when run in IOS
    (https://github.com/fluttercommunity/flutter_workmanager/issues/205) and still has no promising fix

    So initially I thought errors are on Plugins so I created Flutter platform client and invokeMethod Workmanager so I can use it in Android only
    but turns out it was raised from the android specific implementation

    Fo all those I leave it and moved on. is it production-ready yet? i don't know but very optimistic about this let's try that again to check if it is ready