I'm trying to follow this tutorial
https://www.shinobicontrols.com/blog/bitesize-android-kitkat-week-4-replacing-the-default-sms-app
But in this step:
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
final String packageName = getActivity().getPackageName();
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, packageName);
startActivity(intent);
==================
Dim i As Intent
i.Initialize("Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT", "")
i.PutExtra("Telephony.Sms.Intents.EXTRA_PACKAGE_NAME", Application.PackageName)
StartActivity(i)
I get the following error
https://www.shinobicontrols.com/blog/bitesize-android-kitkat-week-4-replacing-the-default-sms-app
But in this step:
Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
final String packageName = getActivity().getPackageName();
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, packageName);
startActivity(intent);
==================
Dim i As Intent
i.Initialize("Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT", "")
i.PutExtra("Telephony.Sms.Intents.EXTRA_PACKAGE_NAME", Application.PackageName)
StartActivity(i)
I get the following error
B4X:
Logger connected to: 5200760003c82573
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 348)
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT flg=0x20000 VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1879)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1546)
at android.app.Activity.startActivityForResult(Activity.java:4298)
at android.app.Activity.startActivityForResult(Activity.java:4245)
at android.app.Activity.startActivity(Activity.java:4582)
at android.app.Activity.startActivity(Activity.java:4550)
at anywheresoftware.b4a.keywords.Common.StartActivity(Common.java:848)
at b4a.example.main._activity_create(main.java:348)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7409)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)