posted 12 years ago
hello all,
i'm an android beginner/intermediate programmer.
I encountered a big problems were not resolved almost 1 week.
i creating of an android app sms auto responder were using BroadcastReceiver to catch
what i doing is almost haven't problems at all, and running well
except on part of transfering process data from bundle sms to
the permission on manifest i already input :
on above code i using
it used for function 1st priority sms receiver, and also to override so that other applications do not read and save the sms input.
the app were i created is using more than 3 activity, and using bluetooth service receiver (those part is working well, so ti doesn't need to showed here).
the MainActivity are the central function control for enable/disable the bluetooth service, reading databases, and others.
so the smsReceiver start working after i installing the app and also start the MainActivity.
these some part state method oncreate, onstart, onpause, onstop, etc in MainActivity :
OnStart state :
On Start there a timer using to viewing and update data from databases :
Onresume part:
OnStop :
For receiving sms i using SmsReceiver as BroadcastReceiver, here the codes :
here the code DisplaySmsPrompt class for processing the incoming sms as an Activity :
i have tested as separate app only using class broadcastreceiver, Activity, single layout xml, & database helper (by implementing as SQLiteOpenHelper)
as an sms app (receiving and storing data to SQLite db) and it works fine,
after receiving sms, the mainActivity (only single Activity) displaying the sms and stored the sms data.
but after i implementing in more complex app, the sms broadcastreceiver success receive the sms and also success sending to DisplaySMSPrompt Activity (showing log at on create and resume state )
but the Activity SMSLogAdapter has stopping work (just displaying blank and the textview not displayed) then it gets launch timeout, here are logcat :
i also trying implementing PARTIAL_WAKE_LOCK to avoding the sms receiver activity not dead, but it useless too, it get same problem.
as in part :
i guess some of my mistakes are the implementing double multi intent filter as MAIN LAUNCHER, as showed on above XML. but i also try change it using single MAIN LAUNCHER just
for MainActivity and for DisplaySmsPrompt Activity just implementing intent filter action VIEW :
BUT IT ALSO DOESN'T RESOLVE THE PROBLEM !
what i want to ask ARE ANYONE KNOW THE CAUSE OF EXPIRED TIME OUT, ARE BECAUSE THE WRONG IMPLEMENTING ACTIVITY, BROADCASTRECEIVER OR OTHERS ?
what part were i wrong implementing the broadcast/activity, or others ?
as far as i know, i doesn't found any documentation/forum (that implementing broadcast receiver on Activity more than one) were maybe related of this problem.
i hope someone had the solution, and gave fast reply. Because, I need to resove these problem to get finish the app before deadline in 2 days later.
I IMPLEMENTING THESE APP NOT USING AN EMULATOR, BUT USING ANDROID DEVICES (SAMSUNG GALAXY I5503/froyo)
thank you.