Check the unfiltered logs and check the value of Log(LastException).
ok
@Erel i tested it and i found out that the Service_Start is always called twice what leaded to intialize twice audio streamer and that caused the error
so i put a Boolean "recording" that changes from false to true on the first time service start is called and only if recording = false the stream is intialized and it
is working now like a charm
the only thing i could not understand why is service start called twice??
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Service (starter) Create **
** Service (starter) Start **
** Service (callrecsag) Create **
** Service (callrecsag) Start **
CallerID=xxx
RINGING
** Service (callrecsag) Start **
CallerID=xxx
RINGING
** Service (callrecsag) Start **
OFFHOOK
** Service (callrecsag) Start **
OFFHOOK
** Service (callrecsag) Start **
IDLE
** Service (callrecsag) Start **
IDLE
** Service (callrecsag) Start **
OFFHOOK
** Service (callrecsag) Start **
OFFHOOK
** Service (callrecsag) Start **
IDLE
** Service (callrecsag) Start **
IDLE
you can see that on ringing service start was called twice and on offhook (when call is active) and also on idle (when call is ended)
i have this in my manifest:
AddReceiverText(callrecsag,
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>)
should it be like this that the service is called twice? or is there a problem?