yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] berkley:
I'm about to create another addon for the mapping app "Locus".

Best to explain, when you install some apps (all free, don't worry... ;) ) by yourself, so you maybe better understand:

Locus Free: http://goo.gl/A2rJq

Locus - addon Geocaching: http://goo.gl/H98Gh

Run Locus Free, hit "menu" -> "functions" -> "set right panel" -> "Add link - feature" -> "Geocaching4Locus"

Now tap on the new button on the right side and I think you understand, why the use of StandOut makes sense here. When you now press the home button of your device, Locus and the menu-view from the addon are hidden (running in background).

Unfortunatly I'm not skilled enough to find out just by reading the code of StandOut, if it is possible, to create floating windows that are just visible, when Locus runs in foreground. What do you think, possible?

And thanks for your fast answers! :good:
[Android Apps and Games] pingpongboss:
Undocumented: use at your own risk

http://stackoverflow.com/a/4753333

You'll want to set up a timer to periodically check what the current activity is.
[Android Apps and Games] berkley:
I was already thinking about something like this.

I give it a try and provide feedback. But don't expect an answer untill the end of the week. Still have to fight with some other problems... ;)
[Android Apps and Games] pingpongboss:
http://android-developers.blogspot.com/2012/12/new-google-maps-android-api-now-part-of.html

I think with this new API we could easily add Google Maps fragments to floating apps.
[Android Apps and Games] brandall:
Thank you! And thanks once more for the library!

Sent via xda premium
[Android Apps and Games] Katecca:
I start trying your library base on SimpleWindow.java in StandOutExample project. My question is that if I just add an ImageView to the FrameLayout and set an OnLongClickListener to the ImageView. The floating window is no longer draggable since the listener takes the foucs.

Is that any way to get rid of such issue?
[Android Apps and Games] wutk3ksHD:
Implement an OnTouchlistener instead and try to return false or true. One of these boolean values make the window draggable again, but i dont know which anymore. Just try.
[Android Apps and Games] pingpongboss:
Hmm found something interesting that might help everyone who are trying to put a MapView inside a floating window. I'm hopeful that this technique will help for making floating video players as well.

From https://plus.google.com/104992412719307414985/posts/JYamEH9QQR1

Well, MapActivity has been deprecated already due to the Google Maps Android API v2 but maybe this will help for other times when you need a backing Activity for your floating window.
[Android Apps and Games] Katecca:
Thanks for your help and the view is now draggable. However, it can only trigger MotionEvent.ACTION_DOWN but not others (e.g. ACTION_MOVE, ACTION_MOVE). :crying:

Any help is highly appreciated!
[Android Apps and Games] Katecca:
Finally, I solved by overriding onTouchHandleMove() to provide by own implementation of MotionEvent.ACTION_DOWN :)
[Android Apps and Games] davidww:
Floating app with html5 capabilities

Hi,

Would it be possible to use the library to develop a floating app to display a html5 page?

Thanks

David
[Android Apps and Games] xdawebb:
about drag??

Hi! Sorry to have bothered you

i drag listview item to other app editview , i can't get other app of view. so can't drag item to edittext content. right??

i think window float and other app at different level .how can i do like windows drag ?

thanks!!

View attachment 1592079
[Android Apps and Games] berkley:
Where did I find that part of code about the floating folder docking on left side of screen as 'mini-folder' again?
[Android Apps and Games] pingpongboss:
Yes I believe so.

You are right, you do not have access to the underlying app's views. You can only do drag-and-drop within your own application.

You are looking for the FloatingFolders project. This line begins the docking code:

https://github.com/pingpongboss/Sta...mark/floatingfolders/FloatingFolder.java#L543
[Android Apps and Games] berkley:
That one was fast... :good:

Right place, looks good!

Thanks, berkley
[Android Apps and Games] Mohammad_Adib:
So I tried to run the example, and got this error. Any idea what's going on?

I simply downloaded the libs as a zip from the github, unzipped and imported all 3 to eclipse. Then ran. Got this a ClassNotFoundException for StandoutExampleActivity. (Click image to view larger)
[Android Apps and Games] berkley:
Have you set the library for the example?

