Starting an app in snapped view on an embedded system - windows-8

A colleague recently asked a similar question ( How to start a MetroApp directly in Snapped mode? ), but this question is not a duplicate...
Programmatically forcing a Windows Store app to open in snapped view does not seem to be possible – by design. But can you do this or something similar on a Windows Embedded 8 machine? Similar things could include:
automatically start an app in snapped view on system start up, or
always start a specific app in snapped view
???
What we are trying to achieve:
The user logs in (on a preconfigured machine, assembled by us, possibly running Windows Embedded 8), starts our app and a snapped communication app (e.g. Skype or Lync) is (A) automatically there alongside our app, or (B) can be opened by pushing a button in our app.

Developers have the API necessary to take their app from SnapView to Fill or FullView. This is usually a less-advertised API because it could easily be abused. To that end, the reverse is not available. There is no API to move to SnapView.
I might also caution you, that unless you are sure of the device resolution, starting in SnapView (which is not possible as it is) would be a dangerously unreliable step as many (most?) displays do not support it (too small). And since you are talking embedded, I imagine this might be exaggeratedly so. Since it sounds like you might know the hardware, you can take that as a general rule, not for your circumstance.

Related

UWP access buttons

Helloo all
I'm currently developing an app for surface pro 3 that should be capable of:
detecting whether touchscreen was tapped and where
getting device information (product ID, amount of RAM, CPu model etc.) done by launching console application first which is capable of getting this information and saves it to a specific folder, UWP app can read its results from there and log them.
accessing sensor data like: accelerometer, gyroscope and ambient light sensor
testing cameras as i can command an app to make picture using either front or rear camera
testing microphones (both front and back)
testing speakers (i made synthesizer that is able to make beeps at given frequency at given stereo mode (left or right if both)
testing wifi - so it can connect to desired wifi network
bluetooth (swill working on it...)
I have already figured out quite a lot and put out a lot of work into it already, all listed tests are already developed on that UWP application so switching to completely different platform means rewriting whole app which I don't have time anymore.
UWP was chosen because this can run on different windows 10 devices and after completing this app the same app (with minor modifications) will be used on other windows 10 devices (like other surfaces and many different windows 10 phones)
This app will be automatically installed on a factory-resetted surface pro 3 that has no special configurations enabled, so tinkering with its settings is resource-hungry and not recommended process at all.
Now I have some other serious issues regarding of device:
how can I test the functionality of all the buttons Surface pro 3 has ?
It has 3 buttons: Volume up, Volume down and power button
but pressing power button sets screen to clack and locks device.
Can I make app override basic functionality of a button so that if button is pressed it detects it and logs its result.
same question goes to volume up and down buttons.
Only similiar questions about this are here:
Another thread on StackOverflow
I also cannot use same solution as I did with getting device information because test must be repetitive while app is running. (and UWP app cannot launch console application by itself)
Any help regarding this topic is highly welcome.
First for the power button behavior try this :
https://www.windowscentral.com/how-customize-power-button-action-when-pressed-windows-10
I don't have a surface so I cannot test it
also, I do have some inputs and thoughts about your app:
it seems to me that you are doing some sort of sanity check software for pieces of hardware I'd suggest looking into this
https://support.microsoft.com/en-my/help/4037239/surface-fix-common-surface-problems-using-surface-diagnostic-toolkit
https://www.lovemysurface.net/surface-diagnostic-toolkit/
additional thoughts of mine :
Overriding hardware behavior programmatically ould be considered as a harmful action especially when it comes to prebuilt devices such as the surface and by extension, I don't foresee MS providing API's for such a capability also such button might be communicating to the hardware directly rather and doesn't go through the software, runtime or the OS at all, changing it manually using the link i provided might be reflecting some registry settings changes but since UWP apps run in containers and cannot directly edit registry there is a dirty workaround look into this
read/write registery key file in uwp
hope this would help
You can use SystemInformation helper class from windows community toolkit it gives you a lot of details about the device.
https://learn.microsoft.com/en-us/windows/communitytoolkit/helpers/systeminformation

How to create background location service in Appcelerator Titanium working after restarting device

I want to make an application which will send information to a server about user's location every 30min. It is needed to provide location specific push notifications.
I need such functionality for Android/iOS, which would work in background (also if device is restarted). I found some articles covering background services and I created background service doing that, but after phone is restarted it won't work.
Is it possible with Android and iOS? How can I achieve that?
With iOS, no. With Android, yes.
Apple has gone to great lengths to limit what apps can do. You can do some things in the background for an extended period of time (GPS, play audio, Voip, etc), but after a reboot your app will not be restarted until the user opens it again. There are exceptions to this. Voip apps are allowed to restart after a reboot, but apple will not approve your app for the App Store unless you actually have a place for a user in your app to use the Voip feature. Geofences are a possibility, but I haven't had experience with that feature yet. In my experience, Apple does whatever they can to make sure your app doesn't run forever.
With android, there is more flexibility and what you propose is totally possible. I've listed some important links below, since most of those solutions are far better documented than what I can do here.
Essentially you need to register as a boot receiver and then send an intent to start a titanium android service when the boot event is received. I don't have experience with starting a titanium service, but I'm sure its a simple intent you need to fire. Either way you'll need a module for this native code. I attached a link to a bencoding titanium module that may help you, although there may be some others out there. You may even need to code one yourself.
Samsung is notorious for stopping your app with their SPCM feature. You may want to familiarize yourself with it. I've added a stackoverflow discussion link below.
I don't know all of your system requirements but honestly, for any app I would try my best to not run forever. It will hurt the battery life for your users and will add a lot of complexity. Maybe you could simply have the app check the GPS coordinates when it receives a push notification and decide right there and then whether to present a notification to the user? Just something to consider.
Either way good luck!
How to start an Application on startup?
http://docs.appcelerator.com/platform/latest/#!/guide/Android_Services
https://github.com/benbahrenburg/benCoding.Android.Tools
Dealing with Samsung SPCM killer

Is an Windows 8.1 Emergency App for Windows Store doable?

At my current level of knowledge, I think it is not possible, to develop an emergency or time critical alarm app for Windows 8.1 as a Windows Store App (no Desktop).
Maybe also Windows Phone 8 would fit such app scenario, for having smaller devices to carry around.
For (fictitious) example you have a blind person walking down a road, now he or she unfortunately enters a area, where no one should walk around without seeing something, then the app should warn the person with a toast notification (with sound or vibration) or some UI related function if the app is on top but the Screen is turned off.
As Windows 8.1 sets time limits to the background tasks to safe battery life, I think it is not possible to build such an app on that plattform.
A similar scenario is this question Location tracking windows 8, but it was Windows 8 he asks about and now it is 1 year over and I hope there is something new which I have missed.
Maybe there is way to hook up the Tracking Service?
If the interaction works for you, you would want to create a windows phone app that supports running in the background much the way that GPS navigation applications work (the application must be navigating for it to run in the background).
How to run location-tracking apps in the background for Windows Phone 8
Monitoring geolocation this way will be timely and you can create toast notifications, but you have to be wary of when the application will be deactivated. Whether the platform will work for you depends on your requirements and centers around deactivation. Take a look to see if the conditions for deactivation don't meet your standards, and implement a proof of concept.

Perform a task every day even if running only in background

I need my application to perform a background task every day, but it does not comply with Apple's specification for running in background.
It's none of these: audio, location, VOIP, news stand, external-accessory—, Bluetooth-central.
I'm planning to use local notifications, but the point is, that if the user doesn't open the app (and just leaves it in the background), I cannot plan new local notifications.
What should I do in this situation?
Make something else.
Seriously, if your app doesn’t at least technically fit one of those categories, you’re not going to be able to get it to do background work in a way that’ll get you approved for the App Store.
I’ve seen apps that added specific functionality in one of those categories, orthogonal to their actual purpose, to be allowed to run in the background; for instance, there’s a couple of weather apps out there that play a continuous audio file—one of the available sounds being a silent one—in order to be able to update the lock screen’s “now playing” image with live data. If you don’t mind your users being unable to listen to any other music, and have your app continuously active (which might cause additional battery drain), that could work. But if you’re trying to have your app invisibly do things in the background, without interfering with anything else, in a way that’ll get you into the App Store, you’re probably out of luck.
Four options:
Go for jailbreak
Try to get in the app store as one of those types of apps, making up a feature that uses one of those types.
(my favorite) Really rethink your system, is it really necessary to schedule background tasks? Can't the user wait a bit when he opens the app? That loading can be performed in background. And can't you offload some of the work to a webserver? Are you collecting data? You shoudln't without the user consent.
Let your user know that it's important for him (he's the one using it right?) that he opens the app once a day.
I think I covered all yohr options except the one already covered by Noah.

