Exclusive App on Android with monodroid - c#

I'm new in Android programation and Monodroid.
I would like to know if is possible and how to make one application that exlusively run in full screen and enable to use the device only across itself.
Best regards
Piercarlo

for the full screen mode see this
For the device only, i really have no clue what you mean.
Edit: you should really try to search a bit before posting question, it was really easy to find.

Related

Floating helper dialogue

So far I've been unable to find an answer to my question. I might be blind, or just Googling the completely wrong words, I don't know, but here's the question.
In many apps (Both on iPhone and Android) they have these floating tips that assists the user in using the app. For instance "Touch here to open notifications", and "Touch here to access settings", etc.
Now I'm looking for a solution that would hopefully work for both iPhone, Android and Windows Phone, but an answer to any one platform would be appreciated nonetheless, as I'll presumably be able to translate it into the respective Xamarin code.
Mockup (Taken from some other thread here on SO, that was never answered)
if you want a tip floating on your view you may use PopUpWindow in android. It pretty easy to implement as well

What is the best approach to automate the process of switching between camera using C#

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!!

Change windows default playback device

How can I change the default playback device in windows 7, .net 4/4.5. I change the default device frequently and I want to make a little C# application to switch faster.
Is it even possible? Please help me.
Yes it is. However microsoft somehow did not want us to tamper with this. You can follow this project : http://www.codeproject.com/Articles/31836/Changing-your-Windows-audio-device-programmaticall
and adapt it to use with C#.
I have done something similar so it's not so hard to do!
I think you'll be able to do this by editing the registry. You get many programs to take snapshots of your registry. In doing this you'll be able to see where the changes are being made. It will take some time but is worth it. Also note that if this is Windows 7 you'll have to jump through hoops to be able to make some changes.
Good luck!

How to prevent terminal (Windows-CE) from shut-down after 5 minutes

How to prevent terminal (Windows-CE) from shut-down after 5 minutes
the terminal is Motorola MC3190 (Windows-CE) and if i dont touch the screen for 5 minutes
the terminal shut-down. how to prevent this ?
i need the solution in C# code.
thanks in advance
I initially voted to close, but have been thinking more about this, and I think the question you've asked may have been missing an important piece of information.
I think what you need to look at are the Windows CE Power Management functions, specifically SetPowerRequirement. This allows you to indicate that your application is using some device within the system. If not, it's unclear why your application, absent some device interactions, wants to prevent power management from doing its job.
No code needed for this. Go to Start->Settings->Power and uncheck the box next to "Turn off screen if device not used for".
If you tried to do this programmatically, you would be draining the battery power faster than the user intends. That will probably irritate your user.
If your heart is set on doing this, then you can modify the value in [HKLM]\System\CurrentControlSet\Control\Power\Timeouts
I also gave this answer on the MSDN forums
-PaulH
I dont know Windows-CE and i Dont know C#, but I found you an answer on google. Here you go. And now I want to try programing something for some station. Would be great home control device.
Is your Motorola MC3190 configured to Turn Off if it is running on Battery Power? Will it ever turn off if on External Power?
NOTE: I had to post as answer to show image, but this isn't really an answer.
EDIT: If this is what you are interested in, consider reading the device's SystemState property. There are many members to SystemState, and one of them just may be what you are after.
There is no easy technique for what you are wanting to do, because the devices are designed to power down when not in use. If the battery goes dead, the devices have to be completely reset. Make sure this is what you want to do, because there is a reason it is hard to get around.
You'll likely have to register for a BatteryStrength changed event (like >> THIS <<), then try to trick it somehow ...maybe by popping up a dialog box or simulating a key press.
You'll most likely need to P/Invoke some of the lower level coredll.dll functionality (examples >> HERE <<) to get what you want, as this stuff doesn't come wrapped up in the standard WinMobile SDK.
EDIT 2: Here's a Great example that someone wrote to read and control as much of the Power State as possible: techlicity blog I liked it so much I've copied the code to a class in my Mobile Project!

What's a good emulator to port to Silverlight 3?

I'm thinking about attempting a port of an existing emulator code base to Silverlight 3. There appears to be enough functionality with WritableBitmap and the new sound classes to make a port feasible. Is anyone familiar with an emulator that's open source and might not be too hard to port? I'd really like to focus on moving the media aspects of the source to SL more than the complexities of porting some awkward ASM code to C#. I guess if I could find some source that's already in C# it might be ideal.
Start with a good 'ol NES emulator...
SharpNES is C#/Mono so while it might not be directly port-able, it should be a good start.
vNES is a Java NES emulator intended to be run in an applet. It's source is freely available under GPL. Not C#, but might be worth looking at for ideas.
I'm looking for interested folks to bring http://silverlightc64.codeplex.com up to full functionality. It's a C64 emulator. I just want to make sure that whoever contributes can make a real contribution :)
I use MediaStreamSource to output 50fps of video instead of using the writablebitmap. The advantage is if the client machine can't keep up, MSS will handle dropping frames.
Pete
I just found this C# gameboy emu:
http://sourceforge.net/scm/?type=cvs&group_id=95094

Categories

Resources