dicio-android icon indicating copy to clipboard operation
dicio-android copied to clipboard

Popup instead of fullscreen when triggered from system buttons

Open MXC48-zz opened this issue 3 years ago • 7 comments

It would be nice if when we open the application with the shortcuts we only have a pop-up of the microphone for example but not that the whole application opens. I think it would give an impression of speed and really of a more discreet assistant that activates in a corner and waits for instructions.

MXC48-zz avatar Apr 17 '22 15:04 MXC48-zz

Here are some examples to illustrate what I said.

Give my editing a mark out of ten 😂

MXC48-zz avatar Apr 17 '22 16:04 MXC48-zz

10/10 I'd say ;-)

This is a good idea, thanks for the suggestion

Stypox avatar Apr 28 '22 13:04 Stypox

From #122:

Assistant apps like Google Assistant, Alexa, and even some other apps like Google Translate can pop up over the current view with a half-extended window instead of a full screen app.

Stypox avatar Dec 31 '22 09:12 Stypox

@Stypox Has this function been completed? Where can I check it?

MakeMeCookie avatar Jul 07 '23 07:07 MakeMeCookie

It has not been completed, otherwise the issue would be closed

Stypox avatar Jul 07 '23 10:07 Stypox

@Stypox

It has not been completed, otherwise the issue would be closed

I arbitrarily modified the file. However, this function was not possible. Can you tell me which file I should modify or if my code is wrong?

<AndroidManifest.xml>**

<activity android:name=".PopupActivity"
           android:theme="@style/Theme.AppCompat.Dialog"
           android:launchMode="singleInstance"
           android:excludeFromRecents="true"
           android:taskAffinity=""
           android:configChanges="orientation|screenSize"
           android:windowSoftInputMode="stateAlwaysHidden|adjustResize"
           android:exported="true">
           <intent-filter>
               <action android:name="android.intent.action.POPUP_ACTIVITY" />
               <category android:name="android.intent.category.DEFAULT" />
           </intent-filter>
       </activity>

<PopupActivity.class>

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

public class PopupActivity extends Activity {
    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

        setContentView(R.layout.dialog_stt_service);

        final TextView messageView = findViewById(R.id.userInput);
                messageView.setText("CMOS");
        finish();
    }
}

<MainActivity.class>

protected void onPause() {
        super.onPause();
        if (skillEvaluator != null) {
            skillEvaluator.cancelGettingInput();
            final Intent intent = new Intent(this, PopupActivity.class);
            startActivity(intent);
        }
    }

MakeMeCookie avatar Jul 10 '23 07:07 MakeMeCookie