Check project properties, android, library. Add the StandOut folder if not present...
[Android Apps and Games] Mohammad_Adib:
Got it to work. Looks amazing.

Made my own ubuntu theme ;)
[Android Apps and Games] pingpongboss:
whoa, looks really nice. How did you fix your problem?
[Android Apps and Games] Mohammad_Adib:
No Idea, but I have big plans with this. Check out the current progress. I don't know if I should release a browser because there are so many aspects to a browser that I feel are too challenging to tackle, and also people might think I am copying the other floating browsers out there.

But, I have a super awesome secret project that is even more challenging that is seeing the light of day at last thanks to this library. Awesome times ahead. Here's another screenshot :D

I've had only 2 hours to play around with this, so I'll see where this is headed. Thanks again for this AMAZING library. super :D
[Android Apps and Games] pingpongboss:
Wow! Well, keep me updated. I'd love to see where you can take StandOut :)
[Android Apps and Games] Mohammad_Adib:
Changed around some webview UA strings, to get a desktop web browser working, also made it so if the current window has focus, and you tap it, then it folds itself instead of blinking (which i found annoying)
[Android Apps and Games] pingpongboss:
ah yea.. unfortunately I haven't been able to find a way to "bring to top" a window without the flashing.
[Android Apps and Games] Mohammad_Adib:
What you've done is already amazing. Mind blown lol.

I might try to experiment and make a windows 7 aero window.
[Android Apps and Games] Adizzzle:
Simply amazing what you've done already, though I lack the ability to import and figure out Eclipse, I can't wait to get this functioning on my i717.

Is there a video tutorial of some sort? I don't have a lot of free time on my hands taking care of my little one and working full time..

:beer: "We can't stop here, this is Bat Country!" :beer:

Blog: http://ajizzzle.blogspot.ca/
[Android Apps and Games] w_ongkl:
Hi Mark!

I am having problem in creating a new window. What are the methods needed to be called before calling show(id)?

I kept on getting the "Failed to send data to non-existant window. Make sure toId is either an existing window's id, or is DISREGARD_ID.".

How do I register an id as an identifier for a new window? :confused: and thanks for your great library! I have lots of fun experimenting different UI with this :laugh:
[Android Apps and Games] pingpongboss:
No video for now. But honestly it'll be a lot faster if you just follow the 5 step instructions on the first page http://xdaforums.com/showthread.php?t=1688531

You should only be getting that error if you tried to use the sendData() static method.

To create a new window from an Activity, use the static StandOutWindow.show() method. To create a new window from your implementation (the class that extends StandOutWindow), use the normal show() method. Then make sure that all the abstract methods are implemented (like createAndAttachView() and getParams() etc). All these abstract methods will be called by the system, and the system will conveniently give you the id of the window.

So for example, in your Activity, you call StandOutWindow.show(0, ...)

The system will then attempt to create a new window with id = 0

This process will eventually call your implemented createAndAttachView() method with id = 0. Your implementation should know what id = 0 means, since you are the one who called show(0, ...) in the first place

Edit: New update to StandOut!
[Android Apps and Games] Mohammad_Adib:
Just released this. Simple enough, and docks to the side. Standout is amazing! Got more coming :)
[Android Apps and Games] Mesograt:
Your link appears to be down...it's here:

Floating Stickies

Looks nice. Giving it a go now!

Edit: So far it's worked fine for me :) It'd be more useful if there was some way to save the notes though. Good work ^^
[Android Apps and Games] pingpongboss:
I really like the way you did your tutorial. And the open/close animations are quite nice too. Good work!
[Android Apps and Games] xjaphx:
I have an ImageButton on the layout (well, the only View to touch), and trying to do this:

- if click on this ImageButton, then it will do something, for example a Toast message.

- else if touch this ImageButton and move it, the window will move.

This is what I try, but somehow there's something wrong. I don't know why.

My first guess is that I should pass the onTouch() to parent (the layout???), but I don't know what is proper way to pass it.

Hope somebody can help me out.

@Override
public void createAndAttachView(int id, FrameLayout frame) {
// create a new layout from body.xml
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.simple, frame, true);

ImageButton ib = (ImageButton) v.findViewById(R.id.ibClick);

