I am listening to a certain event (picture taken using the default camera app). When the picture is taken, my broadcast runs and it creates a Transparent activity with dialog.
The problem is that the activity has black background and it is not transparent (not seeing the pic taken by camera app). I used the TaskAffinity and still same issue? What should I do?
Broadcast:
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, DialogAct.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
Manifest:
<receiver
android:name=".CameraEventReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.hardware.action.NEW_PICTURE" />
<data android:mimeType="image/*" />
</intent-filter>
</receiver>
<activity
android:name=".DialogAct" android:theme="@style/Theme.D1NoTitleDim"
android:launchMode="singleInstance"
android:label="@string/app_name"
android:taskAffinity="com.xxx.newaffinity.DialogAct" >
<intent-filter>
<action android:name="com.xxx.xx.DIALOGACT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
style:
<style name="Theme.D1NoTitleDim" parent="android:style/Theme.Translucent">
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:background">@android:color/transparent</item>
</style>
I have tried the style before and it works so the issue is not here. I don't know how to achieve the transparent activity..hhhheeeelp :(