jinzigui / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

How to auto launch file viewer after file transfer is complete when In-Call #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. We are "in-call" and try to share content e.g. a .jpg file, 
2. After file transfer is complete, how to auto launch another activity say a 
JPG viewer to view the file that was just transferred?
3. I tried to launch my activity from MyMsrpSession.java takeIncomingSession 
(case FileTransfer) but does not work. My code is shown below:
Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setClassName("android.JPGViewer", "android.JPGViewer.JPGViewer");
Activity a = new Activity();
a.startActivity(i);

What is the expected output? What do you see instead?
I expect that once the file transfer is complete the new jpg viewer activity 
should be auto started. However, I get the following error message.
Error: Can't create handler inside thread that has not called Looper.prepare()

What version of the product are you using? On what operating system?
IMSDroid/v1.2.353 (doubango r539) on Android 2.2

Please provide any additional information below.

Original issue reported on code.google.com by kow...@gmail.com on 7 Feb 2011 at 9:12