Android dual sim support - android

Does android natively support the dual sim feature?
Or is android extended by manufacturers to do so?
In particular, I'd like to make a sim switching app just like the ones in Samsung phones.
Also can anyone tell me in which system apk are the status bar and notifications located?
I'm trying to reverse engineer the Samsung sim switching feature.
Thanks.

No, dual SIM is not supported in Android out of the box. It is a custom modification by manufacturers, and there is no public API to control it.
The status bar and notifications are location in SystemUI.apk, but I doubt you'll be able to get much out of them. Any APIs used in their are unlikely to be available to third parties.

Related

How to send sms from second sim card in android for all version

Thank you for review my question.
Now i have problem to send sms from my mobile. i could not access to send sms from both sim card but only primary sim card to use send sms.
Question: How can i use secondary sim card to send sms?
Question: How to get dual sim card information using TelephonyManager in all android version?
I got only one sim card information.
Thank you.
Multiple SIM API is supported only from Lollipop. The phones, which have more than 1 sim, and run on older Android versions have custom ROMs(firmware), edited by their manufacturers to support multi-sim. All they have different API, which is possibly not accessible for third-party apps like yours (only system apps can use it). So if you want something like that to work on all devices, you will have to get the ROMs of all devices, decompile it, and see how the manufacturers modified it. Than you will have to implement different ways to do that for every phone model.
So in other words - it's impossible.

Android Dual-SIM API support

I was looking for Android Dual-SIM API for Android, but more or less I found nothing. As far as I understand, there is no public API from Google/Android, only specific implementation of each manufacturer. Therefore is very hard to implement application supporting Dual-SIM (or more SIM) devices.
If I am not wrong about it in this time (17.02.2015), is there anything we (developers) can do to request/force Google to implement this?
I would like to "guide" all developers to same place (if there is one) to increase our power.
Thank you for any feedback.
[UPDATE: 10.03.2015]
Android support DUAL-SIM/MULTIPLE SIM cards in API since ANDROID 5.1.
Whether you want to share your phone with a family member or better manage your mobile costs, Android Lollipop 5.1 now lets you use more than one SIM card on a device with multiple SIM slots.
Read more here and here.
AFAIK, Google has never openly discussed their rationale for not supporting multi-SIM devices out-of-the-box, even though manufacturers are quite clearly gung-ho about it. None of Google's Nexus devices has had this feature, so obviously they do not advocate multi-SIM devices, whatever their reason.
I suspect it has something to do with security, and also with Google's perception of a smartphone being an abstraction of an individual, and all data being connected with a single phone SIM account, and thus representing that individual. Or maybe I'm crazy.
The official Google review branch for this feature is here. And the only relevant post on SO for working around this is here.
UPDATE:
Both Multiple SIM Card Support and True multi-user support are available.

LEDs supported on the android device

Is there a way to know the number of LEDs an android device supports . For eg certain device support notification and charging LEDs and some devices support only charging LEDs . Is there a way for an app to know the number of LEDs present in the device (Similar to APIs which tell how many cameras are present in the Android device )
Is there a way to know the number of LEDs an android device supports
No, sorry.
Is there a way for an app to know the number of LEDs present in the device
No, sorry.
Well short of 100% reliable, but you could often derive some clues by looking for nodes in /sys/class/leds. You won't have permission to set them through that interface though. And interpreting what you find there may take some experience. And while this is typically how they are setup, it is not the only way that a manufacturer could choose to implement them.
Building a database of devices might be another option.

Android: Does Tablets support telephony?

I just came to know to restrict my app only to be downloaded on Phones but not on Tablets I have to enforce the telephony feature into my Manifest file by adding
<uses-feature android:required="true" android:name="android.hardware.telephony"></uses-feature>
Now my questions does the tablets support telephony, Can I make regular calls from tablets. I just came across some posts which says it is possible. If yes the how to restrict the app to get downloaded only on phones not tablets. I am bit confused. Could anybody have the genuine answer for this.
I also read the following post on Android FAQs
What kinds of devices can be Android
compatible?
The Android software can
be ported to a lot of different kinds
of devices, including some on which
third-party apps won't run properly.
The Android Compatibility Definition
Document (CDD) spells out the specific
device configurations that will be
considered compatible.
For example, though the Android source
code could be ported to run on a phone
that doesn't have a camera, the CDD
requires that in order to be
compatible, all phones must have a
camera. This allows developers to rely
on a consistent set of capabilities
when writing their apps.
The CDD will evolve over time to
reflect market realities. For
instance, the 1.6 CDD only allows cell
phones, but the 2.1 CDD allows devices
to omit telephony hardware, allowing
for non-phone devices such as
tablet-style music players to be
compatible. As we make these changes,
we will also augment Android Market to
allow developers to retain control
over where their apps are available.
To continue the telephony example, an
app that manages SMS text messages
would not be useful on a media player,
so Android Market allows the developer
to restrict that app exclusively to
phone devices.
Thanks
Not all tablets support telephony, but some do.
Actually telephony is an "umbrella feature", where the tablet may support some sub-features.
There is a an explanation on this blog post and links for further information.
if you have a PC windows tablet, you can use USB telephony device or so called usb voice modem to create a full featured telephony solutions. Since it uses usb to connect to your tablet and resolve the hardware layer issues.

Dual SIM card Android

Has anyone had experience with programming the selection of the SIM card, when the phone uses a dual SIM adapter?
Thanks,
STeN
Added later:
I have found the MultiSim application on the Android Market, which has in its description written that "...Analog dual-sim-adapter users can switch their sim cards...", so is there some API in the Android SDK, which allows the SIM card switch/selection?
The current Android platform does not have support for multiple SIMs. A device with such support has been customized for this, so you will need to get information from that device's manufacturer for any facilities they have to interact with it.
Since nobody mentioned it yet, Android finally has added official multisim support on Android 5.1.
But unless your app is only targeting that API (which is currently less than 0.5% of the market) you are on your own with the more obscure solutions mentioned in the other answers.
Please refer to this Dual Sim Android article. If you follow this direction, I think you can make it, even if current android api doesn't support dual sim card mobile devices.
For SMS:
Assuming that you are developing the app for your own phone, and you are willing to go through the trouble of finding out the IDs (sim_id) assigned to each of your SIM cards (probably via checking the phone's log outputs, searching for sim_id, which was what I did), you can use the following code to set the default SIM for SMS sending:
int simId = <place desired SIM ID here>;
Intent simIntent = new Intent("android.intent.action.SMS_DEFAULT_SIM");
simIntent.putExtra("simid", simId);
sendBroadcast(simIntent);
Combined with some other UI prompt stuff (for actually 'picking' the preferred SIM), this should do the trick.
I'm not at all sure if this approach would work for you (although the code appears manufacturer-independent); I figured it out with trial and error on my Mlais MX28 (with a customized ROM). But it's still worth a shot, I suppose. :)
UPDATE:
Strangely, the solution stopped working unexpectedly after a few updates to the app I was working on. But I came across another way (which seems to be more promising). (I believe this can be extended for other SIM selection scenarios as well, as the settings cache contains entries with names gprs_connection_sim_setting, voice_call_sim_setting, video_call_sim_setting and the like.)
ContentValues val = new ContentValues();
val.put("value", "here goes the preferred SIM ID");
getContentResolver().update(Uri.parse("content://settings/system"), val, "name='sms_sim_setting'", null);
(Unfortunately, this requires the android.permission.WRITE_SETTINGS permission.)

Categories

Resources