ib.setOnTouchListener(new View.OnTouchListener() {

@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN) {
Toast.makeText(SimpleWindow.this, "Touch down", Toast.LENGTH_SHORT).show();
return false;
}
return true;
}
});
}
[Android Apps and Games] ssuukk:
Hello,

Could you possibly guess what's causing such problem during run, when using jar library:

01-22 08:55:55.683: E/AndroidRuntime(2116): FATAL EXCEPTION: main

01-22 08:55:55.683: E/AndroidRuntime(2116): java.lang.NoClassDefFoundError: wei.mark.standout.R$id

01-22 08:55:55.683: E/AndroidRuntime(2116):	at wei.mark.standout.ui.Window.<init>(Window.java:123)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at wei.mark.standout.StandOutWindow.show(StandOutWindow.java:1078)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at wei.mark.standout.StandOutWindow.onStartCommand(StandOutWindow.java:381)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2782)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.app.ActivityThread.access$1900(ActivityThread.java:150)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1341)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.os.Handler.dispatchMessage(Handler.java:99)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.os.Looper.loop(Looper.java:137)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at android.app.ActivityThread.main(ActivityThread.java:5193)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at java.lang.reflect.Method.invokeNative(Native Method)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at java.lang.reflect.Method.invoke(Method.java:511)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)

01-22 08:55:55.683: E/AndroidRuntime(2116):	at dalvik.system.NativeStart.main(Native Method)
[Android Apps and Games] pingpongboss:
Good luck. This isn't normal usage, but it should be possible.

Put a OnTouchListener on the ImageButton, but pass the MotionEvent to onTouchHandleMove()

https://github.com/pingpongboss/Sta...c/wei/mark/standout/StandOutWindow.java#L1577

You'll have to play around with it to get it right, but that should work.

You want to go to Project -> Clean -> select all
[Android Apps and Games] ssuukk:
I think that's the first thing I did and it didn't help. To make it clear - I took library.jar that was generated directly from git project and added it to XenoAmp build. Built ok, but then fails at runtime with this error... Maybe something is missing from the jar? Maybe I have to create it in some other way?
[Android Apps and Games] pingpongboss:
ah.. in that case, you'll need to read and follow the instructions from post #1
[Android Apps and Games] pingpongboss:
I'm guessing you've already done Project -> Clean -> All?

Are you able to compile and run the example project?

This comment seems to indicate that your Eclipse is set up to compile with Java 5. Have you tried switching to Java 6?

http://stackoverflow.com/questions/...e-annotated-with-override#comment92398_212624
[Android Apps and Games] ssuukk:
Odp: [APP][2.1+] StandOut - Create Floating Apps [Updated 7/8: Window Editor]

Yes, examples work ok. I'll try to mix mine and your source tree as last resort. Maybe this will help...

Sent by automatic reply bot from my Galaxy S2
[Android Apps and Games] ssuukk:
Interestingly, after mixing sources, it works. It would be wonderful if this was usable just as a single jar!

Edit - it shows the notification and doesn't crash. But window is invisible anywhere. Any ideas?
[Android Apps and Games] brugobo:
The NoClassDefFoundError errors you are seeing are due to latest Eclipse (17) release, not the library.

Steps to fix:

1. Remove library from java build path if you have messed with it.

2. Go to each project, open it, right-click > Android Tools > Fix Project Properties

3. Close projects and eclipse IDE (do not skip this step)

4. Reopen Eclipse and your projects

5. Select your project, go to Project > Android > Library and ensure StandOut appears there, Add if needed. Make sure StandOut appears on that box rather than in Java Build Path. Do not add standout.jar directly to your projects.

And now my question about the provided example: is it normal that SimpleWindow does not close from the notification bar? I have to force close the app. Both WidgetsWindow and MultiWindow close properly from either the notification bar or the close button. FloatingFolders example works right and it does not have a close button so I am confused about the cause.

---------- Post added at 03:58 PM ---------- Previous post was at 03:56 PM ----------

If your app shows the notification bar but not the window the cause is a missing permission on your AndroidManifest.xml file. Showing the windows requires the following line before the <Application> block:

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
[Android Apps and Games] ssuukk:
It's worth adding to docs! I'll post some screenshot of XenoAmp standout tomorrow probably.
[Android Apps and Games] Mohammad_Adib:
Beta testing...

