yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] pingpongboss:
great stuff! Can I feature your screenshot in the introduction?

You are right that WindowManager has limitations. I have not yet found a way to change the z-order of children. All alternatives that avoid adding directly to WindowManager (like a fullscreen transparent FrameLayout overlay, etc) has had no success.

There is a less-than-idea solution for the permanent notifications: onStartCommand() in StandOutWindow.java can be modified to return START_STICKY, which means that Android can kill your service (and windows), but it will restart your service again ASAP - usually around 5 seconds - with a null Intent to onStartCommand(). This will allow you to remove startForeground(), but this means there will be a few seconds where your windows disappear, so this workaround isn't all that great.
[Android Apps and Games] xdaid:
Of course

I'm going to try this, unless the services execute some critical task it should be good enough
[Android Apps and Games] johrie:
Seeing lots of possible things here :) looking forward for app developers to add this into there apps.

One question. Is it possible to have a floating launcher?
[Android Apps and Games] mikpel:
Sounds interesting concept. I may want to try this in some future project when I have more time.
[Android Apps and Games] motodroidfreak:
Holly ****! THIS IS SO COOL!! I WILL Defiantly Use This!!
[Android Apps and Games] pingpongboss:
If you guys make anything, post a screenshot and i'll put it on the front page.

It should be possible.
[Android Apps and Games] HunnyBearLewis:
5 stars for you, great work and thanks for sharing! :)
[Android Apps and Games] pingpongboss:
If anyone has the time and wants to look into how we can get VideoView to work in StandOut, please check out this StackOverflow post and see if we can do whatever this guy is doing http://stackoverflow.com/a/5889072/450396
[Android Apps and Games] Matze2402:
Hi.

if i put a button into a layout and try to click the button in the application there is no visible feedback. how can i change this?

till now i changed that the window is only movable by dragging the titlebar.

thanks!
[Android Apps and Games] pingpongboss:
This is an unfortunate side effect of having floating windows. You can manually do this by attaching an onTouchListener to the Button, then toggle the visual state of the button on ACTION_DOWN, ACTION_MOVE, and ACTION_UP.

Edit: "toggle the visual state" means using setBackgroundDrawable() or something similar

I'll be working on a similar fix in fixCompatibility() later, but you should do it yourself first if it is important.
[Android Apps and Games] Matze2402:
Thanks, that is a solution but it's a little more complicated to get the selected postion of a ListView or am I wrong? There is OnItemClickListener and it doesn't works!
[Android Apps and Games] pingpongboss:
When did you last update the StandOut library? ListView compatibility is something I should have fixed just yesterday (link to commit).

Make sure you download/git pull the latest version and try again. Let me know if it works or not!
[Android Apps and Games] Matze2402:
The last update was 3 days ago. Now it works perfect!!!

Really great job! What will be your next step? ;-)
[Android Apps and Games] pingpongboss:
Thanks for asking! I have a few things in mind:

Hide windows to more things than another notification (maybe a panel for minimized windows like windows/mac)

Create my own app on top of StandOut that showcases what is possible

Make a good website / documentation for StandOut and submit to hackernews/reddit

Make system window decorators themeable / more flexible

Fixing the issue where Buttons and ListView items don't show their pressed state (looked into this briefly. not too sure how to do this yet)

I'll usually just be working on whatever crosses my mind so suggestions will be great too :)
[Android Apps and Games] Matze2402:
That sounds great. Hope to see more features soon ;)

- Maybe you know the Tablet Asus Transformer TF101 or TF300... There is a single button in the middle of the bottomsbar if you click it you can lock the bar. Maybe this could be a idea or solution if you minimize the window and display it inside (like a small popup)

- An other idea is that if you click the appicon in the titlebar a small menu open like windows' /mac' "File" to open the configuration screen or what else.
[Android Apps and Games] apDroid:
Re: [APP][2.1+] StandOut - Create Floating Apps [Updated 7/8: Window Editor]

Also in 4.1+ there is the new priority flag so notifications for foreground services can have their status icons hidden :) For <4.1 you can be tricky and "hide" the status icon but leave a small gap in its place.

On this subject, there is a bug in 4.2 where any foreground service that has an SMS broadcast receiver registered will be killed and restarted by OS whenever the receiver is fired. I don't know if something similar happens with other broadcasts/receivers, i.e. if it's relevant here.
[Android Apps and Games] Zed is Dead:
StandOut as an outstanding solution!!

Hi,all

