Best way to receive "DisplayOn" Intents in background - Android Software Development

Hi,
I´ve have a App, which to some stuff everytime the user turn on the display or unlock the phone.
So far it works without a problem.
I just registered a Receiver (ACTION_SCREEN_ON / ACTION_USER_PRESENT) in a Service which runs in background.
But now wit Android 8 I can´t use this solution, because I can´t start the Service without putting it in foreground.
My question is:
What is the best way to listen to ACTION_SCREEN_ON and/or ACTION_USER_PRESENT Intents?
Is it importent that these receivers will run, even when the App is killed or in background!
I don´t want to create a foreground Service (With the icon in the android bar)!
Is JobIntentService the right solution?
Thanks for helping....

Related

Questions From ex-Treo650 user

Ok I had gotten board with the lack of wifi and decent web browser on the Treo 650 that I decided to make the move to the 8125. I knew about the speed difference and some of the other issues discussed in these forums because I researched the device for months before making the move. Therefore I wont say much about that. Unfortunately I have a few issues that I can't seem to find answers for in this forum and I was hoping other users out there could help.
1. Is there any way of making the navigation pad useful? I cant access anything on the taskbar and it would be great if I could. I installed magic button so I can close apps and switch back to home when I want. Furthermore there is almost no documentation on how to use the nav pad. All application instructions say tap the icon. It's very convenient to have one handed use. for example i have yet to figure out how to get back to the location bar in Pocket IE so I can enter a url without having to tap the screen.
2. Is it common that some applications just freak out when you switch to landscape mode (scroll bars not working and such)?
3. As mentioned I installed magic button but is there an application that will pop up a list of running tasks so I can switch between them easily with the navigation pad.
4. Backup. I may be very wrong on this but I fear that active sync does not actually backup my entire device like palm does. Could someone clear this up and if I'm correct is there a way for active sync to do this. I have more programs on this device than what is on my add/remove prog screen.
5. Notification reminders. I see a feature to have the led for a period of time but it would be nicer if it could be set to play its sound also. Like the pagers of old.
6. Notification of lost service. This phone never tells me I have no cell service. Last thing I want is battery draining searching or worse assuming I have service and miss all calls.
If anyone could provide some info on the above it would be a great help. i have already found many other programs that make up for the lacking features. Below is a list of what I have installed please make any suggestions you think would be helpful.
1. AnthaVPN - easiest and fastest to install
2. TN520 by mochasoft
3. Pocket Putty SSH client
4. Eyes On Call - Callfilter like program with many features still limited but the developer is very quick in implementing suggestions.
5. Info sharp - same developer as above but this provides sms capabilities that are very impressive. He almost has chat style sms with the way this program works.
6. OMAPclocker - for clocking to 220. I actually see the difference.
7. IM+ - Sametime/AOL instant messenger client.
8. Info apps I have Metro, Ereader, Bdicty, VadeMecum
9. TCPMP
10. Registry Wizard
11. Calc98 - the built in calc app is a joke.
12. Xpressmail - dont care what anyone says this app does what it says it will do. Pushes email to your phone.
Thank You
- Richard

Opening data connection

Hi there - I'm working on a Flash Lite application for PocketPC, which is designed to have web connectivity and for a single use event.
I've discovered that the only way to initiate and then maintain a data connection for Flash Lite is to open an IE window on WM5 and refresh it on occasion, then refocussing back on the Flash app.
I've tried the persistent registry key hack, which works fine when there is a connection, and does maintain it - however my application is for people wandering around in and out of "signal" coverage areas. So I really need my app to re-trigger the data connection somehow.
Flash Lite 2.1 does have GetURL commands, which I'm using, but once the data connection dies, nothing appears to re-establish it. So I've added an indicator to show this problem... but its a shame it can't reconnect on its own.
Any ideas guys?
I've even thought about a work-around - like task switching and "refreshing" the IE http session using the hardware buttons, because that does seem to work, but obviously its not the best user experience really - and obviously I want to keep my application running fullscreen rather than showing IE during that process - and confuse the user.
I've messed around with PQzII, to try this - but its pretty hard to configure... and the author hasn't responded to any questions - and I'm not really that sure it will do what I need in "the background" if you see what I mean!
Has anyone tried something like this, is there a simple standard app I can launch that is already in the Pocket PC windows folder to kick start this using a hardware button trigger if no such reconnect is ever going to be possible in the FlashLite environment?
I've looked on the Adobe site, several people are having this issue already - and information is scarce unfortunately!

Application closing automatically......only happens to me??

