Restrict 3rd party apps to access Internet except one app in Android - android

I am developing an Android Application for examination purpose. This app will be used by students and professors. Student may attempt to verify the answer from other apps by using Internet during the exam. The client want's to restrict other android apps to use Internet service when the exam app is open. Is it possible to disable Internet Access of other apps when a particular app is open?

No, you can't. But in your 'exame app' you can check when your Activities are in foreground or not. If your app goes in background, you can assume that the student is trying to do something else. What about?

Related

How to add live location tracking in Flutter even app is terminated?

I want to implement Google Map live location tracking to my application. For example I have two users, one is a carrier and one is a customer. When customer want to see where is my cargo, my application will show carrier's location to customer even carrier's application closed. How can I make this logic? I already tried packages like Workmanager. My application will work IOS and Android both. Do I have to write native code for both? If so, I maybe can write for Android but I dont know IOS side. How popular applications like Whatsapp or Snapchat do that? Is it possible to do this in Flutter?
You should have a look on the following package: https://pub.dev/packages/geolocator. It implemented your use-case by allowing background fetching of the position. It even handles the Foreground service on Android as far as I know.

Is it possible to access the currently opened browser tab from an android application?

If I create an application, which the user installs on his Android device, is it possible for that application, that from the background, it can access the currently opened browser tab, and if the user navigates to a specific domain with his browser, the app sends a push notification, or maybe notifies the user about a promotion on that domain?
well, for usual apps this isn't possible for security reasons obviusly. but it probably may be done using AccessibilityService. note that Google is filtering apps which have such big privileges and won't let your app to Play Store if it will be using AccessibilityService to such "trivial" operation (isn't very helpful, for sure isn't accessibility-kind-of)

How to embed a mobile application in other application?

I'm building a mobile application for a company and I need to add in the company mobile application a button that go directly in a different application .
Anyone know a solution to embed 1 mobile app in other app???
Inside the code of your button, you can launch an explicit/implicit intent that can launch another application (authored by someone else). The application won't be running inside your application, but to the user, he/she will have the illusion that the other application running is part of your own. This is assuming of course that the second application is already installed on the user's phone. If it isn't installed, your button can just fetch the relevant application's installation page from Google Play for the user to install the app, and then run the application once installed.
In your application, you can also provide a content provider to keep your data. A content provider provider exposes a set of public CRUD interfaces to your data for other applications to access. This is how the contacts database is shared on Android for instance between many different applications, even non-Google applications.
Basically, you first need start at the beginning and educate yourself on the fundamentals of Android. If you start reading about intents and content providers, those constructs may not make any sense to you until you first learn about Activities, the Activity's lifecycle, stacks/tasks, and the way security generally works on Android. You may even want to look on Youtube, there are some very good highly rated Google I/O videos on there that talk about the fundamental concepts of Android.

Android Chat Application - single sign in

I have made a chat application of my own. But in my chat application I have to login and logout again and again. I want to make it as What's App or any other chatting app ( i.e the user should login only once and rest all the time when there is internet connection available he/should getconnected to the application automatically and vice versa.
I have got no idea how to manage the same. I have searched it thoroughly, have found a clue regarding Application Class. But not enough so that I can use it in my application.
Please help me with a hyperlink regarding my requirement or guide me with a set of code so that I can start with.
Thanks
You do not need a Service class for single-sign-in! Use the SharedPreferences class.
You can persist the current user's password on the client device and use this to authenticate against the server every time the user opens the app.
Tech Lead on the Android Developer Relations team specifically recommends SharedPreferences: What is the most appropriate way to store user settings in Android application
If you want to receive messages in the background while your app isn't in the foreground, then you probably want to use Service class. You will probably want to use Google Cloud Messaging as well, which Google developed to help you with push notifications.

How Android ensures security?

I am just starting on Android development. To my nascent knowledge, it seems that anybody can grab any personal info and modify it or phone it home. Like with ContactContentProvider. I know these(permissions) have to be specifically declared in application manifest and the user would be presented with this info during installation. But still how would you you know the application handling your private data is not going to go rouge on it?
Example:
Suppose I create an app with internet
and contact-reading permissions. It
claims that it will backup contacts on
a server specified by user. While
secretly it also copies them to your
own server.
It's no different than you developing an app that does it that runs on a PC, or something that uses your gmail login to see if there's others you know on the same site.
It's all about trust. Also the Apple approval process doesn't safeguard against any of this if you hide it and when found out malicious apps can be killed & uninstalled instantly.

Categories

Resources