Android :: Make An Alert For A Background Process?
Apr 29, 2009I have a background process that save data in my sdcard how can i be alert ?!! it is an application run in background.
View 2 RepliesI have a background process that save data in my sdcard how can i be alert ?!! it is an application run in background.
View 2 RepliesIs there a way to craft a daemon process as to make it "unlistable" to a process viewer?
OR
is there a way to dynamically change a process name?
I'd like to design a security application without having to modify the firmware, if possible (yes I know about "security through obscurity"...).
I'm facing a new problem in my app. That is 'Low Memory. No More Background Process'. In my app i'm just retrieving data from DB and displaying in custom Listview. I'm using view flipper also. when i start running my app its running fine. in few seconds its closing without any information. what's the problem in this?
View 7 Replies View RelatedI use the AlertDialog class in my application. By default, these alert dialogs have a transparent background. I'm trying to use an opaque background instead, very unsuccessfully.
These are my styles:
CODE:....................
I applied the "MyOpaqueActivity" style successfully for whole activities (the window background is changed to "my_background"), but it doesn't work for alert dialogs within those activities. The "alertDialogStyle" attribute and my "MyOpaqueAlertDialog" style don't seem to have any effect.
So how can I change the background of these alert dialogs?
I am using a TabActivity (Main) with 3 TabSpecs
I am using Intents for the content of the 3 Tabs
TabA, TabB, TabC for example.
All these tab activities use common data that is stored in SharedPreferences
In the Main TabActivity I have an options menu which has a refresh option.
CODE:.............
This refresh uses an AsyncTask (updateCommonDataFromWeb) to reload the common data from the web.
I need a way to tell the 3 tab activities to refresh their views and rebuild their content from the newly downloaded data.
When the tab activities are first created they load the data from SharedPreferences like so:
CODE:..............
I thought about making a common method on each of the tab activities
like.... reloadViewData()
I thought maybe I could use the activity manager from the Main TabActivity to get the activity of the current tab like so:
CODE:.............
Unfortunately i cant get this approach to work, whilst activity is the correct instance its an Activity instead of a TabA,TabB or TabC
Maybe i've completely taken the wrong approach to the whole thing.
I have also read alot about not using Activities for tab content instead using views.
However I dont know what view to use to replace my <RelativeLayout /> as i cant use my R.layout.* as views.
Viber itself seems to work fine, however there is a background process it tries to run which keeps crashing. Relevent log info:
Code:
I/ActivityManager( 449): Start proc com.viber.voip for service com.viber.voip/co
m.viber.service.VoipConnectorService: pid=9613 uid=10072 gids={50072, 3003, 1015,
3002, 3001, 1006, 1028}
D/dalvikvm( 813): GC_EXPLICIT freed <1K, 70% free 2318K/7588K, paused 3ms+2ms, t
otal 56ms
I/ViberApplication( 9613): ViberApplication, initialization STARTED
I/ViberApplication( 9613): ViberApplication initialization STOPPED
[code].....
Everytime it crashes it causes lots of lags and also audio pops. I'm using Cyanogenmod 10.1RC2 with the Galaxy S I9000.
I'm on JellyBlast 3 (Gingerbread, I guess) with my Galaxy Y and I'm a little unhappy with the theme that comes with JellyBlast. I have fixed some issues but I cannot figure out how to avoid black text on dark background in Alert Dialogs. This issue makes some dialogs of the hololauncher and some other apps completely ureadable if you do not turn the screen to full brightness (what I normally don't do).
What I've found out so far: In the Gingerbread source the Theme for the the Alert Dialog is hard coded:
Code:
protected AlertDialog(Context context) {
this(context, com.android.internal.R.style.Theme_Dialog_Alert);
}
I'm not yet allowed to post external links... I found the above on github in the gingerbread branch in platform_frameworks_base -> core -> java -> android -> app -> AlertDialog.java
The hololauncher uses the AlertDialog.Builder class to create the Dialogs and it uses a TextView Widget to display the text. The layout looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:gravity="center_vertical" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:drawablePadding="14.0dip" />
Here you see, that the textAppearanceLargeInverse definition of the theme is used as text color. And the theme should always be "Theme.Dialog.Alert" since this is hardcoded.
I assume that com.android.internal.R.style.Theme_Dialog_Alert refers to the Theme.Dialog.Alert styledefinition in the ROMs framework-res.apk. So I added the following line to the styles.xml in framework-res.apk -> values/styles.xml inside Theme.Dialog.Alert:
Code:
<item name="textAppearanceLargeInverse">@style/TextAppearance.Large</item>
I hoped that this would overwrite the definition of textAppearanceLargeInverse for the AlertDialog so that I will not use the inherited definition of the dark theme. The color that's referenced by @style/TextAppearance.Large is (contrary to ...Large.Inverse) is #FFFFFFFF or at least close to it.
Unfortunately this does not work and I do not understand why. I got that far to figure all this stuff out and my phone seems little impressed by my effort. It still displays dark text on dark background.
I can create and display a custom alert dialog just fine but even so I have android:layout_width/height="fill_parent" in the dialog xml it is only as big as the contents.
What I want is dialog that fills the entire screen except maybe a padding of 20 pixel.
Then the image that is part of the dialog would automatically stretch to the full dialog size with fill_parent.
When I connet device to DDMS sdk tool, I can see the running process.But I don't think that those process are tatal processes.For example, I have 10 android applications, A, B, C, D, E, F, G, H, I and J.If I want to run only A, B, C application on the power-on, how can I do that.?Where can I make a list for processes running in the poweron time.?
View 2 Replies View RelatedI want to make this kind alertdialog.
http://mobile.tutsplus.com/tutorials/android/android-sdk-sending-pictures-the-easy-way/
Of course we all know we need to add a primary email into the Android to set it up.
But I noticed when I get a email it gets set to my Gmail app (preinstalled can't remove it) AND my email app so I get 2 notification for 1 email. Is there a way to prevent this from happening?
I have an application that has a widget. In the main application, I have an ad framework (cannot be edited due to license) that is accumulatively leaking approx 1MB every time I exit the application. It appears one of its threads are running in the background (unnecessarily) that will keep its process and these threads will be created again when I launch the application. Is it a good idea to call:
android.os.Process.killProcess(android.os.Process.myPid());
In the onDestroy method of my main activity? Also, would doing this kill my widget's service as well?
Just wondering if is there a way to create background task in Android using HTML5 API instead of using native Java SDK?
View 1 Replies View RelatedIs it possible (without violating any licenses) to write a native C/C++ application on top of the Android OS and make it run as a daemon process?
There are already several daemon process' running which one can see with the 'ps' command, the legal part concerns me the most. And also the lack of documentation on how to exactly do this.
For the writing part, I guess one could use basic Linux programming concepts, since Android supports at least to some level the standard Posix API. To make it run as the phone boots, some modifications is of course required in init as well.
I have no plans to have this app in the Android Market, so installing it manually to the phone is not a problem. As long as it does not require re-compiling the whole OS or kernel.
I have been searching for a way to get my trackball to flash when a calendar reminder goes off. It flashes on calls, text, email e.t.c. but not calendar?? I keep missing reminders because I'm away from my phone when the audible goes off and then I don't know it's happened....unless... I could have the trackball flashing too.
Does anyone know how to make the trackball flash when a calendar alert goes off?
It didn't take me long to realize update.zip installations of ROMs don't always work like they should, meaning the only way to install a ROM is via Nandroid restore. But, that clears all my data with it, meaning I have to re-DL and reconfigure all my app and settings. But with new ROM versions coming out every day, going through this process of repeat-reconfiguration is starting to become a major hassle. What options are there for avoiding this headache?
View 20 Replies View RelatedI am trying to get the list of process running in the background.
View 4 Replies View RelatedI have a non-rooted Motorola Droid running 2.2 and I want to root to try out a ROM. I want to make sure I do this right. I don't want to lose any data (pictures, texts, etc) and I don't want to lose any apps. I've read a bunch of threads and it sounds like this is the general order I should proceed in:
1 - Backup data with MyBackupPro
2 - Root
3 - Backup apps with Titanium Backup
4 - Install ROM
Is this correct? Am I missing anything? Will the root method or ROM make a difference in terms of the process?
I have a bluetooth adapter attached to my car's iPod dock. It acts like a bluetooth headset so I can play music wirelessly from my Droid. My problem is that I have to go through a few menus to connect the paired devises every time I get in the car. Is there a way to have the Droid automatically connect to this device, or is there a widget that can help make this process easier?
View 5 Replies View RelatedHow can i make an activity go to background without calling its finish() method and return to the Parent activity that started this .I tried so much but it really dint help.So if you guys could help i would be very thankful.
View 2 Replies View RelatedIs there a way, to make view's background animated? Android cant handle animated GIFs in 1.5 afaik, and I can't set video for BG resource.
View 1 Replies View RelatedIs possible to make a call programaticaly without the dial? I want to make an app that in background make a call, but i need that don't show the Dial app, only my own app.
View 7 Replies View RelatedI have a custom view on which i have drawn some lines(to represent a grid) i want to use it as a background to another view!!!
View 2 Replies View RelatedI am trying to make an icon with a label, just like the ones used on the home screen. Currently I use a TextView with a top drawable as specified in the code below: The problem is that I would like the background to only be around the text and not around the drawable too. How can I achieve that? Code...
View 2 Replies View RelatedIs there an application (or one in the works) that will allow us to apply a sound effect to the slider opening and closing? Maybe base it off of when the screen rotates + keyboard lights up? I would love to apply 2 seperate notifications. One for open and one for close. Anyone got an application like this in the works or know of one that would work on Samsung Moment? I know there is a notification for when you unplug the power, but I'd love to have 2 seperate from that for JUST the slider. I can't believe we can't modify seperate notification sounds custom without apps.
View 15 Replies View RelatedIs there any way to make the "end" button on the Samsung Moment not lock the screen and instead end whatever process that is currently being run/used/viewed, and possible have an assignable soft-touch or side key to lock the phone, or even a menu option or application.
View 6 Replies View RelatedThe options menu has a translucent background and I would like to make it solid and nontransparent. Is there a way?
View 1 Replies View RelatedI have an app with multiple activities and a local service.
if I finish() all the activities and stop the service, the process still exists (if I go into adb shell and type ps, I still see it).
is there a way to make sure the process is killed when I "quit"?
Sometimes the DDMS in the Eclipse not listing the process.
To do the debug in this condition,
1) Is their any way force the DDMS to list the process?
2) Any command to attach the process from the command line?
At a certain point in my program, when I'm completely done with my service, my activity executes unbindService() and stopService() -- yet the process persists. I can tell that it persists because I run "ps" in "adb -e shell":
CODE:.............
"adb logcat", I can show you the sequence of events:
ACTIVITY: context.unbindService(serviceConnection);
SERVICE: onUnbind();
ACTIVITY: stopService(serviceIntent); & returns true!
SERVICE: onDestroy();
First, my activity calls unbindService(serviceConnection). According to the documentation, unbindService() will "Disconnect from an application service. You will no longer receive calls as the service is restarted, and the service is now allowed to stop at any time." So that is fine, and it is happening.
Appropriately, we see the onUnbind() call happen on the service side. According to the documentation, onUnbind() is called when "all clients have disconnected from a particular interface published by the service." So this confirms the correct service connection is being passed, and that the service is responding accordingly.
Next, my activity calls stopService(serviceIntent), and returns true. According to the documentation, stopService() does the following: "If there is a service matching the given Intent that is already running, then it is stopped and true is returned; else false is returned." Again, this is happening and returning true.
In response, the service's onDestroy() method is called. According to the documentation, onDestroy() is "Called by the system to notify a Service that it is no longer used and is being removed. The service should clean up any resources it holds (threads, registered receivers, etc) at this point. Upon return, there will be no more calls in to this Service object and it is effectively dead."
At this point I expect the process to disappear from the process table. Yet it remains indefinitely. But why?
Also, the process is so persistent that I can bind to it again, and I see that it is the same exact process responding because the PID (process ID) is the same!