Android :: Android Surfaceview Is No Longer Visible After Back From Other Activity
Apr 4, 2010
i use surfaceview for camera preview. it works fine, but has one problem when i start other activity (by clicking something) and then back from that activity. after that, surfaceview is no longer visible. (but onclicklistener is working)but when i occur surfacecreated/destoryed by visible/invisible surfaceview in single activity, it works very good.
View 1 Replies
Mar 20, 2010
I recently upgraded my Android app to support multiple resolutions. Previously, my Android.manifest file had a line:
To support multiple density and resolution devices, I changed this to:
CODE:............
I then added a couple of new directories, like drawable-hdpi-v4 and drawable-long-hdpi-v4 that includes the high-res versions of the graphics. That's about it.
Ever since releasing this update, there have been a decent number of users complaining about various problems:
the app icon doesn't appear (I did not create a high res version of the icon)
the home screen widget no longer works, even if they delete and re-add it (this code did not change with the update). I've had a user send me their error log, which shows:
CODE:................
There is one questionable section in my existing widget code that may be relevant:
CODE:..........
And perhaps most troublesome: the sqlite database is no longer accessible/writeable for some users so their data is no longer available. I did add the WRITE_EXTERNAL_STORAGE permission to the manifest. This is only happening to certain users and it tends to be HTC Eris users. In that error log I see things such as:
CODE:.........
It's as if the update has caused a new process and it can't access the old process's data, or something.
View 1 Replies
View Related
May 18, 2010
When exiting the activity in a thread in a SurfaceView. This log appears in this situation:.............
View 2 Replies
View Related
Aug 27, 2009
I just got my camera preview working for my app, but it is not appearing where I want it to appear, and I'm not sure how to get it there. Instead of using the entire screen for the preview, I would like to put it inside a surfaceview in an activity xml gui. What do I need to change? Here is my code:
public class TakePic extends Activity {
SurfaceView camSurface;
Preview camPreview;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);//hide window title
camPreview = new Preview(this); //create preview
setContentView(R.layout.takepic);
setContentView(camPreview); //set preview as activity content
camSurface = (SurfaceView) findViewById(R.id.camsurface); }
View 5 Replies
View Related
Jul 27, 2009
1)Which is better for developing a game.
a)Using XML layouts
b)Using Custom layouts with Surface view
2) while making a custom view using Surface view... do we need to have a secondary thread to implement the surfaceholder.callback()......
My code below does not show the activity in grey background as i have coded... do i need to use the unlockcanvas and all ,,but i havent used the secondary thread
CODE:..............
View 2 Replies
View Related
Jun 17, 2010
How can I know the visible size of my activity? I'm trying to get the Activity real size, not the height and width from getHeight() and getWidth(),which gives me the screen full size.
View 2 Replies
View Related
Jun 28, 2010
I would like to launch an intent when any of my activity is visible, otherwise I will put it up as a notification, and will be fired by the user. To decide this, I need to know if any of my activity is front-most, how do I that?
View 3 Replies
View Related
Aug 20, 2010
One using a Surfaceview, and the other using a custom view. According to the android SDK development guide, using a surface view is better because you can spawn a separate thread to handle graphics. Th SDK development guide claims that using a custom view with invalidate calls is only good for slower animations, less intense graphics.However, in my simple app, I can clearly see that using a custom view with calls to invalidate seems to render faster.What do you guys know/think about this?My touchEvent code is exactly the same, and my drawing code is exactly the same. The only difference is that one is all in the UI thread, and the other is using a tread to handle the drawing.
View 1 Replies
View Related
Aug 7, 2010
I am experimenting with using a WebView to display Flash content inside my activity. Everything is working pretty well, but when the user hits the home key to put the activity into the background, the Flash content keeps running (sound keeps playing, etc)
I have noticed that both the stock Android browser and Dolphin Browser seem to avoid this problem, and properly pause the Flash content when the browsing activity is put into the background.
Ideally I would like a solution that kills the WebView completely if the activity is finishing, but pauses it otherwise (basically copying the default behavior of the browser)
Here is a simple test I put together that loads a game on Kongregate which has some background music:
CODE:..............
I took a look at the latest source for the stock browser, and it seems to be doing something similar (calling pauseTimers/resumeTimers), although I fear the code I have been looking at is out of date, because it is calling functions that don't seem to exist anymore.
I did verify that the call to pauseTimers is working by testing with a simple JavaScript setInterval which updates a counter. Is there something else obvious that I should be trying in regard to Window or View management?
The documentation for the mobile Flash player says:
Flash Player will also automatically pause SWF playback it is not in view or the foreground application, for example when a call is received or alarm goes off, to reduce CPU utilization, battery usage and memory usage.
This seems to be working perfectly in both the stock browser and Dolphin Browser, but not in my app. Any ideas/solutions would be greatly appreciated!
Update: Here is the function we ended up adding to our activity to get this to work. We call it with "onPause" in the activity's onPause function and "onResume" in the activity's onResume function:
CODE:....................
View 2 Replies
View Related
Sep 23, 2010
like many others, I want to kill my Android application on "exit" button. Really kill, not just move to background and stop all active code. (I know very well that Android does not like it.) I found Process.killProcess(Process.myPid()); and System.exit(0) which both work fine (I have no problem with activity stack, the "exit" button is in my base Activity.). But there is a problem. When I kill my process and I am back in the shell, I press [Home] button. It shows list of applications that are on the background including my application which has been killed.
Is there a way how to do both: 1) kill the process and 2) remove it from the Android application list that is shown after user presses [Home] button? Thanks for all replays (with the exception of that stupid "you should not exit applications explicitly on Android"
View 2 Replies
View Related
Sep 21, 2009
When i ran my old application in 1.6 i noticed that the progress bar was not showing up on the screen.When i analyzed it further i found the issue.The progress bar is getting activated but its not visible since my background color is also white.When i changed the background color i was able to see the progress bar.Is there no other way to make the progress bar visible other than changing the background color..Shouldn't the progress bar be visible under all background colors??
View 2 Replies
View Related
Jul 5, 2010
I have developed an App that launches and works fine on Android 1.5 and 1.6. When I try and use it on version higher then that the app's activity starts, progress dialogs pop up and I can see my Async Task executing and the info being returned via Logcat. No errors or exceptions are shown. But the Activity never displays. All I see is the progress dialog showing over the home screen and then nothing. The process is active and running under the DDMS view.
View 1 Replies
View Related
Oct 19, 2009
when I send text messages which are longer than one line but less than 100 characters, sometimes the other person texts back that all they see is an empty box. At first I thought it was the other persons phone but several people are telling me the same thing. This does not always happen, but often. One liners seem to have no problems. I called Rogers tech support and they give me the same aswers all the time for different problems.
1. reset the phone to factory settings(which I already did, and same thing happened)
2. If you would like we can send a replacement phone since the problem seems to be hardware related.( I doubt this, since I can send texts and other person receives them, except the times they receive an empty box)
View 1 Replies
View Related
May 8, 2010
Well I just received my Nexus One on Wednesday. In the last 24 hours I have noticed an odd issue that the case doesn't seem to line up on the back under the metal strip. Its where the plastic and the strip come together on part that has the HTC logo, they don't line up and there seems to be a small visible space. Its more prevalent on the left and there also seems to be some degree of flex on the left side. So I just wanted some input if this seems normal or ok. Should I be calling HTC and attempting to get it replaced?
View 17 Replies
View Related
Jul 19, 2010
For some reason, one activity (launched in a new process) often takes longer than 10 seconds to start, which exceeds the LAUCH_TIMEOUT defined in ActivityManagerService.How do I make the VM tolerate longer launch time without giving up wake lock?
View 3 Replies
View Related
Jan 26, 2009
I have an application with contains multiple activities. The main activity will start the others ( use startActivity() ) depends on user event, when an activity close, it calls finish() and return back to main activity. It appears to behavior like that.
However, the "problem" I see is main activity's onCreate function is called every time. I think the the main activity should be placed in the activity stack and simply push to front when others exit, therefore only onResume, onStart are called. Is there some flag I need to set or I misunderstand the activity behaviro?
In child activity, besides calling finish() or startActivity for main activity, what is other way to move main activity to front?
View 2 Replies
View Related
Mar 3, 2010
example scenario is: from login screen - main screen - then when i clicked a hide button the app will go to home screen, and when im going to click the app again the main screen would be called.
View 2 Replies
View Related
Aug 24, 2010
I'm running launcher Pro and during a missed call, I went to call log to text back, it defaulted to stock message program. It asked me which program I wanted to open and I accidentally chose stock and set it as default.How can I change it back to hand cent?
View 5 Replies
View Related
Nov 24, 2010
I am launching an activity to make a phone call, but when I pressed the 'End Call' button, it does not go back to my activity. Can you please tell me how can I launch a call activity which comes back to me when 'End Call' button is pressed?
View 5 Replies
View Related
Aug 25, 2010
I was wondering how or if it is possible to exclude activities from the back buttons history list? For example not letting the user back into the Splash Screen?
View 2 Replies
View Related
Nov 14, 2009
I've been searching and looking for this answer for quite some time now. I want to display a little HTML in a webView.
When the User read the HTML, he's supposed to use the back button to go back to the previous activity. However, it closes the App.
How can I make it go back to the last Activity? It would also be ok to display a soft back button or something. Here my code...
View 2 Replies
View Related
Nov 2, 2010
on the ui i am having a back button displayed. there are three activities say A,B,C. Activity A is splash screen. Activity B is home screen. Activity C is edit screen. on edit screen only i am having a back button. when the user press that i open the activity B which also contains some sort of http request and response. i want that the previous activity from stack should get displayed? how can i achieve that? i am able to open previous activity on pressing the back button of device? when i press back button on device there doesnt goes any http request? i want to achieve this behaviour when i press the ui back button.
View 2 Replies
View Related
Aug 17, 2010
My app chains some activities.
if you press the back button, you go back through old activities then you suddenly quit the application !
so I need to show a message like "do you really want to exit" if it's the last activity on stack
I know how to override the back button but i can't figure how to know how many activity are in history
CODE:..................
View 1 Replies
View Related
Jul 14, 2010
I have an activity defined as below:
CODE:............
A strange thing is that, when running on emulator, and the back key is pressed, the activity was destroyed (I saw onDestroy() called in log). But when running on my Nexus One phone, and the back key is pressed, the activity is not destroyed (I didn't see onDestroy() called in log).
View 1 Replies
View Related
Mar 10, 2010
I'm doing some network job in AsyncTask. Sometimes it requires communication with user. (connection is dropped, session is expired and so on). I want to pop up a dialog or launch an Activity, and then, depending on user's input, stop the job or redo it. I can launch any Activity from AsyncTask, but how to get result back? It seems to be possible only if I launch new Activity from another Activity. What are possible solutions?
View 5 Replies
View Related
Apr 7, 2010
Android - Can I force BACK button to go 2 steps back in the Activity stack with some kind of code? I know I can override the onKeyDown method but I want BACK to do it's thing, just twice!
View 3 Replies
View Related
Oct 28, 2009
When user presses BACK key, my activity's onDestroy is called and then it is killed. Is there a way (by overridding Activity.onKeyDown??) to simply put the activity into background without killing it? I want the BACK key to act like the HOME key (which doesn't kill my app), except I want to show the activity immediately below my activity.
View 7 Replies
View Related
Jan 29, 2009
Our application has a fair amount of java script. As far as we known, WebView widget doesn't handle AJAX, therefore we want to bring up the brower to load the url. The problem is, after user done with browser, how can it goes back to where it left in our application? ( when user quit the browser, our application will show up the activity before went to browser)
View 2 Replies
View Related
Mar 30, 2010
I'm in a small problem.i have three activities (suppose A,B,C) after performing onclick event in activity A, i can go to activity B and then C..my question is that is there any way to comeback activity A from C..here is the code snippet public void on Create(Bundle Code...
View 3 Replies
View Related
Oct 22, 2009
I am starting an external activity from my application and would like the back button to return the user to the point in my application where they started the activity. is this possible?
View 7 Replies
View Related