I am writing a service at boot completed.but i need to write some files when service get started but since sdcard is not ready .not responding.after some time the service restarts all by itself and writes data in to sdcard..
public void onReceive(Context context, Intent intent) {
context.startService(new Intent(context,CPUUtilizationService.class));
}
above return true if sdcard is mounted otherwise false.