I found a strange behaviour in HD2.....or maybe in WM6.5.
When I open up a few applications, let the machine go to suspend mode, and then I turn it on again, I can see all applications there (with wmtask bar).
When I unlock the machine, some applications closed automatically (most common is IE, and a pocket dictionary).
While I'm watching movie, I need to lookup dictionary (poor English), everytime I turn on HD2, I need to load the dictionary again, again and again.
Also, after I login to ebanking to check stock price, and after a while I turn on the machine again, IE closed......I need to login again, again and again!
What's the problem? Can I control which application cannot be closed automatically? My HD2 sure have enough RAM (sometime I just open 2 applications!).
Please help...........
This is normal, wm closes apps itself to clean memory. No solution yet. Soft reset may help temporary, and running less apps in background. When you search you will find more topics on this.
stm2008 said:
I found a strange behaviour in HD2.....or maybe in WM6.5.
When I open up a few applications, let the machine go to suspend mode, and then I turn it on again, I can see all applications there (with wmtask bar).
When I unlock the machine, some applications closed automatically (most common is IE, and a pocket dictionary).
While I'm watching movie, I need to lookup dictionary (poor English), everytime I turn on HD2, I need to load the dictionary again, again and again.
Also, after I login to ebanking to check stock price, and after a while I turn on the machine again, IE closed......I need to login again, again and again!
What's the problem? Can I control which application cannot be closed automatically? My HD2 sure have enough RAM (sometime I just open 2 applications!).
Please help...........
Click to expand...
Click to collapse
i googled, and found this, maybe helps
http://www.pocketpc-live.com/free-softwares/disable-auto-closing-of-background-apps.html

Help making android application into service

Hey guys, I'm fairly new to android applications. I am specifically working on an android application that runs for the Notion Ink Adam. A guy by the name of Mr.Guy actually wrote the app nearly perfectly and provided the source to me but there is a small issue I want to work out, hopefully with some help.
Basically the app runs from a search button long press, runs a native linux command (which toggles the backlight on and off) and closes.
The problem with the current application is that if you have somethings open in a current window they are closed by this application running. An example is opening the app drawer on the homescreen. Running the application closes the app drawer. In some cases th interruption makes a greater difference like when viewing media.
Anyway heres the source, ftp://eto.homeip.net/Shared/NotionInkHacks/PQiToggle.zip
I think I need the application to run a service instead of an activity but this didn't seem to matter. I'm pritty sure I need it to not call a UI and just run the service.
An ideal fix for this is to skip the application and just rely on keycodes run from init.rc but trying to do this I had zero success. I'm not sure if the version of init in my rom supports keycodes.
If you could help me either with making it a service or allowing a native linux command run from keycodes I would greatly appreciate it. Thanks!!!
You can call a service directly from a broadcast receiver which can listen for the "on search long press" intent
http://developer.android.com/guide/topics/fundamentals.html#ActivatingComponents
http://developer.android.com/reference/android/content/BroadcastReceiver.html

DM98 Smartwatch Help

