Rebooting Tizen display will often not cause update - javascript

we are developing a web application (HTML/CSS/JS) on Tizen SSSP4 and SSSP5 devices.
According to SAMSUNG changing tthe version number of the application in sssp_config.xml will cause the display to update next time the application is to be launched.
However when I update the app version and reboot the display using
b2bapis.b2bcontrol.rebootDevice
it will sometimes update, yet other times it will not. Usually it will not update on the first time, yet update if I call the same API once more after the display has restarted. Sometimes the display will get stuck and no longer update even if I reboot multiple times using the API.
I checked the web connection, which is fine. The display is connected via cable, between the display and my server is but a switch. Also I see the display in WEINRE using a webhook all the time.
Has anyone encountered this problem? What can be done to resolve this? Is there something that must be done when unloading the app in order to release the API properly?
Thanks.

Related

React Native Expo building very slowly

I've recently noticed my build time has increased considerably, sometimes taking a full minute to load. On the console I still see "Building JavaScript bundle: finished" fairly quickly but the screen takes much longer to refresh. Is there a reason something like this would be happening?
Try using Expo in a Simulator on your development machine and determine if it is taking as long as on your device:
If it is faster than on your test device, then you should check the
network connection on your test device
If it is as slow as on the test device, then you could try to remove node_modules and reinstall them with 'npm install' or 'yarn'. Expo will be redownloaded aswell as all other packages.
In my case, it was a different solution.
I followed the instructions given by jimmylee on the Expo SDK forums, which say:
If you are behind a VPN, try disabling the VPN.
If you are using windows 10, run CMD on your machine and type
ipconfig. Take a look at the first Ethernet Adapter. If it doesn’t say
Ethernet Adapter Ethernet it means Expo is taking the IP address of
something else.
To fix this, go to network connections and disable the adapter that it
should not be pointing at.
Connect your computer to the network and your phone to the same
network. Restart Expo.
So, go to Settings > Network & Internet.
Click Change Adapter Options:
Then disable the unneeded Ethernet:
Then restart Expo.
If the connection is made but bundle building is very slow - Try disconnecting from the network both devices, the system and the mobile, and reconnect. Also, don't forget to clear the 'recently in development' projects and start the project again.
It will certainly increase the speed of building by far, especially for windows it works very well.
I was going through the same problem.
I used expo on multiple devices and clearly it depends on the device also, i.e, whether it is able to handle it or not.
Second, for the slow device, i came up with a solution.
I just turned off the fast Refresh.
Fast Refresh keeps a watch on the development side and keeps reloading whenever we make a change.
By deactivating it, we need to refresh the app on our own. But this helped me.
Due to multiple refreshes and continuous bundling, expo gets slow (as per me) thus disabling this feature may help (infact helped me a lot).
STEPS TO DO THAT;
In your expo go app, shake your device. An option panel will open.
There will be an option to disable fast refresh. Simply click that and you are done.

firebase offline lost focus on input

I've a web app on iphone developed with a firebase backend (JavaScript client v2.2.4)
When I open the app with airplane mode activated (no network) the app is loading fine, everything is cached with a cache.manifest
I can see in the safari's console that the firebase client is making calls to my firebase backend. Those calls are failing because I don't have any network.
the calls looks like this : /.lp?start=t&ser=17611300&cb=10&v=5
The issue:
If the user put the focus in a textarea, the focus is lost everytime the firebase calls are failing, which is very annoying for the user
Any idea how to avoid this behaviour?
The specificity of my use case:
I'm offline
The user put a focus in a textarea
Here is a workaround
I found that /.lp?start=t&ser=17611300&cb=10&v=5 is for long pooling connections
Websockets is enough for me, so I force the websocket only with the following code
Firebase.INTERNAL.forceWebSockets();
The problem vanished

Push Notification function on Phonegap app using javascript

