SMS를 보내는 Android 앱을 개발하려고합니다. 내가 그들을 감지하고 SMS를 감사를 보내 특정 SIM 카드를 선택하는 방법을 두 가지 SIM (SIM1, SIM2) 카드,듀얼 폰의 특정 SIM 카드에서 SMS를 보내는 방법
3
A
답변
-1
는 MTK 플랫폼에서 사용할 수있는 경우 :) (
SmsManagerEx.getDefault .sendTextMessage (serverAddress, null, textMessage, pendingIntent, null, mSIM);
1
이 코드를 사용해보십시오. Android sdk 5.1 이상을 사용합니다.
String SENT = "SMS_SENT";
String DELIVERED = "SMS_DELIVERED";
PendingIntent localPendingIntent1 = PendingIntent.getBroadcast(mContext, 0, new Intent(this.SENT), 0);
PendingIntent localPendingIntent2 = PendingIntent.getBroadcast(mContext, 0, new Intent(this.DELIVERED), 0);
SubscriptionManager localSubscriptionManager = SubscriptionManager.from(mContext);
if (localSubscriptionManager.getActiveSubscriptionInfoCount() > 1)
{
List localList = localSubscriptionManager.getActiveSubscriptionInfoList();
final String[] arrayOfString = new String[localList.size()];
int i = 0;
Iterator localIterator = localList.iterator();
while (localIterator.hasNext())
{
SubscriptionInfo localSubscriptionInfo = (SubscriptionInfo)localIterator.next();
localSubscriptionInfo.getSubscriptionId();
//log.d("22 api level ", "got dual sim: ");
int j = i + 1;
arrayOfString[i] = (localSubscriptionInfo.getCarrierName().toString() + " " + localSubscriptionInfo.getNumber());
i = j;
}
SmsManager.getDefault().sendTextMessage(paramString1, null, paramString2, localPendingIntent1, localPendingIntent2);
[여기] ([듀얼 SIM 카드 안드로이드]의
+0
이 링크도 참조하십시오 .http : //stackoverflow.com/questions/38093754/send-sms-using-sim-selection-option# – harikrishnan
+0
질문은 ** 특정 SIM에서 SMS를 보내는 방법 **을 묻습니다. 특정 SIM에 대한 정보를 얻으십시오! – Choletski
관련 문제
- 1. 특정 시간에 SMS를 보내는 방법
- 2. 듀얼 SIM 전화에서 IMEI를 읽는 방법
- 3. 듀얼 SIM 카드 안드로이드
- 4. 듀얼 SIM 모바일 모토 E (안드로이드 버전 4.4.4)에서 자바 리플렉션을 사용하여 SMS를 보내는 방법은 무엇입니까?
- 5. 안드로이드에서 특정 SIM에서 SMS를 보내는 방법
- 6. Android : 듀얼 SIM 모바일에서 두 SIM의 SIM ID를 얻는 방법
- 7. SmsManager에 의해 듀얼 sim 안 드 로이드 전화에 sms 보내기
- 8. Android 듀얼 SIM 카드 감지
- 9. C를 사용하여 'Dongle'을 통해 SMS를 보내는 방법
- 10. 그룹 SMS를 보내는 방법?
- 11. wifi에서 SMS를 보내는 방법
- 12. 전에 SMS를 보내는 방법
- 13. pjsip에서 SMS를 보내는 방법
- 14. SMS를 보내는 방법
- 15. 안드로이드에서 SMS를 보내는 방법을 확인하는 방법
- 16. 듀얼 SIM 모바일에서 하나의 SIM에서 다른 SIM으로 SMS 보내기
- 17. 안드로이드 브로드 캐스트 리시버 및 듀얼 SIM
- 18. 듀얼 SIM 체크 인터넷 연결 문제
- 19. 듀얼 SIM 모바일에서 현재/기본 SIM을 감지합니다.
- 20. vs2003을 사용하여 SMS를 보내는 방법
- 21. Java를 사용하여 SMS를 보내는 방법
- 22. isms를 사용하여 SMS를 보내는 방법
- 23. 2d 바코드 SMS를 보내는 방법
- 24. 모바일 브라우저에서 SMS를 보내는 방법
- 25. 유닉스 서버에서 SMS를 보내는 방법
- 26. Sim1 또는 Sim2를 사용하여 SMS를 프로그래밍 방식으로 보내는 옵션
- 27. iPhone의 SIM 카드에서 정보를 읽을 수 있습니까?
- 28. android에서 SIM 카드에서 SMS 메시지 가져 오기
- 29. GPRS는 GSM SIM 카드에서 어떻게 작동합니까?
- 30. SIM 카드에서 연락처를 삭제할 수 없습니다.
가능한 중복 (http://stackoverflow.com/questions/5255147/dual-sim-card-android) –
봐 http://stackoverflow.com/ 질문/5255147/dual-sim-card-android) 및 [여기] (http://stackoverflow.com/questions/19557147/send-sms-with-second-sim-card-by-android-on-samsung-duos) –