how can I do it with b4

kalarius

Active Member
Licensed User
Longtime User
the follow make the program to auto start
One solution is to make a service BUT i do not want to make a service

****************************
in ansroidmanifest.xml (application-part):
<receiver android:enabled="true" android:name".BootUpReceiver"
androidermission="android.permission.RECEIVE_BOO T_COMPLETED">

<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED " />
<category android:name="android.intent.category.DEFAULT" />
</receiver>

[.....]

<uses-permisions android:name"android.permission.RECEIVE_BOOT_COMPL ETED" />

[....]



public class BootUPReceiver extends BroadcastReceiver{

@override
public void onReceive(Context context, Intent intent) {
intent i=new intent(context,MyActivity.class);
i.addFlags(intent.FLG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}

How can we use it at basic?

****** I do not want to make service!!!!
 

barx

Well-Known Member
Licensed User
Longtime User
Sure I've already answered this once...
 
Upvote 0

kalarius

Active Member
Licensed User
Longtime User
as I write to my previous post and this post
I DO NOT WANT TO MAKE IT WITH SERVICE !!!!!

how can I write it more clear???
 
Upvote 0
Top