skedgo/DateTimeRangePicker

Activity not found exception

Opened this issue · 2 comments

rsd96 commented

val intent = newIntent(
this,
TimeZone.getDefault(),
DateTime.now().millis,
DateTime.now().plusDays(2).millis
)
this.startActivityForResult(intent, RQC_PICK_DATE_TIME_RANGE)

above code gave me actvity not found error :

android.content.ActivityNotFoundException: Unable to find explicit activity class {/skedgo.datetimerangepicker.DateTimeRangePickerActivity}; have you declared this activity in your AndroidManifest.xml?

Use companion intent in your call to day picker and not forget to add DayRangePickerActivity.kt within in the mainifest of the DayRangePicker library.
In the calling Activity,
intent = TestDayRangePickerActivity.Companion.newIntent(YourCallActivity.this,
TimeZone.getDefault(),
DateTime.now().millis,
DateTime.now().plusDays(2).millis);
startActivityForResult(intent, RQC_PICK_DATE_TIME_RANGE);
In the Mainifest.xml in DayPicker Module, add the code.
android:name=".DayRangePickerActivity" with activity tag within the application tag.

rsd96 commented

thanks for the reply. I am not able to add DayRangePickerActivity as an activity in the manifest... i did try calling the intent with Companion but that didn't help