I would like to add an option to launch my app video the android pull down menu/notification bar. I have attached screenshots of this:
Image 1 shows the pull down menu I'm referring to. Image 2 shows where I would like my app launcher to be. Is there any possible way of doing this using either regular Java for Android or the Flutter SDK?
If you mean that you are looking to add an option where you see "Huawei Share", "Screenshot", etc., that requires you to implement a TileService. I do not know whether Flutter supports this, but you can definitely implement one in Java or Kotlin.
This class implements a TileService, though the example is rather old.
Related
I can't find a way to explain what I need using words, so I'll use images instead.
What I want is to have the user open Accessibility settings and enable Window Change Detecting Service, but I only want this service to appear, nothing else.
i.e: When the user is directed to accessibility settings by my app, instead of seeing this:
I want them to see this:
This is the original code:
Intent changeSettings = new Intent(android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivityForResult(changeSettings, 0);
You are welcome to create your own build of Android that has a Settings app that looks the way that you want.
Otherwise:
Apps cannot control what options appear on that screen.
The exact set of options that appear on that screen will vary by device model and OS version. So, for example, the Samsung Galaxy S9 edition of that screen looks different:
I'm trying to make an emulator with the AVD Manager but I need to go to the Android menu under "Tools." It's not there (Firebase and Kotlin are, though).
How can I get the Android menu on here?
I does not appear at first time using Android Studio. You need to create a project on it and restart 2 or 3 times. With me worked but I don't remember perfectly.
Obs: if you need emulate your apk you can use your phone directly. I used cross compilators like Cordova and get the emulation on my phone. For me it works faster and more accurately.
I need to develop a tweak that let me use some gestures in every part of the system so they must be valid in the launcher and in every app that I launch.
I think that I must override the basic android recognize touch system... and re-write part of them.
Wich are the method responsable of what I want?
Can someone post me one example of how do that?
I saw that some custom launcher (like the LG phones) use them.
Before android 4.0 you could create and overlay over any app with TYPE_SYSTEM_OVERLAY and get touches with FLAG_WATCH_OUTSIDE_TOUCH... Now with android 4 you cant receive the touches.
basically the idea follows this app,
http://www.appbrain.com/app/smart-taskbar-%28sidebar%29/com.smart.taskbar
You can keep your app open, or always on top. it will run over any app.
Ive looked every where for information and even source code for the use on android 4.0 but no luck... Now.. I know for certain there are apps that still do this even on 4.0... there is still a way. Any ideas?
I found a full sample app here that works for Android 4.0
Here is the highlight:
To create an overlay view, when setting up the LayoutParams DON'T
set the type to TYPE_SYSTEM_OVERLAY.
Instead set it to TYPE_PHONE.
Use the following flags:
FLAG_NOT_TOUCH_MODAL
FLAG_WATCH_OUTSIDE_TOUCH
FLAG_NOT_TOUCH_MODAL << This one is quite important. Without it, focus is given to the overlay and soft-key (home, menu,
etc.) presses are not passed to the activity below.
Also make sure you add the SYSTEM_ALERT_WINDOW permission to the
mainifest file.
i am iOS app developer. Now when i created an app on iOS i want to do the same on android. With java i was familiar just now need some time to remember.
i was looking at some tutorial how to do one or other things. But what i can't find is the basics how everything works. How classes is interacting with each other.
For example i want to create registration window with few buttons and alerts.
I want registration window to be called just once when app is installed and just that.
Should i create new java class and few layouts, one for View with buttons and other for Alerts ?
Or should i create other class for alerts if i need them in other flow of my app ?
And how i should call that window with registration from my main class, which is
extends Activity
Also if there are some developers who came this road from objective-c (iOS) to java (android). It would be nice for some share experience how they did that.
Thank you for any help :)
Very few of the concepts in iOS and Android are similar. On Android you have Activites, Intendts the Manifest. When you design your layout it should be resolution independent. You have a search, back and a menu button and variable hardware. All of this has no equivalent in iOS.
That said, I think you just have to read the basic concepts and the getting started guide no matter if you come from iOS or never have done mobile development before.
EDIT
To answer your concrete question. Take a look at the lifecycle of an Activity and Preferences. With this, you could do some action on the first start of your main Activity and store some flag in the preferences when it's done. On the next start you just test that preference and skip the logic.
You can create one activity (.java file) and one layout(.xml file with buttons and input boxes) , alerts could be toast notifications:
http://developer.android.com/guide/topics/ui/notifiers/toasts.html
All you require for this is a activity and a layout xml for that activity, this activity will be your main ie the entry point to your application, in that activity oncreate method you can check if it is registered or not by setting a flag or something which will direct to the next activity if its registered.
GOOD LUCK...
Just like your nibs in iPhone you create xml layouts in Android. And for view controllers here you make activity. One important thing is AndroidManifest.xml file, it contains all information of your app (like plist) plus all the activity information(Intent type and launcher methods).