Hi i just got my DM98 smartwatch and had a few questions for anybody that has the answers.
1.) I got the watch synced to my phone and i wanted to be able to send and receive text messages, make and receive phone calls, and use the internet.
Question: is there an app or trick to make this possible or am i just S.O.L. ?
2.) I have read that it is possible to create your own clock faces.
Question: Is there a guide that details how to do this?
3.) Question; if i want to do anything do i need to root?
These are all the questions i have at the moment. Any and all help is greatly appreciated.
Dfire87 said:
1.) I got the watch synced to my phone and i wanted to be able to send and receive text messages, make and receive phone calls, and use the internet.
Question: is there an app or trick to make this possible or am i just S.O.L. ?
Click to expand...
Click to collapse
The trick is simple - go to the play market and look for notification software with a set of features you want.
Dfire87 said:
2.) I have read that it is possible to create your own clock faces.
Question: Is there a guide that details how to do this?
Click to expand...
Click to collapse
The guide is simple - you should write your program. It's the most flexible way. Second option - you can go to the market and look for face designer or similar application. It' limited, of course, but you can try it. Third option - get watch face that you like and go into it's folder. There you'll find some pictures and may be fonts. Now you can delete the pictures and replace them with your own (with same name, of course), then restart your watch face application and you'll see your pictures instead of removed. It's most limited customization, but it's simplest.
Here is one watch face application.
Dfire87 said:
3.) Question; if i want to do anything do i need to root?
Click to expand...
Click to collapse
If you really want to do ANYTHING you in fact need a lot of money first.
chinesesmartwatch said:
The trick is simple - go to the play market and look for notification software with a set of features you want.
Click to expand...
Click to collapse
let me clarify a little bit.... i want to do this all through bluetooth. i have tried a bunch of apps and none see my DM98 Smartwatch as a bluetooth headset or anything of the like so i am a little confused with the explanation.
Dfire87 said:
let me clarify a little bit.... i want to do this all through bluetooth. i have tried a bunch of apps and none see my DM98 Smartwatch as a bluetooth headset or anything of the like so i am a little confused with the explanation.
Click to expand...
Click to collapse
It shouldn't be a headset. It should be something like phone or smartphone with the ability to transfer any data. To connect to DM98 first turn bluetooth on on both devices (DM98 and your phone), next make one of the devices available to connection requests, then the device will advertise itself and second device should see it. When it's seen just touch it and select "pair". Only after this you can start your notification software and use it's communication features.
In short - you should pair devices BEFORE any third party application can do something for you. The pairing is performed using Android's bluetooth settings, no third parties should be involved.
chinesesmartwatch said:
It shouldn't be a headset. It should be something like phone or smartphone with the ability to transfer any data. To connect to DM98 first turn bluetooth on on both devices (DM98 and your phone), next make one of the devices available to connection requests, then the device will advertise itself and second device should see it. When it's seen just touch it and select "pair". Only after this you can start your notification software and use it's communication features.
In short - you should pair devices BEFORE any third party application can do something for you. The pairing is performed using Android's bluetooth settings, no third parties should be involved.
Click to expand...
Click to collapse
still not 100% sure what your saying. i want the dm98 smartwatch to function like the samsung gear s (the only smartwatch i have used that does what i like) as in while it bluetoothed to my phone everything (calls, sms, and data) can be pushed from my phone to the watch. it has a nano sim card slot available but i dont need this because i always have my phone on me.
Dfire87 said:
still not 100% sure what your saying. i want the dm98 smartwatch to function like the samsung gear s (the only smartwatch i have used that does what i like) as in while it bluetoothed to my phone everything (calls, sms, and data) can be pushed from my phone to the watch. it has a nano sim card slot available but i dont need this because i always have my phone on me.
Click to expand...
Click to collapse
You are talking about communication software. Chinese smart watches usually have just a subset of such functionality. It means you won't get everything pushed. But you can try to look for such software at the market. Search for key words like "notification" "smart watch" and so on.
chinesesmartwatch said:
You are talking about communication software. Chinese smart watches usually have just a subset of such functionality. It means you won't get everything pushed. But you can try to look for such software at the market. Search for key words like "notification" "smart watch" and so on.
Click to expand...
Click to collapse
well if that if the case i have tried many different apps and nothing works so i guess i am s.o.l. and need to return the watch so i can find one that does what i want. i really like this watch though because it is running full android 4.4 with full access to any app in the play store.
Dfire87 said:
2.) I have read that it is possible to create your own clock faces.
Click to expand...
Click to collapse
look here: https://forum.xda-developers.com/sm...evelopment-t3510348/post73395168#post73395168
how to install whatsapp? keep popping prompt shown security alert n can't even turn off d prompt,
Dm 98 stuck in layout mode
I was an idiot was messing with developer options and got it stuck in layout out mode can't close the down to get to main screen the edges are past the pinch to make smaller. With one button can't do hard reset it's not rooted so it doesn't show up when I plug it into computer is there any way to fix this or am I stuck with basically a brick. I really love this device. Can you guys help.
my watch not opening. when i press power button there is nothing happen. what can i do? is there anyway to reset with a button on this watch?
Hi, I have a question, how we do for have the sms on the watch via bluetooth?
Reset
Have you ever tried resetting the smartwatch there's like a small pin hole in the very back of it take something to stick in it the watch will shut off and you just restart the watch back up and that should have fixed the issue
No 1, you can try these aps to enhance your dm98
1. Watch android phone
2. Android control panel
3. Heads up notifications
4. Rotation control
[SOLVED] Still getting used to the tiny keyboard, I had a typo.
I just got the Dev C14 (Bluetooth reports it's actually the DM98) and when I try to log into the Playstore with my existing account, I get past the email and password, but then it says to "Type in the text you see here" with a prompt but I don't see the text. Can anyone help please?
Cannot connect DM98 to Galaxy S8 Active
Hello fellow smartwatch owners. I have the DM98 like the size memory WiFI but cannot get it to connect to my Samsung Galaxy S8 Active. The phone shows the watch and vis a versa, they both are paired, but when they connect the connection is lost right away. Please help if you can
Chuck
Dfire87 said:
let me clarify a little bit.... i want to do this all through bluetooth. i have tried a bunch of apps and none see my DM98 Smartwatch as a bluetooth headset or anything of the like so i am a little confused with the explanation.
Click to expand...
Click to collapse
For downloading software use wifi. Start with Google play, etc. Best for installing software is to do it from your computer: just log in to Google Play windows.
---------- Post added at 10:08 AM ---------- Previous post was at 10:07 AM ----------
Donkeyloco said:
Hello fellow smartwatch owners. I have the DM98 like the size memory WiFI but cannot get it to connect to my Samsung Galaxy S8 Active. The phone shows the watch and vis a versa, they both are paired, but when they connect the connection is lost right away. Please help if you can
Chuck
Click to expand...
Click to collapse
Personally I use the much more stable Droid Phone and Droid Watch, on Google Play.

Categories

Resources