I want to design an app which shows a list of wifi networks available and it shows the wifi connection setting dialog box when it is selected. Can anyone please tell me how to do this?
Asked
Active
Viewed 68 times
1 Answers
0
Use AlarmManager. It allows you to send the intent in the specified time.
Intent startIntent = new Intent("WhatEverYouWant");
PendingIntent startPIntent = PendingIntent.getBroadcast(context, 0, startIntent, 0);
AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
alarm.set(AlarmManager.RTC_WAKEUP, triggerTime, startPIntent);
In manifest file add your receiver with appropriate action same as in the Intent. And from your receiver show the notification.
<receiver android:name="com.package.YourOnReceiver">
<intent-filter>
<action android:name="WhatEverYouWant" />
</intent-filter>
</receiver>
More info on sending Intent using AlarmManager here
https://developer.android.com/reference/android/app/AlarmManager.html#set(int, long, android.app.PendingIntent)

Vadim Kotov
- 8,084
- 8
- 48
- 62

HellCat2405
- 752
- 7
- 16