I developed a web app and am not familiar with JAVA. Since my app needed a "connection" to some phone/tablet features I started searching and found this incrediblle solution. Mark, thanks for sharing, and in my opinion it will be a huge upgrade for Android.:good:

I am trying to adopt to JAVA sintax but for now it is quit difficult. The sample pack is great, and I found a lot of code understandable, but am having trouble passing intent to open already installed app in attempt to open it from floating app. Please, help me pointing me to the command that I need to implement.

Is it getSendDataIntent?

Yesterday I went through all 38 pages of this topic, but did not found anything I could use to try implementing,also followed the suggestion to see how floatingfolders open apps, but had no luck.

Many thanks for staying positive in advance!
[Android Apps and Games] pingpongboss:
You want to launch an app that's already installed right?

Do what I did here https://github.com/pingpongboss/Sta...mark/floatingfolders/FloatingFolder.java#L422

First, get the Intent for that application. Then, do a startActivity() on that intent.
[Android Apps and Games] Mohammad_Adib:
Updated Floating Stickies with saving!
[Android Apps and Games] pingpongboss:
Do you save when individual notes are closed? How about when they lose focus (if you are using focus)?
[Android Apps and Games] Mohammad_Adib:
Here is how I am doing it on a project im working on.

Just launching the intent with the package wont work, you have to get the package AND the name of the class. For example, in Android 4.1 the gallery3d package has the camera app and the gallery app! So they share the same package name but are different classes. So, this is the approach that is most fail proof. You're welcome :highfive:

(pkg is a ResolveInfo object)

---------- Post added at 09:02 AM ---------- Previous post was at 09:00 AM ----------

It saves when 1. the notification is clicked, and 2. when a sticky is closed and 3. when a key is typed :silly:

I should make it where it saves after 2 seconds passes between key presses :confused:
[Android Apps and Games] realizerecognize:
Re: [APP][2.1+] StandOut - Create Floating Apps [Updated 7/8: Window Editor]

The sticky notes and calculator are sweet! I like this:)
[Android Apps and Games] pingpongboss:
You could implement onDestroy() to save all currently open notes http://developer.android.com/reference/android/app/Service.html#onDestroy()

You could also have a Timer running in the background schedule a TimerTask to run every 2+ seconds. Then every time the task runs, it saves all open notes. This allows you to batch up 2 seconds at a time.
[Android Apps and Games] Mohammad_Adib:
Uhmm can i just make a thread running in the background in StandOutWindow's onCreate that is something like...

new Thread(new Runnable() { public void run() {try { Thread.sleep(2000); save(); }catch(Exception e) { }}}).start();

?? Isnt that the same thing as TimerTask or whatever.. ?

Not sure if that will slow down the phone <.<

------------------

EDIT: did just that :fingers-crossed:
[Android Apps and Games] pingpongboss:
Seems like everyone prefers to use Handlers in Android http://www.mopri.de/2010/timertask-bad-do-it-the-android-way-use-a-handler/
[Android Apps and Games] Mohammad_Adib:
I code messy ._. unless it makes a difference in perfeormance <.<

-------------------

EDIT: Acutally this is cool. Thanks for showing me :D
[Android Apps and Games] pingpongboss:
The only difference I can see is that, if you use a new Thread, you won't be able to make any UI updates. If you use a Handler, it posts to the main UI thread so you can make UI changes.

So if you wanted to spin a progress indicator while you are saving or something, you'd use a Handler.
[Android Apps and Games] Mohammad_Adib:
:highfive: SWEET! I would always use runOnUiThread or something. Thanks again!
[Android Apps and Games] Zed is Dead:
pingpongboss & Mohammad_Adib...guys, thank you very much, YOU rock!:good:
[Android Apps and Games] Mohammad_Adib:
Btw, mark, on Jellybean when a simple window moves outside the screen, it tears at the edges of the screen :eek:... any fix?

Not apparent on 2.3.3 or 4.0.4 or 4.2 ....

I think its just my note running CM10 that's causing it...and also, on my friend's 4.2 ROM, the windows would go below the navigation bar even with boundaries enabled..but not on an emulator with 4.2... I blamed his custom ROM but not sure..
[Android Apps and Games] pingpongboss:
You're right, it might be CM10. I don't see any tearing.

Is the navigation bar the soft-buttons? Mine do not go below it.
[Android Apps and Games] Mohammad_Adib:
Yep soft buttons....wierd stuff -.- oh well. That's probly just 0.1% of the audience who would download my next app. Nbd...

---------- Post added at 10:31 AM ---------- Previous post was at 10:19 AM ----------

