How to get android system events in service - Android Software Development

I want create a android service to get android system evnet , do not use ui widget, for example, when user click the main screen ,i can get the point ,when use open a app I can get it

Related

System tasks - let's figure out which ones to auto kill

So I'm running task manager and I have the following processes which I don't know the functionality for. Which one(s) can I kill without screwing up my x10?
Android Keyboard
Android System
Checkin Service
Com.android.providers.a..
Com.android.providers.u..
Com.sonyericsson.andro...
Com.sonyericsson.learni...
Contacts Storage
Dialer
Google Partner set up
Google Search
Google Search (Enhanced)
Home
Mediascape plug0in
My uploads
Picto TTs
Quick Search box
Service Account Provider
Setting Storage
SNS provider
Sync Feeds
Timescape plug-in Ma..
Timescape provider
nas7878 said:
So I'm running task manager and I have the following processes which I don't know the functionality for. Which one(s) can I kill without screwing up my x10?
Android Keyboard
Android System
Checkin Service
Com.android.providers.a..
Com.android.providers.u..
Com.sonyericsson.andro...
Com.sonyericsson.learni...
Contacts Storage
Dialer
Google Partner set up
Google Search
Google Search (Enhanced)
Home
Mediascape plug0in
My uploads
Picto TTs
Quick Search box
Service Account Provider
Setting Storage
SNS provider
Sync Feeds
Timescape plug-in Ma..
Timescape provider
Click to expand...
Click to collapse
I'm 99.99% sure you shouldn't kill "Android System"!
You can just do Kill All for now to see if you can still do stuff you want. If anything goes wrong, only needs to reboot the phone.
I use Timescape widget and I listen to music, so I exclude anything to do with Mediascape, exclude Timescape, and Timescape Provider. I kill Timescape Plug-In though, since that's only for when you click on Timescape on the main screen.
i "think" you can kill all of them
from what i've noticed, they don't need to be running since they are called anyways when you want to eg. use a Dialer...
and when you're done, just kill them again
I'd suggest that you start killing the tasks one by one. Don't do it for android system though. But for the rest just start one by one. If something goes wrong just restart your phone and everything will be fine. But I would suggest that you keep things like timescape and mediascape running since you probably use them a lot. If you close them then it will just take more time for them next time to start up.
Task Panel works for me!
I kill almost everything specially Moxier!
In 4 hours without doing much and having killed ALL they like magically appear again! Thats when I long press specific apps and place them on KILL list.
Diamond777 said:
Task Panel works for me!
I kill almost everything specially Moxier!
In 4 hours without doing much and having killed ALL they like magically appear again! Thats when I long press specific apps and place them on KILL list.
Click to expand...
Click to collapse
Do you know where I can download TaskPanel (and not the Lite version)?? I can't find it on the marketplace or on the net, I've been searching for nearly an hour and can't find the .apk file anywhere
rvictorg said:
Do you know where I can download TaskPanel (and not the Lite version)?? I can't find it on the marketplace or on the net, I've been searching for nearly an hour and can't find the .apk file anywhere
Click to expand...
Click to collapse
I got the Task Panel lite from Market, lite does the job!

[TIP] AppBrain "Push To Phone" and multiple devices

So one of the first apps that I put on my Tab when I got it was AppBrain. After syncing my apps with the server I wanted to use their wallpaper gallery with the "Send to phone" feature as it works great with my HTC Desire. I find a wallpaper I like and click on "Set Wallpaper". My Desire ens up getting the wallpaper and not the Tab. After some googling and searching I found out that in order to control what device gets the wallpaper you need to change one little thing:
1 - Log into AppBrain website (www.appbrain.com)
2 - Click on "Settings" in top right corner by your user name
3 - Change default install device
4 - Change again for what ever device you want to push apps/wallpaper to
Once I made that change I was able to push new wallpapers to my Tab. I wrote this in case other were wondering why they could not send the wallpaper to a certain device if they owned more than one Android device. One note to make is that this change also changes what device the app goes to when you do a "Web Install". This is not specifically for the Tab but for anyone who has multiple Android devices.
slim
AppBrain is great ! The service connects to the Gmail account via the safe OAuth method. It adds a nice layer of suggestions and ratings on top of the Market, which it complements very well indeed. Although I use Titanium Backup for the eventuality of a recovery, it's reassuring to know that AppBrain is there to remind me of all my apps, free or purchased.

