Custom Keyboard - Could not identify launch activity: Default Activity not found - android

I am following a tutorial on creating a custom keyboard for an Android device. I am using Android Studio 2.1.2. There is no activity in the program because you have to activate the keyboard in the language & input settings.
When I run the program I get this error: "Could not identify launch activity: Default Activity not found
Error while Launching activity"
I have posted on the site but have gotten no response. I followed the tutorial step by step and looked it over for a couple of days. I am new to Android Studio and Android applications and was wondering if anyone knew how to help me.
This is the link to the site I am following: http://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615

I just figured out what needed to be done.
You have to edit the configurations and change the launch option to "nothing". This way it won't try to launch and activity that does not exist.
run->edit configurations then look for the launch options

Well you have answered it by yourself.
If you are creating an keyboard application(inputmethod) in android, everytime you compile and run your applcation, it will show a warning that there is no default activity since it's InputMethodService, the service. Even you add activity like some settings activity for your keyboard, it will still show you warnings and it's the normal operation.

Related

Make android launcher default launcher in Kotlin

I'm programming an android launcher for kids. I want my launcher to be the default launcher automatically when I start my app. And when I exit my app, the old launcher is set as the default launcher again.
I read that this has not been possible for some time because of safety reason. But in the Samsung Kids Launcher it is possible.
I have found some work arounds - like opening the settings or open the launcher-chooser.
I don't like these solutions because it's very inconvenient and the settings are difficult for some people.
I found code but the code was very old and doesn't seem to work anymore.
I found a function that allows me to query whether my app is set as the default.
And I found two function for going in the settings.
ACTION_APPLICATION_DETAILS_SETTINGS
ACTION_MANAGE_DEFAULT_APPS_SETTINGS
But these settings are not the right one (very unspecified)
I found this articel:
how-to-set-default-launcher-from-setting-programatically
But I haven't used it to run yet.
Can you help me?
ps: I am a beginner in Kotlin and Android programming

How to start developing app for Google Glass?

I am working on a Google glass Android app. I have installed the glass development kit (GDK) in Android SDK. Now I created a glass project using Android Studio (Version 3.3.2). The newly created project is showing an error "Default Activity not found" in run->edit configuration.
Please refer the screenshot for the error.
1.
And 2. By clicking run->Edit Configuration in menu.
I have searched a lot on Google and found many articles regarding the same. All are suggested to set the edit configurations option like below.
Module: app
Package: Deploy default APK
Activity: Launch default Activity
Target Device: USB Device
I did the same, but no one is working for me. After spending the whole day to make it work, I came here. This error is due to the Launcher activity, because there is no launcher activity in Google glass project instead it uses Voice Trigger intent filter. It is similar to wearable apps they also don't have the launcher activity.
Android Studio won't let you use a standard run configuration without specifying a launcher in the manifest.
You could try using the gradle command line instead:
./gradlew installDebug
In case you haven't resolved the issue. I came across similar issue before, two ways worked for me:
Choose "Nothing" as the option. You will be able to run the app manually on the Glass, but your debugger won't work straight away. You have to manually attach the debugger to the process. You may also have to use logcat if there is a bug in the launching process.
Specify an activity (whichever is associated with voice trigger).
Also, I noticed that you created the app using Kotlin. Kotlin activity didn't work in my case, throwing exceptions associated with nullable var when resuming the activity. Non-activity classes worked fine. Please let me know if Kotlin activity worked in your case.

On all Android devices,when I press the home button

In my program's any activity ,I press the home button,and then in desktop press my app's icon,I saw the launch activity,not before activity.What happen on my app?
And I found if I use Android Studio run without sign,the app is run normally.A month ago,I move the codes from eclipse to AS,on eclipse IDE not found this problem.Can anybody help me? Very thx.
Maybe grammar errors,sorry.
EDIT:I found this is an Android bug https://code.google.com/p/android/issues/detail?id=26658
And the solution is https://code.google.com/p/android/issues/detail?id=26658#c14
If you are working on real device, make sure you didn't set the flag
Don't keep activities in Developer options.
On emulator check in running configurations that you launch the default activity.
On manifest check that you do not exclude your activities from recent.

How to debug widget applications in Xamarin studio?

I'm experimenting with Simple widget application in Xamarin studio and would like to know how to debug it. Trying regular 'Run -> Start Debugging' (F5) produces
Application does not contain a launchable activity
As far as I understand ActivityAttribute.MainLauncher property is designed specifically for this purpose but there is no activity to apply it to in the example I'm playing with.
p.s.
Is there something similar to 'Attach to process' feature?
It seems that there is still no simple solution other than embedding your widget into a self created activity just for the debugging purposes. The last post from the Xamarin team I've found is here.
I've tried a few approaches with an empty activity and trying to trick the debugger - but failed.

IntelliJ IDEA running Android Native Activity application

I am trying to run the native activity sample that comes with the Android NDK. I remember it used to run fine with Eclipse but with IntelliJ IDEA I always get an error saying "Default Activity not found" when I select "Launch default Activity" from the run configuration dialog. If I try to enter the custom activity name like "android.app.NativeActivity" it again cannot find it.
Am I stuck with Eclipse or is there a workaround for this problem?
I'm afraid there is no support for launching NDK Activity right now, please submit a feature request.

Categories

Resources