I am a complete newbie in Android.
I am developing an application that sends over a webservice information about the last dialed number, call status, and duration of the call.
The application works perfectly fine, but when the device closes the application the android service does restart but the activity does not.
The way I am sure about that is that I have Toasts when the service is started: "Servicio TRUCKA iniciado" and "Servicio TRUCKA creado" tell me that the service has been created and started.
And when the information is sent to the webservice I have toasts saying: "Enviando información..." and "Información enviada."
But when the application is closed (via the android task manager that automatically closes apps) the messages from the service "Servicio TRUCKA iniciado" and "Servicio TRUCKA creado" do appear, but the toasts from the information sent part do not.
I hope someone can help me and tell what am I doing wrong?
Really really thanks a lot!
I can not add code to the post, so I am adding the project hoping someone can help me
CLOSED
Human stupidity has no limits.
My actions where not in the service
Related
Hello.
Has anyone implemented an application, using lineSendUSSD() and
lineGetUSSD() functions from cellcore.dll?
I would be very interested about Smartphone 2003 (Qtek 8080), but working code sample on PPC would do just fine. I can take it further from there
The problem itself is very simple:
- I need to open the line and send a USSD command, for example *100#
- I receive sort of menu, i need to parse it and send a specific command,
like 123
- I read the response to this command and end USSD session.
I have managed to do it with 'one step query', similar to '*100*123#'. Program makes the call (using lineMakeCall) and catches the LINE_USSD event successfully, after that lineGetUSSD() retrieves the correct data.
The LINE_USSD event seems to be generated only in case of operator ending the USSD session.
lineSendUSSD() claims, that everything goes OK, but nothing happens.
I hope someone has experimented a lot further with this functionality and can help me...
lineGetUSSD
Were you able to catch data using lineGetUSSD? Can you please post your code sample here?
I was able to open the line and send USSD. I was able to get LINE_DEVSPECIFIC message via lineGetMessage when network sends the response, but after that lineGetUSSD() return LINEERR_OPERATIONFAILED. At the same time popup with the USSD response appears on the screen.
The questions are:
1. What are the parameters for lineGetUSSD call?
2. How I can disable standard USSD listener?
Thanks in advance
i can't get ussd message also with lineGetUSSD function. in smartphone, the return code is LINEERR_OPERATIONUNAVAIL, someone say it is caused by program signature. but in PPC, the return code is LINEERR_OPERATIONFAILED, i have no idea about this error.
i can send ussd data with lineSendUSSD in PPC, but can not in smartphone, the return code is LINEERR_OPERATIONUNAVAIL
is anybody know how?
Hi,
I need to develope an application that basically replaces the caller ID screen that pops up when you have an incoming call and show some more information on the caller, then let the user answer or decline the call.
any help on where to look first (or maybe code snipets if i'm lucky) highly appreciated.
Cheers,
Shafa
I think you may have a hard time if it is truly a seperate application you wish to write. I have written a program to try to be used at the same time as cprog.exe and when that incoming call window comes up nothing I have tryed will let the user interact with any windows I create. You could stop that process but most users will not want to do this. I ended up having my program automatically determine if it wants to accept the incoming call and answer it itself. This was particularly anoying because my incoming call interest was set to data only and cprog dose not normally even register an incoming call that is purly data. But after I had initialized tapi with my settings cproc unexpectedly shared the same interest for incoming data calls.
Just as speculation - if your program was constantly running, when an incoming call is offering, you could enumerate the desktop windows using EnumWindows and its associated callback function to get the hwnd of the ballon that comes up. Then perhaps you could close the incoming call window or send it to the bottom of the z order and use your own to replace it. I do not know what effect this would have on cprog.
code related to tapi tends to be long so your not that lucky
:lol:
Hi all,
How can I catch the incoming call's phone number (Caller ID) using the MFC?
If I use .NET there is SystemState and the SystemProperty PhoneIncomingCallerNumber. But what is similar with MFC?
Has anybody maybe a code snippet?
Joline
For WindowsMobile 5.0 and above you can read it from the registry.
Don't remember the exact reg key... but look in the SDK for:
SN_PHONEINCOMINGCALLERNUMBER_ROOT
SN_PHONEINCOMINGCALLERNUMBER_PATH
SN_PHONEINCOMINGCALLERNUMBER_VALUE
Best regards
Øystein
Thanks. This works.
I wrote a program which uses notifications and catches an incoming call. To see if that works the program opens a message box if there is an incoming call. But regrettably first I get the notification from the system and AFTER hang up the message box from my program appears.
What can I do that my program catch the call BEFORE all other programs notify this (e.g. to change the ring tone depending on the caller id)?
Joline
IMHO iits not so easy. You must use TAPI library and/or directly Ril.
Where can I find useful information about how to use TAPI and RIL (maybe with examples)?
Joline
For RIL exists only fragmentary informations - good source is forum http://www.teksoftco.com/forum/viewforum.php?f=15.
For TAPI examples search Windows Mobile SDK.
I need the same phone number catching in PHP
Hi ,
I need to generate the popup using PHP while the call is landed in our phone.
how can we do this?
Thanks and Regards,
JayarajMohan.J
While I am not new in any way to Java programming, I am still quite a novice at Android development. Regardless of this, I took it upon myself to mobile-ify a custom chat applet for a website I frequent. The question here is, what would be the best way of going about this?
The application needs to be able to store login info on the device for ease of use. Every time the user joins the chat, it will send a POST request to the website's login.php with the stored username and password, to get an SID back which will be used to login to the chat. For this I plan on using a simple SQLite database.
After it has the SID, the phone will establish a connection with the server and, once connected, send it a message containing "/login [sid]". From then on, the user is connected to the chat and will receive messages and be able to send them. How I'm currently going about this is to use a background Service which will actually handle the connection, so the user can put the chat on hold while they do something else, and when they return will still be connected and receiving messages.
This second part is what I'm not sure about: since the Service handles the connection, the Activity which handles the UI needs to be aware of it. I'm having trouble wrapping my head around this aspect of Activity-Service communication. Would a BroadcastReceiver or some other class be more suited for this purpose? It's hard to decide when the examples provided in the Android Dev Guide don't quite match up.
Any helpful tips or suggestions are always appreciated.
Activity-Service interaction is tricky, hope this helps:
http://developer.android.com/reference/android/app/Service.html#LocalServiceSample
Hello all,
I have a question about Android service and broadcast.
For my application I am trying to keep track of the time with the Timer class.
The user can press a button and a timer will increase his value. (visible in activity).
What I am trying to achieve is to keep this timer going even if the user closes his application.
And after some specific time (say like every 10 mins) I want to send the user a notification to let him know the timer is still running.
Am I using the right implementation for using a service and broadcast?
I'd say there is no need for any broadcasts.
The Service can keep track of the Timer and Notification, then your Activity either starts and binds to the Service or if the Service is already started it rebinds.
Then use a PendingIntent to either stop the Service or start the Activity on Notification clicks, depending on your flow.
registered-user said:
I'd say there is no need for any broadcasts.
The Service can keep track of the Timer and Notification, then your Activity either starts and binds to the Service or if the Service is already started it rebinds.
Then use a PendingIntent to either stop the Service or start the Activity on Notification clicks, depending on your flow.
Click to expand...
Click to collapse
Thanks for your reply! I meant alarmmanager sorry! My idea was to check every x amount of time with my alarmmanager if my service (timer) is still running. Or is there also no need for a alarmmanager?
I guess you could do that, depends on the overall goal. You could also create a static flag in your Service that is flipped on start and on stop. Then post a delayed runnable/message to check the flag?