Android :: Creating And Showing A View/window From A Service
May 22, 2009
I want to show a view on calling a Service API. Currently the only way looks like using the Toast class.
I tried the following after getting the WindowManager service, but it crashes at addView. I looked into the Toast class and found that it uses WindowManagerImpl which is not accessible publicly - is there any way to access the WindowManagerImpl functionality?
CODE:.................
View 4 Replies
May 7, 2009
Is there any way to create window on Android using C++.
View 2 Replies
View Related
Jun 24, 2009
I have a service running in the background.I have a background thread that gets a reference to the service from the application's main activity. But when the background thread calls a method in the service to display a toast, I get the "Looper not initialized exception".Why,if I have a valid, bound reference to a Service, does this still happen?
View 4 Replies
View Related
Nov 12, 2009
I am developing an ip phone an android.it may work as a service in background.when a call(or a message) coming in,I need a window(dialog or activity) popup.how to do that?
View 2 Replies
View Related
May 4, 2010
Is there a way to access the currently active window belonging to a different process from a background service and be allowed to modify some of its properties such as the transparency?
View 2 Replies
View Related
Feb 3, 2009
How to create an Android service (that uses IPC) using eclipse?
View 2 Replies
View Related
Aug 4, 2010
How do I start a project wherein I can design an application which fetches weather forecasts from existing web sites?
View 1 Replies
View Related
May 7, 2010
I can't find a way to obtain a reference the Window containing an arbitrary View v. I found getWindowToken, but I can't figure out how to use it? Does anyone know how? Also, does anyone know why it returns an IBinder rather than a Window?
View 1 Replies
View Related
Sep 28, 2010
I have issue with displaying AlertDialog from Service. I am able to display custom layout window using Toast or using WindowManager(TYPE_SYSTEM_ALERT or TYPE_SYSTEM_OVERLAY). But, I do not want to use custom layout, I prefer to use nice AlertDialog GUI directly.
Scenario:
Running Service. No active Activity present. On some external event, Service sends Notification
When user press Notification, Service is informed via PendingIntent and AlertDialog should be displayed (created with AlertDialog.Builder(this))
Error: ERROR/AndroidRuntime(1063): Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application. Searching for the answer lead me to impression that I am trying something that is currently not possible (Android 2.2). Or maybe it is.
View 1 Replies
View Related
Apr 6, 2010
I want to create a service in Android which will initially ask user if he/she wants to start blue-tooth and set the blue-tooth discovery.
My questions are
1) Can i launch in the service following activities? if
CODE:.............
2) I want to set discoverabilty of the phone on for lifetime of application. is it possible??
3) I want to access empty space available on sd card. How should i do it??
View 2 Replies
View Related
Nov 20, 2010
I'd like to ask about how to proper handle progress Dialog in Thread, since getting the error from subject. My code...
View 2 Replies
View Related
Sep 4, 2010
What's the best way to check if the view is visible on the window?
I have a CustomView which is part of my SDK and anybody can add CustomView to their layouts. My CustomView is taking some actions when it is visible to the user periodically. So if view becomes invisible to the user then it needs to stop the timer and when it becomes visible again it should restart its course.
But unfortunately there is no certain way of checking if my CustomView becomes visible or invisible to the user. There are few things that I can check and listen to: onVisibilityChange, it is for view's visibility change, and is introduced in new API 8 version so has backward compatibility issue onWindowVisibilityChange, but my CustomView can be part of a ViewFlipper's Views so it can pose issues onDetachedFromWindows, this not as useful onWindowFocusChanged //Again my CustomView can be part of ViewFlipper's views. So if anybody has faced this kind of issues please throw some light.
View 1 Replies
View Related
Feb 8, 2010
I am having some of the following exceptions:
CODE:................
I have googled it and see that it has something to do with popups and turning the screen, but there is no reference to my code.
The questions are:
Is there a way to find out exactly when this issue is happening? other than turning the screen, is there another event or action that triggers this error? how do I prevent this to happen?
View 3 Replies
View Related
Apr 4, 2014
Can you create a popup window in eclipse with web view in it, if so remotely how to achieve this. Im trying to get part of an app when loaded to automatically popup a web view box over the top of everything
View 1 Replies
View Related
Nov 10, 2010
I'm developing an Android application that consists of:
a lightweight background service that logs events to a DB
a heavier GUI application that summarizes these events and displays graphs.
I'm having trouble creating the service part, though. The graphic application can use quite some RAM, and when it goes to the background, the OS closes it after some time of not being used.
The problem is, when the application gets shut down, so does the service. This is bad because this keeps me from recording further events. I don't care if the application gets terminated, but the service needs to keep on running.
I have tried numerous ways to keep the service alive, like having it use threads or a differently named process than the main app. Nothing has worked, and I have found no help on any of the android developer pages or forums.
View 3 Replies
View Related
Jul 31, 2010
I am getting the following remotely from clients so I don't know what hardware etc they are using.
CODE:................
This is happening because of a ProgressDialog
CODE:.............
The Activity looks like this in the Manifest.
CODE:........................
So what could this mean? I think it has something to do with the Activity being destroyed then created but as you can see I have the configChanges set correctly.
View 1 Replies
View Related
Nov 19, 2009
I recently got some fade in stuff working so that my "loading" view is an ImageView that takes up the whole screen, and then I fade in the main view (a GridView in this case) over the top of it. In the activity creation, I call:
CODE:.........
Then when the loading AsyncTask is done, I call the following:
CODE:...............
Do I need to do anything in particular to clean up the loading_foo view to reduce the amount of memory my app is using? Any other issues with this approach?
View 1 Replies
View Related
Aug 2, 2010
I'm trying to do a fairly simple thing but i'm failing since 3 hours.
I have a WebView that i show with some pictures and html stored in local sdcard. After the user clicks a button in my app, i want to show the webview, and when he press the back button, i want to return to the previous view (which is my main app view).
How to do it? I tried this:
CODE:.............
However, when i press back, my app quits.
View 5 Replies
View Related
Jun 10, 2010
When I apply some animation to the view, which is out of window, the animation not start immediately. And then, I scroll the screen to show the animation target view, the animation will start. I hope to the animation will start immediately when it apply.
Bellow is sample code.................
View 3 Replies
View Related
May 5, 2009
I am using a custom title view in my application for each activity. In one of the activities, based on button clicks I need to change the custom title view. Now this works fine every time when I make a call to setFeatureInt.
But if I try to update any items in the custom title (say change the text of a button or a text view on the title), the update does not take place.
Debugging through the code shows that the text view and button instances are not null and I can also see the custom title bar. But the text on the text view or the button is not updated. Has anyone else faced this problem? How do I resolve it?
View 9 Replies
View Related
Sep 16, 2009
The app widget documentation indicates that the "widget provider"being a receiver of a broadcast service may not exist (the process) beyond the completion of the call.If I want to maintain state between two broadcast events, such as say widgetProvider.onUpdate(), can I start a local service and leave it hanging there until my widgets are disabled? If I didn't explicitly stop that service will it be loaded again and resumed when the device wakes up.
View 4 Replies
View Related
Nov 22, 2010
how can we create diamond shape view using 2D or 3D,I need to show the Images in that customized view instead of default ImageView class
View 2 Replies
View Related
Jun 1, 2010
Other questions say that the style cannot be set programmatically, but a View can be initialised with a style such as when it is loaded from XML.How can I initialise a View with a particular style programmaticly (not in XML)? I tried using View(Context context, AttributeSet attrs, int defStyle), but I don't know what to parse in for the second argument. Passing in null results in the View not being displayed
View 1 Replies
View Related
Nov 8, 2010
I am getting this error automatically sent to me from a lot of beta users. ava.lang. Illegal ArgumentException: View not attached to window manager at android.view. Window Manager Impl.findViewLocked(WindowManagerImpl.java: 355) At android.view.Window Manager Impl. removeView(WindowManagerImpl.java:200) at android.view. Window $LocalWindow Manager . removeView(Window.java:43 2) at android.app.Dialog .dismissDialog(Dialog.java:278) at android. app. Dialog. access $000 (Dialog.java:71) at ndroid.app .Dialog$1.run (Dialog. java:111) at android .os.Handler.handleCallback(Handler.java:587) at android.os. Handler. dispatch Message(Handler.java:92) at android. os.Looper. loop (Looper.java:143) at android.app. Activity Thread . main (Activity Thread.java:4701) at java. lang.reflect .Method.invokeNative(Native Method)at java.lang.reflect.Method.invoke(Method.java:521) At com.android. internal.os. ZygoteInit $Method And Args Caller.run (ZygoteInit .java:868) at com.android.internal. os. ZygoteInit .main(ZygoteInit.java:626) at dalvik . system . Native Start.main(Native Method) Since it comes from external beta users I dont know what they were doing when they got it. Nor do i know how to reproduce it. The stack trace does not list any of our code. Usually, this error means that there was an orientation change while a dialog was open, thereby invalidating the reference to the dialog when android recreates it. All of my activities already uses Android:configChanges="keyboardHidden|orientation" in order to prevent them from doing this. We still get the error. Has anyone else seen this before? What could be the problem?
View 6 Replies
View Related
Apr 30, 2010
I have an activity that starts AsyncTask and shows progress dialog for the duration of operation. The activity is declared NOT be recreated by rotation or keyboard slide.
CODE:............
Once task completed, I dissmiss dialog, but on some phones (framework: 1.5, 1.6) such error is thrown:
CODE:...............
My code is:
CODE:................
From what I have read (http://bend-ing.blogspot.com/2008/11/properly-handle-progress-dialog-in.html) and seen in Android sources, it looks like the only possible situation to get that exception is when activity was destroyed. But as I have mentioned, I forbid activity recreation for basic events.
View 4 Replies
View Related
Mar 9, 2010
not sure how to inflate this from my layout file: MyView v = LayoutInflater.from(this).inflate(R.layout.myview, null); the inflater of course does not know what 'MyView' type is, and returns only View. What's a good way to reconcile this?
View 1 Replies
View Related
Jun 9, 2010
I have to dynamically add a list of views (the views use RelativeLayout). Can I do this by specifying the view definition in xml and instantiate multiple objects off it? This gives the usual benefits of separating the view part from the code (for e.g., making it easy for the UI guys to alter things) or Is going the ArrayAdapter the suggested/only route?
View 1 Replies
View Related
Sep 4, 2012
Can I have some tutorial to create simple android calendar? How to show month view, week view, day view, and create activity.
View 1 Replies
View Related
Nov 20, 2010
I'd like to ask about how to proper handle progressDialog in Thread, since gettings the error from subject.
My code:
CODE:.......
Problem occurs when a dialog progress appears and I change my phone orientation, it freezes and crashes.
View 3 Replies
View Related
May 9, 2009
I am wondering how to track down this IAE? It doesn't mention my code (com.newsrob.*) in the stack trace.
Is there anymore information that I can automatically gather and include in the bug reports to get a better understanding why this happens?
CODE:..............................
View 7 Replies
View Related