Home > Mobile >  Since the launch of program Android now whether can achieve? [for]
Since the launch of program Android now whether can achieve? [for]

Time:09-16

Everyone a great god, and want to consult the
1. Now the Android can also implement programs from start?
2. Since the launch of boot?
3. After were forcibly KILL off, whether from the start?

My graduation design is a pedometer, if not since the launch of the chicken ribs is naked?
Samsung S5 self-used equipment, system version 6.01




Another 1. The front desk service code error why?

Notification Notification=new Notification (R.d rawable. Icon, getText (R.s tring. Ticker_text) System. With currentTimeMillis ()); Intent notificationIntent=new Intent (this, ExampleActivity. Class); PendingIntent PendingIntent=PendingIntent. GetActivity (notificationIntent this, 0, 0). Notification. SetLatestEventInfo (this, getText (R.s tring. Notification_title), getText (R.s tring. Notification_message), pendingIntent); StartForeground (ONGOING_NOTIFICATION, notification);

2. I changed a way of implementation, the program was kill off
The code is as follows:
Public class MyService extends the Service


Public void onCreate () {
super.onCreate();
The d (" Myservice ", "onCreate");
Manager=(NotificationManager) getSystemService (Context. NOTIFICATION_SERVICE);
//by Builder to create Notification
Notification. Builder Builder=new Notification. Builder (this);
//set the notification icon
Builder. SetSmallIcon (R.m ipmap. Ic_launcher);
//set the titles inform
Builder. SetTicker (" Hi ");
//set the notification bar title
Builder. SetContentTitle (" walking exercise ");
//set the notification content
Builder. SetContentText step (" is... ");
//set to remind the sound/vibration/light
//builder. SetDefaults (Notification. DEFAULT_ALL);

//set after clicking jump by pendingIntent
Intent Intent=new Intent (this, MenuActivity class);
PendingIntent PendingIntent=PendingIntent. GetActivity (this, 0, intent, 0).
Builder. SetContentIntent (pendingIntent);

//create a notice
//android 4.1 and above using the build () method, the use of the following builder. GetNotification ();
Notification Notification=builder. The build ();
Notification. The flags |=notification. FLAG_ONGOING_EVENT;
Notification. The flags |=notification. FLAG_NO_CLEAR;
Notification. The flags |=notification. FLAG_FOREGROUND_SERVICE;
StartForeground (1, notification);
}

CodePudding user response:

Improve the Service priority,
Write two best Service, the Service A killed after start-up Service B, Service were killed after start the Service. A, B
Each other, to ensure that two Service has a presence

CodePudding user response:

reference 1st floor qq_34364155 response:
improve the priority of the Service,
Write two best Service, the Service A killed after start-up Service B, Service were killed after start the Service. A, B
Each other, to ensure that two Service there is a


This method is no reason to ah, the APP is to kill all the Service are killed, unless there is a Service is the level of Service system

CodePudding user response:

Now the mainstream of the ROM have started automatically, associated enabled permissions management. And also the function of automatic clear background.
Want to start automatically, it is very difficult.
Unless you use unconventional way, means of similar viruses.

CodePudding user response:

reference xiaohuh421 reply: 3/f
now the mainstream of the ROM have started automatically, associated enabled permissions management. And also the function of automatic clear background.
Want to start automatically, it is very difficult.
Unless you use unconventional way, means of similar viruses.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I watched the various methods on the BBS, is listening on the radio, can not do anything,

Whether can be understood as, mobile phones is that there is no way to monitor after restart on radio?

CodePudding user response:

Hasn't tried this, but the system should be limit you enable program, or directly to not let you respond to this broadcast.

CodePudding user response:

This need to Settings on your phone?

CodePudding user response:

Small white passing

CodePudding user response:

Request system alert permissions
Set a pixel is 1 window
Keep at the front desk

CodePudding user response:

refer to the eighth floor Sun_TTTT response:
request system alert permissions
Set a pixel is 1 window
Keep at the front desk
this seemingly in lower version is very effective

CodePudding user response:

references 9/f, fei, higher response:
Quote: refer to the eighth floor Sun_TTTT response:

Request system alert permissions
Set a pixel is 1 window
Keep at the front desk
this seemingly in lower version is very effective


Now it doesn't work

CodePudding user response:

references to the tenth floor wooden sheep 1 response:
Quote: references 9/f, fei, higher response:

Quote: refer to the eighth floor Sun_TTTT response:

Request system alert permissions
Set a pixel is 1 window
Keep at the front desk
this seemingly in lower version is very effective


Now it doesn't work after ather
yes, were banned
  • Related