I have developed android app.I have been running the app in background when the button is clicked using android service and show notification and alert.So i used android:theme="@style/Theme.Dialog" in Android Manifest file
But i cannot able to use other application in the device.Later i used styles.xml
Here is my code for styles.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Transparent" parent="android:Theme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
</resources>
And Also in Android Manifest file i used:
android:theme="@style/Theme.Transparent"
Even then i cannot able to open other app,and also only one time i am getting the alert box.
But my need is to run the app in background and receive notification and alert in every 30 minutes and meanwhile i can able to open other app in my device.Please kindly guide me.Thanks in Advance.
looks like you have created a transparent Activity and doing all the task from that.If it is the case then you would not be able to open other apps(while that activity is in foreground) because as it is transparent it gives you the feel that it is running in background, which is not the case.
so to do tasks in background use
Service.see this.