2 special questions - Java for Android App Development

Good evening guys, after digging through androids and trebuchets code for More than a day, I need your help:
1.) I need to know the method which is responsible for the creation of the choose action/complete action with dialog. Or to be exact: the method which checks whether there is a default action set and doesnt create a dialog.
2.) How do launchers likr Trebuchet, Nova and so on get their icons? I know about the ActivityInfo.loadIcon(pm) method, and i know no other way(except losding the logo which isnt the case) to get a logo. The thing is that i need to modify this method(the method providing the icon). It has to be the loadIcon() thing OR there is some method interrupting the call in the launcher. I studied the trebuchet source because its open source and i thought that the icons may be loaded differently due to the ability to load icon packs, but this isnt the case either.
Gesendet von meinem SM-N9005 mit Tapatalk

Related

[Q] Do not launch Launcher on boot and launch my apk instead

Hello,
I am looking for a way to mask the fact that Android is running on our embedded platform. I was hoping to get some help from someone here who would know how to run a given apk instead of the 'Launcher2.apk' on boot.
Things I do need to hide to make it as transparent as possible from boot to application launch - where no android recognizable items should be seen.
- No unlock screen
- No status bar
- No application list icons
Sounds like the ideal thing to do would be to simply not launch launcher, and launch my apk instead.
I know something like this is possable since launcher pro used to fire up the browser when it had expired. Could u create some kind of launcher to open a app (sorry not a dev so not sure weather this will work)
Sent from my GT-P1000 using XDA App
@Class said:
Hello,
I am looking for a way to mask the fact that Android is running on our embedded platform. I was hoping to get some help from someone here who would know how to run a given apk instead of the 'Launcher2.apk' on boot.
Things I do need to hide to make it as transparent as possible from boot to application launch - where no android recognizable items should be seen.
- No unlock screen
- No status bar
- No application list icons
Sounds like the ideal thing to do would be to simply not launch launcher, and launch my apk instead.
Click to expand...
Click to collapse
Just make your own launcher that doesn't show this stuff and launches what ever you want straight away.

Hide the navigation bar on stock-rooted 4.2.2

Hi everybody,
I was wondering if exist any method or mod to hide the navigation bar on the stock-rooted 4.2.2 ROM? I tried with fullscreen+piecontrol pro, but there is a conflict between fullscreen and piecontrol pro, the last one does not show the notifications...
I know the cyanogenmod and the paranoid roms can do that, but i am trying to preserve the original stock rom...
greetings!!
Edit:
I did it!!! and its very easy!
What do you need??
​LMT Launcher
​+
​FullScreen Toggle (for android 4.1)
I found the FullScreen Toggle in this thread: http://forum.xda-developers.com/showthread.php?t=1497558
http://forum.xda-developers.com/showthread.php?t=2129209
Re: [Q] [REQ] Hide nav-bar mod on stock-rooted 4.2.2 ROM?
Add this line to your build.prop- qemu.hw.mainkeys=1
Then use LMT Launcher.
Sent from my Nexus 7 using xda premium
thanks for all the answer!!
speedygonzo said:
Add this line to your build.prop- qemu.hw.mainkeys=1
Then use LMT Launcher.
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
i saw a post where someone report a bootloop when he added that line into build.prop... did you use this line on your nexus 4?
thanks man!
TonySkate said:
Hi everybody,
I was wondering if exist any method or mod to hide the navigation bar on the stock-rooted 4.2.2 ROM? I tried with fullscreen+piecontrol pro, but there is a conflict between fullscreen and piecontrol pro, the last one does not show the notifications...
I know the cyanogenmod and the paranoid roms can do that, but i am trying to preserve the original stock rom...
greetings!!
Click to expand...
Click to collapse
will you listen if someone tells you this is crazy?
you want to preserve the polish of your stock rom, ...by installing a hack? thats like stomping on it. not to mention that its limited.
not many people know this, and this may come as a surprise to you, but nexus roms base on AOSP. in other words, that is stock android you're dealing with. theres no way to do it cleaner, you take android sourcecode, supplied by google, you add google supplied vendor files, and you extend it in a clean way. you end up with a coherent, sane system. you will not loose the polish that you know from stock. its not a clunky do it yourself makeshift solution, it feels and behaves as if its part of the whole.
watch a couple of these vids: http://www.youtube.com/user/molesarecoming/videos?flow=grid&view=0
neither lmt nor any root hack can do it. you really wanna go that way still?
Re: [Q] [REQ] Hide nav-bar mod on stock-rooted 4.2.2 ROM?
molesarecoming said:
will you listen if someone tells you this is crazy?
you want to preserve the polish of your stock rom, ...by installing a hack? thats like stomping on it. not to mention that its limited.
not many people know this, and this may come as a surprise to you, but nexus roms base on AOSP. in other words, that is stock android you're dealing with. theres no way to do it cleaner, you take android sourcecode, supplied by google, you add google supplied vendor files, and you extend it in a clean way. you end up with a coherent, sane system. you will not loose the polish that you know from stock. its not a clunky do it yourself makeshift solution, it feels and behaves as if its part of the whole.
watch a couple of these vids: http://www.youtube.com/user/molesarecoming/videos?flow=grid&view=0
neither lmt nor any root hack can do it. you really wanna go that way still?
Click to expand...
Click to collapse
I know all that you said, maybe my bad English is the problem...
I what I try to says is, I want to preserve the original rom, I do not want to flash a third party rom or any other custom rom... I know since my rom was rooted in haven't a completely stock rom
Enviado desde mi Nexus 4 usando Tapatalk 2
TonySkate said:
I know all that you said, maybe my bad English is the problem...
I what I try to says is, I want to preserve the original rom, I do not want to flash a third party rom or any other custom rom... I know since my rom was rooted in haven't a completely stock rom
Enviado desde mi Nexus 4 usando Tapatalk 2
Click to expand...
Click to collapse
i understand you. what im saying is, instead you take a nicely designed, coherent OS, and you smash it against the wall and stomp on it. by installing dirty hacks that is. theres nothing stock anymore after that treatment, you're dealing with root apps here running all the time, sucking your battery dry, ramping up your cpu. with smali hacks that erode your framework and fragment your android anyway, so its not updatable by OTA. you're going for the dirtiest solution possible thinking you'll stay clean. it just makes no sense.
I did it!!! and its very easy!
What do you need??
​LMT Launcher
​+
​FullScreen Toggle (for android 4.1)
I found the FullScreen Toggle in this thread: http://forum.xda-developers.com/showthread.php?t=1497558
I already know the solution, but the concern is that the screen flashes when moving in such an application message, contact, etc ... it's a shame because this is the only application that does exactly what is being asked, just hide the navigation bar while keeping the tray.
Simple app to hide nav bar and replace it with transparent buttons on the corners
This app called "full!screen" is a quick and easy way to get rid of the nav bar. It (optionally) replaces the buttons with transparent buttons on the lower right and left corners. Very customizable and stable, but it needs root.
https://play.google.com/store/apps/details?id=de.tsorn.FullScreen&hl=en
I am using this code with GMT gesture. Amazing and I love it. I am on rooted stock.
Sent from my Nexus 4 using xda app-developers app
You can now hide soft keys (and keep notification bar) without modifications and reboots. Just try my new app:
GMD Hide Soft Keys
It also adds Quick NavBar - soft keys that can be openede with simple swipe from bottom and they autohide when not needed.