In the process of beta testing a really really cool app that I hope I am the first to attempt at. So far my friends say it is a 5 stars at alpha/beta stages already. Get ready for it to be released soon (weeks). It is simple, elegant, practical(for everyone) and a super pain in the butt to develop -.- ... Although I hope it catches a lot of attention.

Here's are some hints!

:D
[Android Apps and Games] ssuukk:
Am I allowed to override StandOutWindow onBind(Intent) and create my own binder? If not - how can I communicate with StandOutWindow? I'e react to broadcasts?
[Android Apps and Games] pingpongboss:
Sure, you can override onBind(). I didn't think of a situation where you would need to do that though. I don't clearly understand what you are trying to achieve. Do you want to explain?
[Android Apps and Games] ssuukk:
Heh, instead of explaining, check today's release of XenoAmp - 0.153 that will be available shortly :D I guess it will be first such use of your standout!

The feature will be available in 4x1 widget, when you press a small triangle in upper right corner.
[Android Apps and Games] ssuukk:
OK, I've made a screenshot, but it's not as interesting as seeing it work. It's a "detachable" widget. You open this standout from upper right corner of regular widget and can close it the same way (from either). It works with XenoAmp, showing current track and allowing play/pause etc. I'm planning to make it dockable to the edge of screen later on.

(the smaller one is stand out)
[Android Apps and Games] Mohammad_Adib:
Hey, is there any way to know if the user touched the screen outside of the standoutwindow's bounds?

Also, are polygonal bounds possible where if the user touches within the polygon, a touch is registered?

Or what about if the user touches a transparent area then the touch registers with the system and not the standoutwindow?
[Android Apps and Games] pingpongboss:
Nice, floating widget, i like it. I've always wanted StandOut to be part of an app, not the app itself.

Override onTouchBody(...) and watch for event.action == ACTION_OUTSIDE

You will have to do the polygonal bounds in ur code. Math time!

uhhhh for your third question you'll have to play around with setting the FLAG_NOT_FOCUSABLE flag at the right times.

https://github.com/pingpongboss/Sta...c/wei/mark/standout/StandOutWindow.java#L1811
[Android Apps and Games] Akram_Rasool:
Amazing..Really useful...
[Android Apps and Games] ssuukk:
Aaah, good to fullfill someone's unknown wishes. Just one question - how do I disable creating notification with stand out?
[Android Apps and Games] brugobo:
If you disable notifications your service and your windows will be destroyed as soon as Android needs to free memory, as with any regular activity or service.

Services can be set to survive out of memory killer but Android requires you to have a notification up as a trade off so the user knows you are hogging memory. It is so by Android's design and it is enforced by the framework.
[Android Apps and Games] Mohammad_Adib:
Yeeaaaahhh calculus time! Anyway, wow that is so helpful thanks!!!
[Android Apps and Games] Mohammad_Adib:
LOLWUT!? Caused because of a drop down menu :eek: ... happens when I click an item (which removes a view from the standoutwindow) ... stack trace suggests something about scrolling :silly: wth

......seems to only happen on an HTC Inspire running android 2.3.5.......im gonna ignore it -.- what a wierd error
[Android Apps and Games] pingpongboss:
what version of standout do you have? I remember taking out the ScrollView lately.
[Android Apps and Games] Mohammad_Adib:
SOLVED!

listItem.setOnClickListener(new OnClickListener() {

@Override

public void onClick(View v) {

dropDown.dismiss();

item.action.run();

}

});

You have to put the "dropDown.dismiss();" before the "action.run();"

okey doke. Im happy. AANND idk what version :P i edit my project AND the library so, the library is more modded than my project really...i treat them like 1 project. Just the messy way i program, but who cares if it works.

GG
[Android Apps and Games] wutk3ksHD:
Wow. Awesome to see so much interest in StandOut.

Floating stickies is a competitor for Floating Notes. The

