We want to use wpf application on tablet and looking for difference battery usage impacts between win app and wpf application?
Is there any comparision battery usage or document?
I doubt there is any type of documentation on what you want, but as suggested above, running your own tests shouldn't be too hard. I don't recall the APIs, but on any mobile device, there are going to be battery state objects you can access giving, at the very least, remaining battery energy. Write two test apps, each using the different paradigms. Run each, one at a time and for a long duration. Check on the energy usage at the beginning and end.
This is late for an answer but one aspect to remember about battery consumption is the use of the radios (Bluetooth and WiFi).
For tablet apps try to manage your app by stepping back and analyzing what data you'll need from the database and try to get the data in one shot so the OS can turn off the radio. If you make an sql call each time the user presses a button then the radio is on more and drains the battery. The OS might also leave the radio on "a little longer" in case you make another query.
For the rest of the UI of the app, you're safe to count on an 8 hr shift and then they dock it for recharge.
You can watch for the battery notifications as well so you can save the info in the app before the OS shuts you down.
Other than that, each app is unique and you'll need to run these tests during your QA cycle.
Related
I posted something much like this on openhab and home assistant forum too, I will decide what to do based on what I hear...
I am trying to produce an open source Energy Recovery Ventilator, and software is not my forte.
I frankly find the sheer variety and quantity of buzzwords and subsystems in the home automation sphere difficult to navigate. I am unclear on why exactly things have to be so complicated... anyway.
I am using a raspberry pi pico running micropython. Do you think it would be practical to make it appear as basically a fan with several different modes to a matter hub? Maybe report back some info so the user can see some status updates etc. ?
What I want is basically to allow it to be controlled by a hub, which may be running on a phone or someone’s PC, so the hub’s user interface etc. Can be used to make the device turn off an on, up and down on a schedule, it can be connected to other devices like a co2 detector, smart switch, etc.
I need, sooner or later, possibly with the help of module(s) running on the pico to cache data (like schedule data) get the time or whatever, a dictionary which I will use for the rest of the system to interface to. The main loop consults the dictionary to determine behaviour at any given moment. The hub checks what time of day it is, etc. And sends that info along.
Is this sort of thing doable?
I tried to look into making the thing Alexa compatible and ye gads it would take me months to get that stuff working. They make everything so complicated
Found some stuff for esp32 devices like esphome, but it is not practical to use as a module in a larger system. MQTT looks like it could play an important role, but doesn't quite get me there and for some reason Alexa, Google home etc still cant really talk to mqtt devices very well, esp. including device setup etc. Basically, envision a little hardware device that just serves up some fields and takes back some fields, then appears as a device to Google home's app etc. I need that, but a software module that runs on a pico. Is it practical to roll this or is it going to be an ungainly undertaking?
My problem is this...
I have two sites, one acting as an "Admin" site, the other as general "User" site. I need to broadcast live audio from the "Admin" site to all clients of the "User" site. I need to do this with <1 sec of latency.
Some restrictions include:
No install on "User" machines (the idea being the whole thing sits on the web)
If there needs to be a 3rd party plugin then Silverlight is preferred*
Any help much appreciated here
*I have tried IceCast with a flash client, IIS Smooth Streaming, Internet radio, all of which give us a latency of >5 secs.
Have you tried Flash with a server like Red5? You're generally going to get subsecond latency (though not much less than that), as it's designed for realtime communications. There's a learning curve with Flex and ActionScript, but if you're at all familiar with XAML, you can pick it up from the sample apps that come with Red5 pretty quickly.
Failing that, if there aren't too many clients, you can use one of the two real-time peer-to-peer solutions out there, namely Flash over RTMFP or WebRTC over JSEP/ICE/RTP. If you can ensure that all the clients are using Chrome, then WebRTC is probably your best bet. If you can ensure that they're not using Chrome, then Flash is a good choice. The current Flash Pepper client on Chrome is buggy up the wazoo when it comes to audio processing, and no sign of a fix in sight. (It doesn't support echo cancellation, and the volume of the audio goes up and down horribly.) So if you're using Flash, steer clear of recording and broadcasting your audio on Chrome. And I wouldn't recommend either approach if you have more than half a dozen clients - the number of audio streams is gonna overwhelm your "Admin" browser pretty quickly, I think. Better to push that out to something like a Red5 server.
Silverlight is a bad choice for more reasons than I can count. I'm saying this as a guy who spent several years trying to implement a realtime communication solution on Silverlight. Don't do it.
Is there any App/ Method / Process that i can use to get the battery consumption of a single app in blackberry? I am using 9300. My application uses GPRS and sends data over internet.
Till now i have been using a thread which tells me the difference between battery levels after an hour of a phone using my app and a phone not using my app.
Please suggest a better way?
Unfortunately BlackBery is not really open, clear and documented platform.
The best numbers that I got from conference in Amsterdam Info
There's no reliable way to tell how much battery your app has used. As you are already doing, you can retrieve the levels before and after calling DeviceInfo.getBatteryLevel, but the measured difference includes the battery used by other apps too.
I need to make a WPF application that has two windows for it's UI that will be used simultaneously by two separate users.
It needs to run on a single PC with dual monitors so that each UI screen displays on its own monitor. The app is for an industrial controls
interface for a machine we are building.
Machine description: The system is a test stand for a pump manufacturer. They would like to have two operators manning the station.
So it needs to be able to test two pumps at the same time but not synchronously (each operator my start their test at different times).
The system will test for leaks, vibration, flow, pressure and motor current. There are hundreds of different models all with
different test parameters as well as different test procedures. It is desired to have a single PC and a single PLC as the control hardware.
The PC will have dual touchscreen monitors (one for each operator), two bar code scanners (one for each operator) and two Zebra label printers
(one for each operator). The PC will interface with a Allen Bradley Compact Logix PLC via EtherNet I/P. The PLC will be programmed to control
all of the actuators and sensors on the machine. The PC will command the PLC to execute the various test sequences after it has written the
appropriate parameters to the PLC. The PLC will collect data during a test sequence, and the PC app will retrieve it and write it to persistent
storage.
Application description: The application will use an SQL Express database to store all the pump model's testing parameters as well as
the data collected during the test for each pump. The app will provide provide twin UI's that have identical functionality but are capable of
operating independently of each other. The app will have a UI screen for entering and editing the parameters for all the different pump
models, another screen to view data collected for a given pump and the main screen that will display the current pump under test info, such as
the parameters that are in use, the test progress and live transducer data. A usage scenario is as follows: The operator receives a batch of pumps
with it comes a work order sheet, he/she scans the bar code on the work order the app decodes the scan and extracts the model number, it then
retrieves the test parameters from the database and displays the info on screen, after operator confirmation it writes the parameters and test
sequence to the PLC. The operator loads the pump into the test chamber and closes a safety door. A "Begin Test" button is presented to the operator
after the PLC confirms pump present and safety doors closed. The operator presses the "Begin Test" button and the PC and PLC 'talk to each other
to perform the test sequence while the PC updates the UI to keep the operator informed of the progress and results for each step of the sequence.
When testing is complete the PC generates a GUID for the pump and stores the test data linked to the GUID in the database and prints a bar code
label encoded with the GUID and a pass/fail status code. The safety door unlocks The operator at the second station is performing the same tasks
but with a different work order, which can be a different model pump so the testing on the other station is completely independent of each other.
My question is this: Is it possible to have a single WPF app instantiate two separate UI threads
on separate monitors so that both UI windows appear to have focus simultaneously. And if so how do you do it.
A couple of other points to deal with are: each monitor will be a touch screen so two separate mouse inputs need to be handled and
each user will have a bar code scanner so two USB or serial scanners will need to be monitored for input.
You cannot have two windows with window focus at the same time, regardless of how many threads are in use. The best solution is to just create a standard WPF app with one giant window - this will allow you to do what you want.
sounds like you'd be better off with 2 machines, and one instance running on each.
others have already brought up the focus issues, but you also have double the sensors/etc to manage too.
you could either spend $$ on writing a super complicated app that violates most of the rules about one set of inputs+focus, or spend taht same $$ getting another machine to run the app?
As the other answers stated, only one window can have focus at a time.
Input from either user will reach last focused window.
Consider creating one server app and two remote UI apps that communicate with server.
That way, you have one app running logic, but two remote-apps feeding it input, from to separate machines.
(One of the input machine can also be used as the server's machine.)
You could also have two desktop apps that communicate directly with each other (on separate machines)
with no server app, but that would be a little trickier to implement.
I don't know for sure if you can have two focuses (foci?) at once in a WPF app, but it sounds like it could get messy quickly. It seems to me that a much cleaner solution would be to run two separate instances of the application.
Windows will only send touch input to one window at a time. Nothing you can do about that. The 'workaround' would be to handle all of the input from within one window, do some hit testing, and then react accordingly.
I am just brainstorming here. Let's say I have 2 mobile devices, iPhone, Android, WinPhone7, BlackBerry, Palm, whatever. I'd like to communicate my location (latitude/longitude) from my device to another one. What is the best way of doing this?
The assumption that each device has either built-in mapping capabilities or a custom-built native app.
I've thrown around ideas like SMS/MMS or email with links embedded in them. However, they all seem to be cludgy.
Any other ideas?
A web service (or, if you must and don't care about security, Twitter) that each phone could poll for changes to location might work out. The web service would have to accept the coordinates, obviously, plus be able to be polled for updates by each device. Security is obviously a concern, but that might be another way to go provided that each device had a custom app to accomplish this task as well as web access to poll for changes.
I would go for SMS. It is guaranteed to be private, reliable, low-cost and easy on battery.
Web service is also an option, however:
privacy is a concern, as the data will leave mobile operator internal network
reliability - well, you would have to build your own messaging system and that can always fail
end-user cost - in order to access web service, end-user would have to activate a data session and constant polling can be a source of significant traffic.
development cost - you would need to develop that web service
battery life - constant polling over the data connection will have an effect on the battery.
Compare that with SMS:
privacy - SMS never leaves operator network, so it is guaranteed to be as private as your phone calls are.
reliability - SMS center is guaranteed to always be there by your mobile operator to accept your messages
end-user cost - in most networks, SMS cost is negligible
development cost - well, as SMS center is already there, you can use it without any additional effort from your side (excluding your soft that needs to send and receive those SMSs)
battery life - no adverse effect on battery
In any case, both devices still have to have a "mapping app" that you can program to interface with the SMS/web-service data.