I have been looking all over and I cannot get notifications in Unity to work without the nasty PowerShell popup needed.
My investigations
Through my investigations, I've found many ways to achieve my goals but only 1 can unsatisfactorily solve my issues. Hopefully, the community here can provide some assistance.
The first option that I found was that you can create notifications with PowerShell commands. Unfortunately, this isn't ideal as when it is ran, the PowerShell will flash on the users screen and that can be very unsettling for users. It is also very hard to customize the code as there is inadequate documentation. If you know of a way to customize PowerShell notifications and run PowerShell commands in Unity without running PowerShell then that would solve my issue,
The second option that I ran across was the Microsoft documentation for creating a toast but no matter what I try, I cannot get it to work. The closest I got was by adding a plugin folder to my assets, and adding microsoft.toolkit.uwp.notifications.7.1.2.zip\lib\netstandard1.4\Microsoft.Toolkit.Uwp.Notifications.dll to the plugins folder but then I get the error .Show() is not a command. Which meant that I can create the toast object but not display it.
Another option is to create a python script but I assume I'd encounter similar issues.
The last option that I've seen was using some 3rd party API called burned toast but I can see that I would have the issues from attempts 1 and 2 going that route.
The last option that I've seen are $60+ assets on the Unity Asset store but there is no guarantee that those will work at all or on Windows. Not to mention, spending money on what should be free is unheard of.
Related
Since a while I am working with HoloLens2. My last OS-Versions were 10.0.18362.1005 and 10.0.19041.1109. I am developing with Unity 2019.4.7. My whole code was and still is running great on those old OS-Versions. Now I updated to OS-Version 21H1 and I have huge problems with everything including networking.
For example, my Mixed-Reality-WebRTC Pluging (from Microsoft), which only supports ARM-Architecture, does not work anymore on my new Device. The app crashes after it was successfully starting.
Another thing is, that the DevicePortal does not transmit virtual inputs. Again, on my older HoloLens2´s Virtual Input works great.
Also, even if I disable WebRTC parts of my Project, I still get an Exceptions in my Networking-System which I can´t assign to any cause. In term it is useful for you, I work with windows.Networking Library and in special with DatagramSocket.
I would be really glad if anybody could help me with this. Is OS-Version 21H1 restricted to any specific Unity- or VisualStudio Version (here currently I use 16.4.5)? Or is it Restricted to specific Networking Libraries? Thanks in advance!
Now I was able to fix the Networking Exception. The reason for that is located within my UDP-Communicator which uses DatagramSocket. Since earlier .Net.Sockets was not available at HoloLens2, now it is and I coincidentally came across this information. So I switched my implementation to .Net.Sockets which already exists in my project for editor-usage and now basic networking works fine.
Also, I was able to make WebRTC work again. With one of my Provisioning-Packages I disabled the usage of microphone for mixedReality and it seems like access to those audio-informations is mandatory for MR-WebRTC.
Unfortunately, I still have the same issues with Device Portal.This really looks like a bug.
I make software on a regular basis for friends to use and for school tasks. I upload these executable files to my website. but when they download the software and execute it, they get this error
I understand you simply press "More info" to get around this, but is there a way to completely stop this???
I made a small project to test if it will still happen, and it does.
I haven't added any extra code, just that label. I've noticed the error only appears if the file was downloaded from the internet, or copied from an external drive. I want to make a custom installer for a game I'm planning and I don't want this coming up on the installer :/. Anyone able to help out in this situation? Thanks.
Your application needs to be Signed. If you are only giving this software to a few people, just tell them to click 'More info' to run your app.
If you want to distribute more widely you will need to sign your code. Check out this page to see how this can be done.
See this Stackoverflow post that could help you too.
It is the Windows SmartScreen at work and there is not much you can do about it. It would be possible to buy a certificate and sign your executable, but for freeware this is really out of scope. The smartscreen will learn over time, that your software is not dangerous, if it is installed often enough.
The warning is not related to VisualStudio projects, it affects any new released executable.
Actually I support the idea of SmartScreen to protect users, but it should not depend on a certificate, which can be bought by developers.
Permissions that creep in between android builds of our app is a recurring problem for us at the office.
We work with Unity and use C#. In our project we use various 3rd party packages that we purchased from the Unity Asset Store and these packages update frequently. Sometimes we'll see a new permission creep in and we'll have to pinpoint the last git push to see when it exactly started appearing.
Doing all this stuff and tracking and scanning our code whenever we have an uncalled permission appear is a bit of a downer and takes considerable time.
I was wondering, theoretically speaking, if it's possible to write a script or a piece of code that creeps through our project and libraries within to give us a list of references that require android permissions.
Any guidance about this question is appreciated. I'm not a coder by trade and my knowledge isn't too strong over this subject so I apologize in advance if this questions is out of place.
So this is alittle bit tricky, because in Android Studio 1.5.1 seems like this function disappeared from lint for some reasons I dont know. So use any Android studio below 1.5.1 and it will be OK.
Analyze -> Run Inspection by Name -> "MissingPermissions".
I'm currently running VS2013 Update 3, I'm building an app and i;m trying to mimic the Rate My App that shows up rate message dialog in b/w specified intervals.
My problem is that i've made a setting using ApplicationData.current.loclasettings and it is an integer.
and i want to see the settings number being updated every time i close and run the app to ensure the logic is perfect.
but i'm unable to do it. Every time i deploy the app from vs it replace the original app and thus erasing all the settings that have been previously saved.
I've tried to use attach a process but it doesnt work on windowsphones.
Well after a bit of research and going through the documentation it is clear that there is no way you can attach a process to the app that is already running on the phone.
At least for me there was no other way because Microsoft kept the USB debugging thing a little bit undocumented or not documented at all.
So, who ever are looking forward to first launch the app on a connected windows phone and then start the the connect to a process and select the appropriate device for communication , story it is not possible, at least the build that i;m using doesn't support. may there might be a better solution in the future.
I am working one an automation platform which automates the Android test case scenarios. Most of the case I have been able to achieve using simple adb commands. However, I stumbled upon a very simple request which demands sometimes front camera to be open and sometimes back camera to be open.
I did my searches and turns out that I am not able to find out any simple adb command for it(I would love to hear that there is a simple command for that)
Also, I come across some suggestions where people say that we can have more control using Mono but I do not have any experience in Mono at the moment and I am wondering for a simple task like this it would be too much effort to create a Mono project.
Also, some suggested to hack into Camera application source code and have two apps both for front and back camera.
I needed some suggestions on what is best approach for achieving this?
Does any adb command exist?
is creating a Mono project for such a basic thing a good idea?
Can I hack into the code?
Your suggestions would really be appreciated
Well, since no on ever answered this question, let me answer it:
The camera API provided by Google on ADb front does not offer much customization so here are the answers to all the three questions:
1.Does any adb command exist?
ANS: Yes it does. Please check here: ADB command to toggle camera modes in android device
is creating a Mono project for such a basic thing a good idea?
ANS: Technically answer is yes that you can create a Mono project but you don't need to. Download Android SDK and it all you have to do is write minimum Java code to invoke the camera app from your app.
Can I hack into the code?
ANS. Don't need to change the source code of camera app. All you have to do is to create your own app which will invoke the camera app and then pass the parameters. Below is the sample code:
Intent action = new Intent("android.media.action.IMAGE_CAPTURE");
action.putExtra("android.intent.extras.CAMERA_FACING", 1);
action.putExtra("android.intent.extras.FLASH_MODE_ON", 1);
action.putExtra("android.intent.extras.QUALITY_HIGH", 1);
This 4 liner would do the job for you!!