Modal Application - xamarin.android

I'm using Xamarin.Android and I would like to build an application that start in modal way and don't close if you push the home button.
So this application need to be the only one application than a user can use on device.
Somebody can suggest how it can be done?

You best way to do is to make a "Launcher"/"Home" application. The Android SDK comes with a sample on how to do this.
You basically do this by adding your main Activity to the android.intent.category.HOME and android.intent.category.DEFAULT category and you set the launchMode to singleInstance.
This will register it as a Home application, then when you press your home button it should ask you to choose which launcher you want to use. You will have to set it once and it can be changed by the user.
You can find the sample in: android-sdk\samples\android-17\Home\src\com\example\android\home (should also be available in the other API samples).

You cant stop people from installing applications on android devices. You would have to build your own hardware for that however, you can override OnKeyTouch and check for the key being home.
You could build a service that checks the package of each running application and log which applications are run on the device to prevent users from using company property on other things. However, if android ever decides to kill your application the service should stop and this wont work.
Long story short what you are trying to do is flawed in its inception given the platform you are trying to do it on.

Related

Is there a way to bypass some of the iOS wizard screens for eSIM configuration?

I'm developing an app that should install an eSIM by demand of the user. The problem is that iOS wizard screens are really bad for user experience. Our testings showed that almost 90% of participants were confused by those screens, specifically the Label and default line ones. Since those screens have an option to be configured later, is there anyway to bypass them initially?
The only way so far to activate and request an eSIM from the carrier is the addPlan instance method from Core Telephony framework, which it only states that the output would be "Once your app calls this method, an iOS wizard guides the user through the process of installing and configuration an eSIM."
Source: https://developer.apple.com/documentation/coretelephony/ctcellularplanprovisioning/2981838-addplan

How to remote desktop to an iOS device, a.k.a. how do Mobile Device Farms work?

I have been trying to understand how Mobile Device Farms like DeviceConnect, AWS Device Farm, SauceLabs, etc. get to remote control iOS devices, but I can't find anything on the subject. They get to do it without jailbreaking, which baffles me even more.
I love these kind of projects, because at the moment it seems undoable, but I know that it is possible ('they' are doing it).
With remote control I mean: seeing the screen of the iOS device on your computer screen and able to touch and swipe with your mouse.
Can someone please point me in the right direction as to how these technically work?
If you're using an iPad (in particular) or an iPhone (if you think you'll be able to make our any detail on the smaller screen) then using remote access to view and control what's on your friend's Mac is a good option. And the best way to remote-access a Mac from an iPad is to use Google's free Chrome Remote Access service, which lets you remotely use Mac programs from an iOS device.
It's quite an involved process to set it up the first time, but easy if you want to do it again in future. You'll need the Google Chrome web browser for Mac, and a Google account.
Here is link for Chrome Remote access
https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en
Open Chrome and go to Chrome Remote Desktop on the Chrome Webstore. Click Add to Chrome, then Add App. Click Allow, then Continue.
I will give you one approach and small explanation .
You will need to create application with all possible permissions at first also implementation handlers functions .
For example :
Works with files
Real native Socket connections (not http protocol) + need to have some main server signalling (domain or static ip).
Handle remote touch trigger (main problem for real remote/iOS)
Background part experience
Your app need to be non-Market app (more likely).
You can make Application with all possible options that apple give us.
What can you do remote with your app : -control camera/ Mic read geo data , work with galleries , delete or create files . Socket will be communication line .
Also app must initially started and make (on user request) always allow all permissions .
Use camera :
Send with socket some command example ( openCamera ) . AFTER receive this string perform action for opening camera .
If you can fix programability triggering touch events you can make remoteIOS.
More data links :
Q/A send remote events
Q about touch events
Q/A about Permisions
Sorry for the first quick answer,
All of these: DeviceConnect, AWS Device Farm, SauceLabs use Appium in order to control devices.
The component that execute the command is the WebDriver.
Appium have different WebDriver implementation in order to execute operations to different device.
The iOS WebDriver can be found here: https://github.com/appium/appium-ios-driver.
The protocol in use is the JsonWireProtocol.
more details can be found here:
http://appium.io/,
http://www.seleniumhq.org/
Regards

iOS - Trigger click events outside of the app - like in app drawer

How can you trigger touch and type events outside of your app. I already have created a service that can collect certain data but I can't trigger clicks.
P. S. My requirement is to have a device cloud hosted on the internet and allow people to access them remotely
This is not possible. Apple would never allow such a huge security risk.
You misunderstand how Seetest works. Seetest requires access to your App's binary code, which it instruments:
https://docs.experitest.com/display/public/UFT/iOS+Applications
It then simulates user events by calling event handling methods, e.g. #IBAction handlers. It does not go to the low level that you want, because nothing can unless you violate Apple's usage rules.
EDIT
I was assuming you wanted to write an iOS App that could generate events outside of its sandbox. Instead I think you're referring to Instruments which is controlled by a host.
Because this is a general question, see if this gets you in the right direction:
https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/UsingtheAutomationInstrument/UsingtheAutomationInstrument.html
I have managed to do this using Appium java API. First launch a dummy app, then call driver.back() and from there, you will have full control

How to get back to the application which escapes control?

Scenario :
"My application may escape control during UI automation to another application like the browser etc"
Solution :
"I want to get back to my application which I am automating after it loses control and moves to another app so that I can proceed with my automation"
Tried :
I can figure out if an application escapes control by checking the bundle id's after each action so that if the actual and current bundle id's differ I get to know that my application lost control.
I am blocked on how to proceed further in getting back to my application in case it moves out of control
Thank you for your time and effort in going through till the end :)
This is a limitation of the "sandbox" in iOS -- once your app loses focus, UIAutomation must terminate as well. You will need to launch another instruments session to automate the browser (or whatever application you're switching to).
See this question for some information on launching an automation session against those apps.

Remove "Delete" menu for BlackBerry application

I want to remove "Delete" menu for application from home screen or download folder or wherever it is placed.
How can i achieve this?
Thanks
As I understand you would want your application to be installed so that the user CANNOT delete the application.
First, you will need to rethink if this requirement is justified. Suppose you are the end user and purchased the latest and greatest Blackberry phone for $600 and you install this application which you have found to be annoying (say this application sends SMS to some unknown number) and blast your phone bill. Ask yourself if you want to have the ability to delete this application.
Second, with this kind of feature, you will NEVER be able to host your application in Blackberry App World. Your application will be rejected outright. Consumers will not be able to install your app from App World.
Third, it is not possible to accomplish this. The following changes can be made to your application's icon
Change the application name of displayed
Change the application's Icon. This can be useful to alert the user that there is something interesting happening with the application.
Change the application's roll over icon.
That's it!
Nothing else if possible.

Resources