How to disable internet access for particular application in android - android

I want to know how to disable internet for particular application, Please suggest me how to achieve because many application given this type of feature

It depends if you are asking to control this in an app you are writing yourself or in a 3rd party app on your device
For 3rd party apps: Android 4.3 had a permission manager that allowed adjusting permissions individually for installed apps. This feature was pulled (Google said it was released by mistake) from Android 4.4 and it no longer available. A similar feature might be available on vendor-specific/un-official ROMs.
For apps you write yourself: You need to add proper permissions (android:name="android.permission.INTERNET) to access network. Without it the app will not be able to make any network traffic.

Related

How do I transfer messages from iPhone to Android like Samsung Smart Switch and Google transfer?

I want to build an app to transfer message history between iOS and Android.
Apple does not allow third party apps to access messages, but Samsung Smart Switch circumvents this by using either phone-to-phone USB connection or by accessing iCloud. Google phone transfer seems to do a similar thing.
How do these apps make this possible and is this something third party developers can do?
I don't think you can transfer things over like that from Android to Apple iPhone unless they give you the option when you are first setting up the iPhone to transfer contents over from android and it also transfers the messages.
Another option though it's been a long time since I have used an Android device. You could use something like https://messages.google.com/web to load up your android messages from your phone and possibly just export them and save them to your computer.
As for developing such a tool, working within the messages API for apple. I think you can only develop extensions or addons but can't directly access the content for security reasons. Without further research, the companies might be only allowing the company to do this via a contract between them, but would not let a 3rd party vendor such as you or I access this data.
https://developer.apple.com/app-store/review/guidelines/
Nowhere in the guidelines does it specify that you can't access the SMSes. But you can only access it if you use private methods which are not allowed and will get your app rejected.
You can only access data for which Apple supplies a documented API. You can not access files outside of the Sandbox of your App unless Apple provides an API for it.

Restricting an application to be installed on a rooted device

I have developed a mobile application in PhoneGap. We had a security test on the application and it has flagged that application can be installed on a rooted device and we don't want to allow this. Is there a way to restrict an application to be installed on a jailbreak phone using phonegap
Thanks
The short answer
No, you can't at install time.
The long answer
You can restrict the installation on devices by two ways:
Using the uses-feature meta tag in the manifest. Check out the doc here.
Via the android console, where you can manage restrictions on any model by excluding or including some of them as target for the install of your application.
Since the root is not a feature implemented as part of the device, it is a software restriction, you might accept users to install the application and check it at runtime if the device is rooted. Here is a link on how you can try to do it, but there is not an official way or consistent for all devices as far as I know.

Android App monitor

I would like to create an app to monitor the communication between applications on my android. for example app A access my contacts 10 times; my app should be able to give me that info.
any idea what I should use? the permissions? what android class will be good to look into ?
Fortunately, what you want is not possible in general, for bindlingly obvious privacy and security reasons.
In the specific case of wanting to monitor other apps' use of ContactsContract, you are welcome to download the Android source code, modify it to leak this information by one means or another (e.g., log it), and create a ROM mod from your revised version of Android. Installing that ROM mod on your device would then allow you monitor those communications. Outside of this, the most that you can do is set up a ContentObserver to see if apps change contact data, but you will not know what apps make those changes, let alone general read access to contacts.
Other aspects of Android app functionality might be monitorable on rooted devices without a custom ROM mod, and there is the occasional thing that can be monitored even without root.

How can I deploy android apps using a manifest file, similar to iOS devices, without using an app store?

I want to deploy an Android app in a similar fashion as the Wireless, Over-The-Air method that exists for iOS devices. That is, setup a web page and the user clicks a link from his device that includes the manifest (xml) file, containing information on how to download the app. This works well on iOS devices, and I thought Android may have something similar.
How do I go about this?
Thank you for any help.
Please the comments above. Have the correct MIME settings, link to the apk, and make sure unknown sources is checked on the device to allow non-market apps.
Since you seem to imply an app market / store is not involved in the iOS case, it seems you might be talking about an offline-cacheable "web app" rather than a native iOS application.
The android equivalent is: on devices where the offline web app capability exists, just visit the same web page (referencing an html5 manifest with appropriate mime type, etc) you are using for iOS. Perhaps you will ultimately end up with platform-specific refinements, but the basic idea is portable.
Or perhaps you just mean that a desktop/laptop need not be used to open obtain the app. On Android, that has been the case since day 1 - the primary market client is on the device, with over-the-air install. You can send an android device to the market with a market:// url. The ability to trigger an install from a web browser running on something other than the device is a more recent and still secondary capability on android.
Finally, android does offer the ability to side load native applications, something that has no iOS equivalent outside of jailbreaking or having a developer account. Most of the responses seem to concentrate on this, but it's not clear if that is what you are actually asking for.

Android - How can I programmatically add a VPN network

The Settings on Android provides an option to add VPN manually.
Can this be done programmatically through some kind of an API?
I'm not looking for a way to connect to a VPN. I'm only concerned about configuring a VPN profile.
Please see this answer, it is not possible with the Android SDK.
This is not possible with Android SDK. However, some manufactures like
Motorola have their own flavor of android and in their SDK they have
made it possible.
See also this question -- Create VPN profile on Android. Briefly, we came to the conclusion that it's not only not possible with the Android SDK, but it's not possible even with a hacked SDK unless you have a rooted device (because the VPN profiles are stored via the system KeyStore, so you would need to be running as a system process to add / modify them).
However, there does appear to be a third-party VPN app that at least claims to do this without a rooted device, but it doesn't appear to be open-source and I can't vouch for it (see the comments here: http://code.google.com/p/android/issues/detail?id=8915).

Categories

Resources