animations would fit perfectly into Floating Notes. How did you do this bounce effect?
[Android Apps and Games] Mohammad_Adib:
Nah, its not nearly as cool as floating notes, but i made it just for fun. The animations are just animated using the bounce_interpolator, no crazy hard coded calculus behind it. It all in the xml. and the startAnimation(AnimationUtils.loadAnim...
[Android Apps and Games] Mohammad_Adib:
Floating Stickies Update

Added copy paste button upon popular request. Enjoy :good:

Oh yeah, has a video now too!

[YOUTUBE]bbck8nChssQ[/YOUTUBE]
[Android Apps and Games] mingolianbeef:
Re: [APP][2.1+] StandOut - Create Floating Apps [Updated 7/8: Window Editor]

I wanna try this :)
[Android Apps and Games] pingpongboss:
nice!! I've heard a lot of people with complaints that copy/paste doesn't work in floating windows. Looks like you made a nice workaround :good:
[Android Apps and Games] Mohammad_Adib:
Thanks! Actually, the first version did not have body movement, and copy paste worked perfectly fine, but the problem was the only way to move it around is with the top part...which is not ideal for stickies, so i had to tradeoff....and hence this solution which allows rudimentary copy paste.
[Android Apps and Games] pingpongboss:
I wonder if you could subclass EditText and process all touch events so that the move events are forwarded to the Window. This way, tapping on the EditText would still work, and the user could drag the EditText to move the Window.
[Android Apps and Games] Mohammad_Adib:
Any way to register the press of the back button?
[Android Apps and Games] pingpongboss:
Implement onKeyEvent(...) in your class that subclasses StandOutWindow

Here's how the window catches the back press, for example https://github.com/pingpongboss/Sta...ary/src/wei/mark/standout/ui/Window.java#L251
[Android Apps and Games] Mohammad_Adib:
What do you mean by implement :confused: onKeyEvent? Is that some method that is implemented with a OnKeyListener or something? or do i override this :silly: ??

lol - FAIL
[Android Apps and Games] pingpongboss:
Did you figure it out? Override this method

https://github.com/pingpongboss/Sta...c/wei/mark/standout/StandOutWindow.java#L1057
[Android Apps and Games] net_vampire32:
Thank you for creating this amazing Public Library.

I used this library to create an amazing Application that allows a person to watch YouTube videos while using any other app.

https://play.google.com/store/apps/details?id=com.sudsoftware.floatingyoutubepopupplayer

Here is a demo video:

http://www.youtube.com/watch?feature=player_embedded&v=sbmB6cbQaLQ

And here is a review by talk android

http://www.talkandroid.com/reviews/apps/featured-android-app-review-floating-youtube-popup-video-utilities/

I have a few bugs to work out before its perfect, but I am well on my way there.

Thanks.
[Android Apps and Games] pingpongboss:
Very nice work. You've got a ton of happy users!

Only two things that I can see:

1. You could detect the aspect ratio of the video, then set the size of the Window to match that aspect ratio, then set new layout flag to keep the aspect ratio whole resizing.

2. The search "button" doesn't seem to be clickable. You could either remove the button and add the drawable into the EditText, or make it am actual button.

It would be really appreciated if you could mention standout in your app description. Not required, of course :good:
[Android Apps and Games] pingpongboss:
I got an interesting question through email, which I would like to clarify.

The general answer is no. Existing applications will not be able to run in windowed mode using StandOut.

You will have to own the source code and make appropriate modifications to convert the application to windowed mode.
[Android Apps and Games] SWFlyerUK:
Have you tried using the VideoView for this yet?

I've had a tweak, but not been able to get it to work.
[Android Apps and Games] notrodash:
Wow this is awesome, but it might only be useful for people with larger screen phones and tablets :/
[Android Apps and Games] pingpongboss:
Hmm VideoView doesn't seem to work. It breaks when you try to set which video to play, inside of VideoView.openVide(). I'm guessing it has something to do with SurfaceViews, since those may depend on there being an Activity underneath.
[Android Apps and Games] xdaid:
I played a bit with your library, i took some of the custom views i wrote and i made them floating

I see some limitations depend on the WindowManager (e.g. bringToFront's workaround), your code is just fine. Again, amazing work!!!

I was wondering it would be cool if i could get rid of the permanent notification, using notifications for hidden items only. But, nevermind, i'm aware it would be unsafe on low memory situations :)