Apps that runs on startup/background

I hate it when an app runs in the startup specially if the app is not that important. Is there any way of disabling those apps that run in the startup? As well as those apps that runs in the background even if you don't need em to? They eat up RAM and make the NC slow! I wish I can manage them.
Let them be android takes care of itself.
Read this: http://forums.androidcentral.com/general-help-how/102171-apps-always-running.html#post1088042
---
- Sent from my LG Optimus V using Tapatalk
les02jen17 said:
I hate it when an app runs in the startup specially if the app is not that important. Is there any way of disabling those apps that run in the startup? As well as those apps that runs in the background even if you don't need em to? They eat up RAM and make the NC slow! I wish I can manage them.
Click to expand...
Click to collapse
Yes...get an app in the market called Android Optimizer, it is free. In the menu hit the startup manager icon. Disable the app (s) you don't want to run at start up or background.
StarlahRain said:
Yes...get an app in the market called Android Optimizer, it is free. In the menu hit the startup manager icon. Disable the app (s) you don't want to run at start up or background.
Click to expand...
Click to collapse
You sure of that name? I did a search in the market and do not see it.
StarlahRain said:
Yes...get an app in the market called Android Optimizer, it is free. In the menu hit the startup manager icon. Disable the app (s) you don't want to run at start up or background.
Click to expand...
Click to collapse
You do not need an app like this. People use task killers and startup blockers and then complain about how crappy and slow stuff is because THEY ARE NOT ACTUALLY RUNNING IN THE BACKGROUND. They are cached for faster start up next time. They do not take up any battery or CPU power. Android is linex not windows.
--------------------------------------------------
Here is the post i linked to earlier:
I develop Android apps so I though I'd explain why a task killer isn't needed on an Android system.
Activities
Android apps use activites to preform tasks. For example, if you use a file manager to send a picture via email, the file manager calls the send activity within an email app, passes the file name to it and the email app sends the picture.. not the file manager. This will result in seeing the email app as "running" even though the user didn't actually launch that email app.
Smaller apps
Using activites helps developers design smaller apps. A file manager app that contains every bit of code needed to do everything a file manager does would likely be so large that no one would want to install it. Developers know that an android phone more than likely has an email app so there is no need for the developer to include email code in his/her file manager to send a picture when he/she can call an activity in an existing email app to do the job. This results in a smaller file manager app since there is no need to include email code or any other code for an activity that can be done via an app that is already present on the phone. This also alleviates redundant code. When you install an app outside of the android market, also known as sideloading, the file manager app calls the package installer (already present in Android) to install the requested app.
Running apps vs. cached apps
The "Manage Applications" list included in many android devices lists running apps as well as cached apps. Cached apps don't use any CPU or battery, they're cached so they will load faster the next time you need them. Killing cached apps results in those apps requiring more time to load the next time they are launched.
System management
By default, every android application runs in its own Linux process. Android starts the process when any of the application’s code (activities) needs to be executed, and shuts down the process when it’s no longer needed and system resources are required by other applications.
* Android is hard coded to automatically kill a task when more memory is needed.
* Android is hard coded to automatically kill a task when it’s done doing what it needs to do.
* Android is hard coded to automatically kill a task when you haven’t returned to it in a long time.
* Most services (while possibly running in the background) use very little memory when not actively doing something.
* A content provider is only doing something when there is a notification for it to give. Otherwise it uses very little memory.
* Killing a process when it isn’t ready only causes it to have to reload itself and start from scratch when it’s needed again.
* Because a task is likely running in the background for a reason, killing it will only cause it to re-spawn as soon as the activity that was using it looks for it again. And it will just have to start over again.
* Killing certain processes can have undesirable side effects. Not receiving text messages, alarms not going off, and force closes just to name a few.
* The only true way to prevent something from running at all on your phone would be to uninstall the .apk.
* Most applications will exit themselves if you get out of it by hitting “back” until it closes rather than hitting the “home” button. But even with hitting home, Android will eventually kill it once it’s been in the background for a while.
If you see an app running that you didn't launch, it's most likely because an activity within that app was called by another app to perform a task. If you kill the app you didn't launch, the system has to relaunch that app in order to complete its task. This is why some people kill a task and then see it immediately running again. Constantly killing that app creates a situation where the user is battling the system resulting in wasted system resources.
Android is Linux
Android is not a Windows-based OS, it is based on Linux. Many of the apps you think are running aren't actually running, they're cached, this is typical with a Linux operating system and is much more efficient than other systems. Cached apps don't use any CPU or battery, they're cached and will load faster the next time they're needed.
Let the system manage resources.
---
- Sent from my LG Optimus V using Tapatalk
patruns said:
You sure of that name? I did a search in the market and do not see it.
Click to expand...
Click to collapse
I apologize ..it is called Optimize Tool Box...lite version(free)...
koopakid08 said:
You do not need an app like this. People use task killers and startup blockers and then complain about how crappy and slow stuff is because THEY ARE NOT ACTUALLY RUNNING IN THE BACKGROUND. They are cached for faster start up next time. They do not take up any battery or CPU power. Android is linex not windows.
--------------------------------------------------
Here is the post i linked to earlier:
I develop Android apps so I though I'd explain why a task killer isn't needed on an Android system.
Activities
Android apps use activites to preform tasks. For example, if you use a file manager to send a picture via email, the file manager calls the send activity within an email app, passes the file name to it and the email app sends the picture.. not the file manager. This will result in seeing the email app as "running" even though the user didn't actually launch that email app.
Smaller apps
Using activites helps developers design smaller apps. A file manager app that contains every bit of code needed to do everything a file manager does would likely be so large that no one would want to install it. Developers know that an android phone more than likely has an email app so there is no need for the developer to include email code in his/her file manager to send a picture when he/she can call an activity in an existing email app to do the job. This results in a smaller file manager app since there is no need to include email code or any other code for an activity that can be done via an app that is already present on the phone. This also alleviates redundant code. When you install an app outside of the android market, also known as sideloading, the file manager app calls the package installer (already present in Android) to install the requested app.
Running apps vs. cached apps
The "Manage Applications" list included in many android devices lists running apps as well as cached apps. Cached apps don't use any CPU or battery, they're cached so they will load faster the next time you need them. Killing cached apps results in those apps requiring more time to load the next time they are launched.
System management
By default, every android application runs in its own Linux process. Android starts the process when any of the application’s code (activities) needs to be executed, and shuts down the process when it’s no longer needed and system resources are required by other applications.
* Android is hard coded to automatically kill a task when more memory is needed.
* Android is hard coded to automatically kill a task when it’s done doing what it needs to do.
* Android is hard coded to automatically kill a task when you haven’t returned to it in a long time.
* Most services (while possibly running in the background) use very little memory when not actively doing something.
* A content provider is only doing something when there is a notification for it to give. Otherwise it uses very little memory.
* Killing a process when it isn’t ready only causes it to have to reload itself and start from scratch when it’s needed again.
* Because a task is likely running in the background for a reason, killing it will only cause it to re-spawn as soon as the activity that was using it looks for it again. And it will just have to start over again.
* Killing certain processes can have undesirable side effects. Not receiving text messages, alarms not going off, and force closes just to name a few.
* The only true way to prevent something from running at all on your phone would be to uninstall the .apk.
* Most applications will exit themselves if you get out of it by hitting “back” until it closes rather than hitting the “home” button. But even with hitting home, Android will eventually kill it once it’s been in the background for a while.
If you see an app running that you didn't launch, it's most likely because an activity within that app was called by another app to perform a task. If you kill the app you didn't launch, the system has to relaunch that app in order to complete its task. This is why some people kill a task and then see it immediately running again. Constantly killing that app creates a situation where the user is battling the system resulting in wasted system resources.
Android is Linux
Android is not a Windows-based OS, it is based on Linux. Many of the apps you think are running aren't actually running, they're cached, this is typical with a Linux operating system and is much more efficient than other systems. Cached apps don't use any CPU or battery, they're cached and will load faster the next time they're needed.
Let the system manage resources.
---
- Sent from my LG Optimus V using Tapatalk
Click to expand...
Click to collapse
Yes..I have noticed some side effects.alarms and what not. I guess ur right the only real way is to completely uninstall the apk ..would u happen to know why my adw launcher keeps forceclosing each time boot my nook? I am not running any icon packages..so what other source (or app) could be calling on it to run at startup?
StarlahRain said:
Yes..I have noticed some side effects.alarms and what not. I guess ur right the only real way is to completely uninstall the apk ..would u happen to know why my adw launcher keeps forceclosing each time boot my nook? I am not running any icon packages..so what other source (or app) could be calling on it to run at startup?
Click to expand...
Click to collapse
I am not familiar with adw. Is there an option to save it in memory I know that many replacement launchers do so you might want to make sure that is checked.
Also if you are using a task killer, it is probably trying to kill it and that could cause it to force close.
---
- Sent from my LG Optimus V using Tapatalk
StarlahRain said:
Yes..I have noticed some side effects.alarms and what not. I guess ur right the only real way is to completely uninstall the apk ..would u happen to know why my adw launcher keeps forceclosing each time boot my nook? I am not running any icon packages..so what other source (or app) could be calling on it to run at startup?
Click to expand...
Click to collapse
Do you have Titanium Backup installed? You can clear data and uninstall apps with that as well.
auto starts kills those apps... i run it on my NC>.......i dont need dialer /voicemail...etc.....
Just a thought but if you continue to have force close issues with apps, try running fix permissions. This usually ends the issues. I run adw ex and have no problems. Those few times I have had issues, fix permissions has solved the problem. Just sayin.....
Sent from my NookColor using Tapatalk