I just uploaded an unlisted video real qiuck to demonstrate...its barely noticable with the simplewindow in the example you made but laggier simplewindows that are not so 'simple' greatly amplify the "tearing" at the edges. It seems that the dx is the width of the tear...

[YOUTUBE]SPNe_VM4Raw[/YOUTUBE]
[Android Apps and Games] pingpongboss:
I do notice some of that. No clue how to fix it though. Maybe it has something to do with hardware acceleration? maybe not.
[Android Apps and Games] net_vampire32:
Hi,

Thanks for the suggestions. I updated the app description to include this text:

"This application was created using the StandOut Framework by pingpongboss".

I will happily change that to anything you would like.

I like your suggestions and will work on including them in a future update. If you could feature me in the first post that would be great.

Thanks for your hard work.
[Android Apps and Games] Zed is Dead:
14h no result :(

Mohammad_Adib, Mark...after 14 whole hours, still cant achieve it, it will drive me crazy:eek:

Mohammad, I tried Yours solution but the resolveinfo was unresolvable after 5 hours :) so I tried Marks solution but see it is connected to Folders project...and after next 5 hours that did not come to conclusion, I did not get how to define app String..

Anyhow, tommorow is another day of trial and error. Eventually I will conclude it, and of course, Mark ther will be a trubute to StandOut and You....several month from, when my button clicks what I want:o

Have a great rest of this week!:good:
[Android Apps and Games] pingpongboss:
Seems like you lack experience with Android/java. Have you made a simple Android app before?

Have you downloaded the android SDK api 7 and Eclipse ADT plugin? Please follow Instructions #1 on the first post if you haven't.
[Android Apps and Games] pingpongboss:
Your app has already been featured on the first post!
[Android Apps and Games] Zed is Dead:
Hi, Mark,

yes I downloaded all apis from 7 to 15, as well the plugin, it was a bundeled solution with eclipse,android sdk and ADT. I made one app based on sample that I was targeting...and it worked ok. Actually I need a button to invoke zxing scanner, so Needed to read their IntentIntegrator and other solutions found. They all open, but my implementation to StandOut is bad due to low level of JAVA knowledge.

I made JQUERY mobile-PHP-MYSQL app and as a web solution did not have access to phone features which I needed. PHP requiers not to refresh the page so that is how I found and started to explore StandOut..I see the possibilities, but can not get to them:)...yet!

Three months ago I did not know that JQUERY exists :)

I do not want to bother You with the basic stuff, English is not my native so I need as doble as time required, and I now You are busy.. The points You and Mohammad gave me force me to learn in that direction and it is a good approach solution when trying to understand..

Many thanks again!
[Android Apps and Games] Mohammad_Adib:
Any way to detect swipe in from the side of the screen?
[Android Apps and Games] pingpongboss:
Not any way I can think of right now
[Android Apps and Games] net_vampire32:
Thanks.
[Android Apps and Games] wutk3ksHD:
I want to resize the window when it gets focus. This is my code so far:

Editor editor = getWindow(id).edit();
editor.setSize(displayWidth/2, StandOutLayoutParams.FILL_PARENT);
editor.commit();

However, StandOutLayoutParams.FILL_PARENT seems to return 0. At

public StandOutLayoutParams getParams(int id, Window window)

, StandOutLayoutParams.FILL_PARENT works fine. Any idea?

EDIT:

solved. Instead of using Editor to resize the window, i use this code:

updateViewLayout(id, new StandOutLayoutParams(1, displayWidth/2, StandOutLayoutParams.FILL_PARENT));

I thought Editor fires updateViewLayout(), so i wonder why it works.

---------- Post added at 05:43 PM ---------- Previous post was at 05:15 PM ----------

regarding this, i point at StandOutWindow's method

public boolean onFocusChange(int id, Window window, boolean focus)

Here is how it could be done:

on focus:

- window: set size to fullscreen and position to top left

- start animation of your main layout which makes a swipe in effect.

focus lost (shrink the window to a small "sidebar"):

- window: set size to e.g. x = 20dp and y = 50dp and position to x = LEFT and y = CENTER
[Android Apps and Games] Zed is Dead:
YES!! I did it (at least opens correctlly :o ), now need to tweak other stuff! but did well!

VERY GRATEFULL to Mohammad and Mark! As said, a good pointing worth a million!:good:

btw, I suggested to appinventor team to transpose StandOut to AI. Mark, is that ok? There was an issue about that there and generally a lot of people asking that alike ability.

Have a great weekend!

(these image verifications will kill me)
[Android Apps and Games] brandall:
X to close

