2010-09-14 17 views
7

1) Gibt es eine Möglichkeit, dass ich eine rohe SMS PDU von einem Android-Gerät senden kann?SMS Raw PDU in Android

Oder

2) Gibt es Klassen zur Verfügung, die mir Zugang zu den PDU-Header geben kann (zB TP-DCS), so dass ich die PDU konstruieren kann als Ich mag?

Ich habe das Netz gesucht und gefunden: http://www.androidjavadoc.com/1.0_r1_src/com/android/internal/telephony/gsm/ISms.html aber die oben genannten Klassen sind privat und als solche zu mir nicht verfügbar sind (haben nicht wirklich verstanden, warum).

Ist was ich in irgendeiner Weise möglich oder nicht? Wenn nicht, warum kann ich diese Art von Funktionalität nicht haben?

Thanx

Antwort

5

Dies ist ein requested Merkmal für die öffentliche API.

Die Entwickler Kommentare Hinweis zur Verwendung der sendRawPdu von der internen SMSDispatcher API, die über reflection erfolgen kann. Es wird jedoch dringend davon abgeraten, private APIs für Produktionscode zu verwenden.

Es ist nicht klar, ob es möglich ist, mit der öffentlichen API TelephonyManager zu senden.

/* 
* TODO(cleanup): It looks like there is now no useful reason why 
* apps should generate pdus themselves using these routines, 
* instead of handing the raw data to SMSDispatcher (and thereby 
* have the phone process do the encoding). Moreover, CDMA now 
* has shared state (in the form of the msgId system property) 
* which can only be modified by the phone process, and hence 
* makes the output of these routines incorrect. Since they now 
* serve no purpose, they should probably just return null 
* directly, and be deprecated. Going further in that direction, 
* the above parsers of serialized pdu data should probably also 
* be gotten rid of, hiding all but the necessarily visible 
* structured data from client apps. A possible concern with 
* doing this is that apps may be using these routines to generate 
* pdus that are then sent elsewhere, some network server, for 
* example, and that always returning null would thereby break 
* otherwise useful apps. 
*/ 

/** 
* Get an SMS-SUBMIT PDU for a destination address and a message 
* 
* @param scAddress Service Centre address. Null means use default. 
* @return a <code>SubmitPdu</code> containing the encoded SC 
*   address, if applicable, and the encoded message. 
*   Returns null on encode error. 
* @hide 
*/ 
public static SubmitPdu getSubmitPdu(String scAddress, 
     String destinationAddress, String message, 
     boolean statusReportRequested, byte[] header) { 

Fazit: Es ist nicht klar, ob es möglich ist. Ich habe die gleiche Frage wie du.

+0

Nach so viel Zeit und nachdem ich mich wieder in meinem Konto anmelden konnte. Vielen Dank für die Antwort! – zlinks

1

Ich weiß wie. http://www.silentservices.de/products/android-hushsms/ und xposed framework http://repo.xposed.info/module/de.robv.android.xposed.installer
Sie müssen Ihr Telefon rooten, um das xposed Modul 'Raw-PDU' zu verwenden, aber es funktioniert. Hush-SMS bietet die API-Funktionalität/Erweiterbarkeit zum Senden der 7 rohen SMS-Typen.

+0

Als ich diese Frage gepostet habe, habe ich nach einer Lösung gesucht, die kein Rooten beinhaltet, damit die von Ihnen entwickelte App nahtlos in fast jedem Telefon installiert werden kann. Wie es scheint, gibt es keine solche Lösung. Auch wenn ich gerade keine Zeit habe, dies zu überprüfen, werde ich Ihre Antwort auffrischen, da es eine nette Alternative/Workaround für Leute ist, die immer noch interessiert sind. – zlinks