How to add widget on pin locked screens

Im making an emergency app for androids, the app is going to be accessible from any pin locked phone, so only this app is accessible without entering the pin, and not the rest of the phone.
Whats the best way to place it in the best visible way on the lockscreen for easy access?
I have an animated widget i would like to use for this, is that possible, or, what are the limitations/possibilities here?
For a similar app/function reference, see this:
https://play.google.com/store/apps/details?id=com.matrix.emergency&hl=no
Thanks
I would even go as far as to say you should make your own lockscreen replacement. Then you can decide on your own whether users can access your app without pin or not
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Masrepus said:
I would even go as far as to say you should make your own lockscreen replacement. Then you can decide on your own whether users can access your app without pin or not
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Click to expand...
Click to collapse
Yea, know of any good examples on that?
Hm you can take any locker as an example, go locker, slide locker, etc. You dont even have to make an appwidget as you can just place the views fixed inside your lock screen layout
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Masrepus said:
Hm you can take any locker as an example, go locker, slide locker, etc. You dont even have to make an appwidget as you can just place the views fixed inside your lock screen layout
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Click to expand...
Click to collapse
But how about if i want to use the widget i have, are there any possibilities to place that on the main lockscreen?
I know it works if i add a new lockscreen, but then i cant add more widgets there like, clock, weather and stuff, only one for each new screen?
What do you mean by that? "you can just place the views fixed inside your lock screen layout "
appfactory said:
But how about if i want to use the widget i have, are there any possibilities to place that on the main lockscreen?
I know it works if i add a new lockscreen, but then i cant add more widgets there like, clock, weather and stuff, only one for each new screen?
What do you mean by that? "you can just place the views fixed inside your lock screen layout "
Click to expand...
Click to collapse
by "you can just place the views fixed inside your lock screen layout "
he means that instead of an appwidget you can directly place you Views ie layouts there in your CustomLockscreen
Hint : Try broadcast receivers listening to intent SCREEN_OFF and SCREEN_ON
Sent from my GT-S5302 using Tapatalk 2
Or you let the user decide about the widget: http://forum.xda-developers.com/showthread.php?t=2572592
appfactory said:
But how about if i want to use the widget i have, are there any possibilities to place that on the main lockscreen?
I know it works if i add a new lockscreen, but then i cant add more widgets there like, clock, weather and stuff, only one for each new screen?
What do you mean by that? "you can just place the views fixed inside your lock screen layout "
Click to expand...
Click to collapse
Your widget is eg made of one TextView inside some kind of layout, may it be a linear layout or sth. So then instead of putting those elements into the MyOwnLockscreenWidgetLayout.xml, you arrange them in your main MyLockscreenReplacementLayout.xml
See what i mean?
Now about using other widgets of other apps in your lockscreen replacement: you can do this
Take widget locker by teslacoil as an example. I think implementing that is a bit more complicated, but there is a guide inside the android dev docs. Your app has to act as a so called AppWidgetHost and answer to some specific broadcasts. That as much as i know about the topic. Just have a look at the docs
Ah edit: ive just seen that @nikwen posted the link to a guide about that. Have a look at it!
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk

Lock screen replacement

I'm looking for a lock screen (app or mod) and i'm looking for 2 features: i have to be able to unlock the screen by swiping wherever i want (like on stock g2), and it has to show notifications and let me open them. Any suggestion?
Go to playstore and search for "widget locker". It's a paid app and requires root access...
Gesendet von meinem LG-D802

[Q] Implementing PIN-lock screen into Android app

I've been searching restlessy for the past 2 days for a simple way to implement a PIN-styled lockscreen into my app. I already have the layout for it, but I don't know how to make it secure and I don't know how to make the damn keyboard to not appear when I touch the EditText contained in it. Do you guys have any suggestion?
There's an Xposed module that let's one protect whatever app with a passcode, you may want to start there, good luck getting support
Sent from above using xparent tapatalk blue

Categories

Resources