Hey pingpong, hope you're cool

I've had a trickle of reports over the last few months that the X doesn't close the window - it just does nothing and remains on the display.

At the very start of using your library, I replaced the X icon with a different blue one, but when a user sent me a screenshot of the window stuck there, it was using the original X icon, which I found very odd as there's no longer a reference to it?!

I searched the thread, but didn't find this reported before - Any suggestions?

Hopefully I'm being thick!

Cheers

Ben
[Android Apps and Games] pingpongboss:
Sure, you can bring it up, but I doubt they'll include it.

I haven't encountered any reports of that. Are you using a version of StandOut that fails on errors (throws IllegalStateExceptions) or that silently fails on errors (Log.w())? You could check logcat for when close(...) fails.

The x reappearing sounds very odd. I can't imagine why that would happen.
[Android Apps and Games] Zed is Dead:
Hi, Mark...of course it would be up to them, there are no objective reasons they could give for not to do that, the only thing which would drive them not to see is a ego larger then kilimanjaro :)...

Hey, if You look at it this way, even a somebody without practically any knowledge made use of it! What else could be important?
[Android Apps and Games] Mohammad_Adib:
SCORE!!!

http://www.addictivetips.com/android/floating-stickies-brings-omnipresent-sticky-notes-to-android/
[Android Apps and Games] Zed is Dead:
:good: well done!
[Android Apps and Games] wutk3ksHD:
Nice!

Sad that Floating Notes didnt "score" :( however, awesome :)

Edit: oh :D http://www.phonearena.com/news/Extreme-multitasking-the-best-floating-apps-for-Android_id37500
[Android Apps and Games] pingpongboss:
Haha you guys got lots of competition. Pretty sure this guy is using StandOut as well https://play.google.com/store/apps/details?id=com.mjlim.hovernote
[Android Apps and Games] Zed is Dead:
...if the hunch does not fool me, StandOut could perform as operating system UI...
[Android Apps and Games] wutk3ksHD:
As far as i know, he doesnt.

His app has been released before StandOut, if i remember correct. I ve seen hovernote and wanted to implement a floating app too. I searched several months for some code snippets at stackoverflow and so on, but soon i was desperated. I thought: " i will never have my own floating app" and stopped implementing. A bit later i searched the web for floating apps after i noticed aircalc and then i found Standout. Awesome.:good:
[Android Apps and Games] pingpongboss:
Oh, cool thanks for the info. I just assumed he used StandOut because he has docking functionality, resize/close buttons/menu is same as on StandOut. I think he at least took some inspiration or borrowed code from StandOut?
[Android Apps and Games] Mohammad_Adib:
This app is all over now...

http://www.xda-developers.com/android/multitask-with-floating-stickies-app/ <-- XDA ermahgerd

http://www.addictivetips.com/android/floating-stickies-brings-omnipresent-sticky-notes-to-android/

http://www.talkandroid.com/149784-new-floating-stickies-app-supercharges-the-note-taking-process/

http://www.redmondpie.com/floating-...er&utm_campaign=Feed:+RedmondPie+(Redmond+Pie)

http://outdatedpenanguncle.blogspot.com/2013/02/free-apps-floating-stickies.html

http://www.somedroid.com/2013/02/02/multitask-with-floating-stickies-app/

http://droidviews.com/2013/floating-stickies-app-lets-you-take-notes-anywhere-in-a-cool-way/

http://geekiest.net/post/Floating-Stickies-Android-App.aspx

http://bacooler.com/android/multita...es-app/?utm_source=dlvr.it&utm_medium=twitter

lolwut random spanish guy on youtube... https://www.youtube.com/watch?v=1iVp0mHpvuk

Google+, Facebook...

...and counting...

Damn, Mark. Thank you so much! Credit pretty much goes to you :) you're a fantastic dev.
[Android Apps and Games] invinciblecc:
Re: [APP][2.1+] StandOut - Create Floating Apps [Updated 7/8: Window Editor]

Can someone make a floating file manager

sotmax yank zram 650 swap 1gb jkay acid mod
[Android Apps and Games] wutk3ksHD:
My floating paint app is for free from now on. There is also another free version of Floating Notes.

Why do i do this? My goal was to earn as much money as i need to pay for my driverlicense. It's reached today :good: Thank you, Mark <3
[Android Apps and Games] brandall:
I haven't updated the library for a while actually, so I'll do that now!
[Android Apps and Games] Zed is Dead:
Well, my app is done,but it seems that Croats can not sell app on GooglePlay! Anyhow, a week from not knowing anything about JAVA to first app is what satisfies me, and all this because Mark was generous enough to share StandOut (THANKS :good:), and Mohammad for good will to help on obstacles!

