Android Question Use Main Activity only to open Service - SOLVED!

ilan

Expert
Licensed User
Longtime User
hi

i am using my Main Activity only to open a service. my question is when the app opens there is for a short time a blank activity shown and then closed and the service starts.

i would like when i click on the app icon that the service starts without the activity short appear.
i was thinking of making that activity transparent put i could not get it to work.

does anyone has an idea how i could solve my problem?

thank you, ilan :)
 

LucianDesign

Member
Licensed User
Longtime User
You can also set the window status to be translucent.

B4X:
CreateResource(values, theme.xml,
<resources>
    <style name="FullTransparentTheme" parent="@android:style/Theme.Translucent">   
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowTranslucentStatus">true</item>
    </style>
</resources>
)
SetActivityAttribute(Main, android:theme, @style/FullTransparentTheme)
 
Upvote 0
Top