Robust real-time communication between iOS App and Mac App

We're working on an exhibit (http://pulse.media.mit.edu) and I'm brand new to iOS, objective-c and Xcode. The exhibit deadline is in one week and I'm stuck.
The problem I'm having seemed simple enough.
Our exhibit has a projector and an iPad. The projector will be hooked up to a mac and be playing a video. The iPad will act as a controller for those videos. More simply:
I have 50 videos on a Mac. I need to develop an application on the Mac, that, when opened will loop one of the videos.
On an iPad, I need to develop an app that can change between the videos on the mac in real time. The iOS app is already designed, we're just struggling with some code.
On the mac, when the iPad tells the Mac to change video, we'd like it to switch between videos using Core Animation, like this (http://youtu.be/pyd8O-2mkgk?t=1m).
So my question: What is the most robust way to do this? It has to be able to run in a museum, for two months. Some things to consider:
We are 4,000 miles away and can't monitor it all the time. We'll
check nightly to see if it's still working, but it should run the day
without breaking.
If people unplug the iPad, it should still work.
It should be as robust as possible.
How can I best do this? Should I write to a database from the iPad onto a database running locally on the connected Mac and then monitor that database 10 times every second? Are sockets robust enough to use alone?
If you do suggest a way, can you please point me in the direction of some resources (frameworks, function names, etc) that can help me do this quickly?
Thank you for your time.
I would go for the server-in-the-middle option, because it will be easiest to debug, and requires nothing more than a working internet (wifi) connection on the client side. When having connection issues, all you need is someone who knows how to hook up an iPad or Mac to the internet. And you can see server-side which device has issues connecting.
Furthermore, using plain HTTP sounds like the best way to go for communication, and the backend can be written in any server side scripting language. Both clients should be polling the server every X seconds.
If you get this basic setup working well before your deadline, you could try to get the devices to connect to eachother directly (for a less sluggish user experience), and leave the server solution in there as a fallback method. The Mac app could function as a HTTP server, accepting the very same commands that the iPad normally sends to your server. The challenge will be to reliably know which IP to connect to. You could hardcode it or use Bonjour.