:good: Thanks and have a good day!
[Android Apps and Games] Mohammad_Adib:
Hey Mark, something is wrong with an app I am working on...

So imagine a SimpleWindow, with bounds enabled. When the phone flips the screen (portrait/landscape) the bounds dont change with the phone....so the window cannot move past an invisible boundary in the middle of the screen. Did I override some method that handles this? Any idea what could be wrong?

UPDATE

Used the old standout from 10/18/12 and it works perfectly. Looks like you got a bug on the new version Mark... quite serious one at that. Fix please :D
[Android Apps and Games] pingpongboss:
I bet it was this line https://github.com/pingpongboss/Sta...rary/src/wei/mark/standout/ui/Window.java#L80

I cache the displayWidth and displayHeight when I create a floating Window. So if you create a Window, then rotate the device, those two values would be invalid.

StandOut is open source, so pull requests are appreciated ;)

Or you can wait for me to put in a fix, but I'm pretty busy with work lately.

Thanks for finding this bug
[Android Apps and Games] Garrett1976:
I cache the displayWidth and displayHeight when I create a floating Window. So if you create a Window, then rotate the device, those two values would be invalid.

StandOut is open source, so pull requests are appreciated ;)

Or you can wait for me to put in a fix, but I'm pretty busy with work lately.

Thanks for finding this bug[/QUOTE]

Can someone provide me direction on how to resolve this issue..I noticed it as well. Obviously I need to capture the screen rotation event and update these cache value...any further input would be appreciated.

Also, can someone give me an example of how to programatically resize the window at run-time? I have a button to display a compact view and want to make the window smaller on click.

I'm working on my first Android app, am a DotNet developer by trade, and am using StandOut. I will share a link with everyone as soon as I'm done.

Thanks
[Android Apps and Games] pingpongboss:
Change Window.java so it doesn't cache displayWidth and displayHeight. Remove those fields from the class, and whenever they are used, recalculate them each time.

resize the window by first getting the Window object with getWindow(...) then call window.edit().setSize(...).commit()
[Android Apps and Games] Garrett1976:
Thanks Mark. That is the pointer I needed. I want to echo everyone's sentiments and say thanks for all of your hard work...and for the quick reply. I set out to make floating, resizable windows myself but it was very slow going with my lack of java experience. Your library is really helpful and well-done. I'll send you my app once it's finished and you can feel free to post screenshots if you like it.
[Android Apps and Games] berkley:
Hi,

when I use this combination

@Override
public StandOutLayoutParams getParams(int id, Window window) {
return new StandOutLayoutParams(id,
StandOutLayoutParams.WRAP_CONTENT,
StandOutLayoutParams.WRAP_CONTENT,
StandOutLayoutParams.CENTER,
StandOutLayoutParams.CENTER);
}

The floating window doesn't get centered from its middle. The upper left corner tries to get centered. This has the effect, that

StandOutFlags.FLAG_WINDOW_EDGE_LIMITS_ENABLE

is useless.

Has anybody experienced same problems?

Cheers, berkley
[Android Apps and Games] pingpongboss:
Ah, this bug is tricky.

It has to do with how I calculate where to place the window, here https://github.com/pingpongboss/Sta...c/wei/mark/standout/StandOutWindow.java#L1879

I assume that the width is an integer, so I use the formula x = (displayWidth - windowWidth) / 2

This usually works, but you are passing in windowWidth = WRAP_CONTENT = -2

I don't think this will work with WRAP_CONTENT (how can I figure out what the width/height should be, in order to use that width/height in the formula?) so the only thing you can do is to pass in an actual width.
[Android Apps and Games] berkley:
OK thanks, glad to hear. Already thought, that this has to do with my lack of Java knowledge.
[Android Apps and Games] pingpongboss:
Well, the easy way to "fix" this is to use a number for your width and height instead of WRAP_CONTENT
[Android Apps and Games] berkley:
Yes, sure.

But this solution doesn't look good on different screen sizes.
[Android Apps and Games] pingpongboss:
Nope, but I wouldn't know how WRAP_CONTENT would work.

There would have to be a way to measure the size of the view before I assign them a x,y position.

Maybe something like this http://stackoverflow.com/questions/2827079/measuring-a-view-before-rendering-it

But, very busy with work recently :)
[Android Apps and Games] berkley:
Don't worry, me too.

Anyway, thanks for fast answering!