I am building a push notification on Phonegap. I reviewed the way of using the Push Plugin but it is not supporting windows phone. I plan to use Javascript non stop looping by every 15 mins to query the Rest server and get the message back to display if any message is ready to published. Do you think this is a good idea? Will this cause any app leaking and slow down the app?
You will shoot yourself in the foot doing so.
Why? Your app will only be able to "receive" push notifications if it is active. If your app is inactive, you won't be able to poll for new notifications and therefore won't get any. So you're missing the actual great benefit of push notifications.
Solution: Pull the new version of the Cordova Push Notifications Plugin. Support for Windows Phone 8 was added recently. That's the way to go.

phonegap for iOS (iPad 2, iPad3) - Background worker and continuous refresh

I am developping an app for Ipad (2 and 3).
The app needs a continuous synchronization with a remote web app. Point is, my app needs to keep "listening" whenever there is connectivity in order to receive updates (lots of data), alerts,... etc.
PS: Before going further I would like to highlight that my app is not targeted to the appstore and moreover it can't rely on push notifications.
What I am confused about is the multitasking on the ipad. I would like my app's local db to stay synchronized by communicating with the remote web app. And hence my questions are:
Does any of the ipads have a real multitasking? (like android's where you can have "services") Meaning that my app or at least a small part of it would still operate even if it is not active on the screen.
How can I achieve that using phonegap standard framework?
If the above points show that at some extent it's not possible. Is there still a possibility to extend phonegap with a plugin and make this happen?
If the above three points are unfortunately fully negative; how would you address the problem by keeping in mind that the syncrhonization involves a lot of data and is mandatory to cover the app's usability?
Does any of the ipads have a real multitasking? (like android's where
you can have "services") Meaning that my app or at least a small part
of it would still operate even if it is not active on the screen.
IOS only has limited background services - in that your app goes into a background state when not active. Really only limited to receiving push notifications. As Phonegap uses a webview and javascript that is only active when the app is active in the foreground.
How can I achieve that using phonegap standard framework?
If you want to keep data connection open you might have to look at development of an application for a computer tablet, rather then an IOS device.
If the above points show that at some extent it's not possible. Is
there still a possibility to extend phonegap with a plugin and make
this happen?
No.
If the above three points are unfortunately fully negative; how would
you address the problem by keeping in mind that the syncrhonization
involves a lot of data and is mandatory to cover the app's usability?
You only option (if you can only use phonegap) is to have the app active all the time, and set a constant sync using Jquery & XML/JSON data. Of course this depends on what type of data you are going to show. For showing a page of data - similar to a webpage you won't have any problems - as long as you understand once you change apps that data won't be synced.
I would like my app's local db to stay synchronized by communicating with the remote web app.
If I were you, I'd be questioning why would I need to do that? Why not just make the app works online? You can have all the assets locally, and just setup some sort of API to retrieve whatever data you need to display on demand.
Otherwise, you'll need to hack your way through to do all the things you wanted, plus you need offline / online syncing. Since you have most data available offline, I assume the app also works offline? And you'll have a really bad time working on offline / online syncing...

web app on mobiles with phonegap

I have a web application (chat room) in html + javascript that basically sends requests to the server every 5 seconds to check for new messages.
It already works on mobile but there are 2 main problems:
it does not beep (it works on pc) with new messages
when the browser is put on background, the javascript obviously stops being executed, therefore the connection to the server is lost and the client disconnected.
i was thinking of using phonegap not only to make it cross-platform but also to fix those problems stated above. would they be resolved with the use of phonegap?
thank you in advance.
phoneGap doesn't support custom push notification. it basically open a browser and expose you some native support via API.
in order to do some native actions like push notifications and/or sound playing i suggest you check out some of the plugins options available or even write your own for that.
Playing sounds can be done easily using the Media API. As for having the JavaScript run in the background it really depends on the OS. On Android the JS will continue to run if you leave the app via the home button but the back button kills the app so you would stop the JS. It is probably better to write a service that always runs in that case.
Alternatively you'd look at a push type solution to notify you of new messages.

Categories