2010-09-14 17 views
7

1) Esiste un modo per inviare una PDU SMS raw da un dispositivo Android?SMS raw pdu in Android

Oppure,

2) ci sono tutte le classi disponibili che mi può dare l'accesso alle intestazioni PDU (ad esempio TP-DCS) in modo che possa costruire l'unità di distribuzione dell'alimentazione come mi piace?

ho cercato la rete e trovato: http://www.androidjavadoc.com/1.0_r1_src/com/android/internal/telephony/gsm/ISms.html ma quanto sopra classi sono private e come tali non sono a mia disposizione (non hanno in realtà capito perché).

È quello che sto chiedendo possibile in qualsiasi modo o no? Se no, allora perché non posso avere quel tipo di funzionalità?

Thanx

risposta

5

questa è una caratteristica requested per l'API pubblica.

I commenti dello sviluppatore suggeriscono di utilizzare lodall'API interna SMSDispatcher, che può essere eseguita tramite reflection. Tuttavia, l'uso di API private per il codice di produzione è altamente sconsigliato

Non è chiaro se è possibile inviare utilizzando l'API pubblica TelephonyManager.

/* 
* 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) { 

In conclusione: non è chiaro se è possibile. Ho la stessa domanda come te.

+0

Dopo così tanto tempo e dopo essere stato in grado di accedere nuovamente al mio account. Grazie mille per la risposta! – zlinks

1

So come. http://www.silentservices.de/products/android-hushsms/ e xposed quadro http://repo.xposed.info/module/de.robv.android.xposed.installer
È necessario eseguire il root del telefono per utilizzare il modulo xposed "raw-pdu", ma funziona. Hush-sms fornisce la funzionalità/estensibilità api per inviare i 7 tipi di sms raw.

+0

Quando ho postato questa domanda, stavo saltando per una soluzione che non prevedeva il rooting, in modo che l'app sviluppata potesse funzionare/essere installata senza problemi in quasi tutti i telefoni. A quanto pare, non esiste una soluzione di questo tipo. Anche se non ho il tempo di controllare adesso, inviterò la tua risposta in quanto sembra una buona alternativa/soluzione alternativa per le persone che sono ancora interessate. – zlinks