Sideloading apps: Why some don't work

Most of us know you can install apps over ADB from a PC to run apps that weren't made for Wear. I hope we can discuss why some apps crash on launch so we can better understand Android Wear and not waste time testing apps that we know Android Wear can't launch. Here is what I have found can cause crashes and apps simply "not working".
An Action Bar
A lot of "sideloaded" apps just crash on launch and this entry in the logcat error explains why:
android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
Click to expand...
Click to collapse
The action bar that runs along the top of most Holo design apps is "banned" from Android Wear. Developers can get around this by editing their app's code to remove the action bar or swipe dismissal ,but unless the app is open source this is useless to us users. Interestingly enough apps with Material Design action bars do launch just fine. The lesson here is to check an app's screenshots for a Holo action bar before attempting to sideload it.
Internet Connectivity
Android Wear does not have a true internet connection. Instead, Wear apps must use Google's APIs to transfer data to the phone (and the internet via a phone app if necessary). This means any app not made for Wear that requires an internet connection won't work at all. I wonder if Bluetooth Tethering a Wear watch to its host phone could fix this.
Screen size
Few apps were made with screens this small in mind. Some layouts simply don't fit important buttons within the screen, making the app useless. Bugging app developers to fix this isn't worth their time and editing the screen DPI makes Android Wear tend to crash (from what I've heard) so those apps must simply be ignored after testing.
These are the three reasons I've found sideloaded apps don't work. Please correct any mistakes I've made and contribute your own criteria if you can. I hope you found this informative!

Help with android 12 tv box T95Z PLUS

i need help with it i need to customize it,
first i want it to to luch a browser in especific url and in full screen after android boots even when looses power and comes back on i want to to show that specific page, also if is posible to customize the system to show my own logo when is booting. but most important thing is to have it launch a browser in automaticly after it boots on its own and go into full screen even if the browser gets refresh the reason im seying refesh is because i have an autoreflesh javascript on the website that i want to display from a web server, can some one help me out. i currently found that TV BRO Browser allows me to stay in full screen, even if it refreshes that awesome, but i want to be able to have the browser to download the web content, so even when the box looses internet still displays the content. please help me out
AXEngine said:
i need help with it i need to customize it,
first i want it to to luch a browser in especific url and in full screen after android boots even when looses power and comes back on i want to to show that specific page, also if is posible to customize the system to show my own logo when is booting. but most important thing is to have it launch a browser in automaticly after it boots on its own and go into full screen even if the browser gets refresh the reason im seying refesh is because i have an autoreflesh javascript on the website that i want to display from a web server, can some one help me out. i currently found that TV BRO Browser allows me to stay in full screen, even if it refreshes that awesome, but i want to be able to have the browser to download the web content, so even when the box looses internet still displays the content. please help me out
Click to expand...
Click to collapse
why all this complication?
it's way easier to develop an app that auto-starts on bootup, which opens your website in full screen and auto refresh every xx days, hours, minutes or even seconds.
how do you think most apps example like costco, ISPs, Banking apps work? 99% of them are apps that open their website which is optimized for mobile devices, so you can only navigate through that specific site.
I'm sure there are some android app developers here in xda that can do this for you in no time

Categories

Resources