yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] lotdrops:
window not showing

I'm new to programming, so I'm probably doing a stupid mistake. My problem is:

On my app, I have created a class which extends StandOutWindow, with all the methods used in SimpleWindow. When I run the app the window doesn't show.

Then, on your Example:

If I modify your Example, changing the layout or the params, the window works, even changing the name of the class.

If I copy-paste the simplewindow class within the example project, the new class won't show any window, but the window from the original file keeps showing. The only difference is that when I try to close with the notification it doesn't work the first time, and it force-closes the second time.

I have called the methods closeAll and show on the StandOutExampleActivity, for the new class.

If I comment the closeAll and show for the original class, and leave the closeAll and show for the new class, nothing happens -when running the app.

---------- Post added at 02:05 PM ---------- Previous post was at 01:34 PM ----------

In case someone finds it useful, I managed to use the library on android studio following this: http://xdaforums.com/showthread.php?t=2421186
[Android Apps and Games] pingpongboss:
Use the static StandOutWindow.sendData() method
[Android Apps and Games] manuja95:
Thank you very much! I tried it and it works!

I also have another question. Is it possible to at the launch of the activity not have focus on the floating window but when the user clicks on a button, get focus?

Any help is greatly appreciated :D
[Android Apps and Games] pingpongboss:
Can you just call unfocus() after the window gets shown?
[Android Apps and Games] Luca.Brasi:
Excellent apps. Thanks for all
[Android Apps and Games] lotdrops:
Hey pingpongboss! (or anyone else)

Sorry if I'm too persistent, do you know why this is happening?? I'm incapable of using the library on my projects, as described above...

Thanks!
[Android Apps and Games] manuja95:
No I can't do that. For example if I am playing a game and I call my window through a timer while the game is being played, the game pauses because my window (implementing StandOut) gets the focus. I found a solution to this by putting return super.getFlags(id)| StandOutFlags.FLAG_WINDOW_FOCUSABLE_DISABLE; in the getFlags() method. but then its not possible to get focus when clicked. I tried using focus() class in onclicklistener but didnt respond. Any advice? thanks mark! :D
[Android Apps and Games] manuja95:
Did you add the StandOut library to your project?
[Android Apps and Games] lotdrops:
Yes I did, it took some time but I did. I installed the Example app and it worked, modified it and still worked. The problem was when I tried to add a new class (even by copy-paste) to the Example. Then it would still load the floating window from example, but not the one I had added.

I thought it might be about not having the library well added (I'm using Android Studio and it's a bit more difficult) but I understand that the fact that Example works but not a class added to it, discards the library being the problem...

Thanks for answering!
[Android Apps and Games] pingpongboss:
Make sure your AndroidManifest.xml file is similar to the Example manifest files.
[Android Apps and Games] keenofhiphop:
i like this app a lot. it is only bad that it closes after a time...

If there was a small app (sony) to launch that it would be great :)

Gesendet von meinem Sony Xperia SP
[Android Apps and Games] lotdrops:
I opened Example and didn't modify it (I have not added any activity). I have checked it, and It's exactly the same as Example.
[Android Apps and Games] M.Kordiak:
OnLongClickListener

Hey Guys,

I'm trying to make my window draggable when i long click a button, but i can't get it to work.

Any suggestions?

Thanks!
[Android Apps and Games] MrChops:
Do I need to add checks to these events that the window actually exists? Do I need to amend the library code? I'm never comfortable changing other people's libraries as future updates could break my app. Not sure what to do, I'm still getting "Tried to focus(0) a null window", "Tried to updateViewLayout(0) a null window" and "Unable to add window -- token null is not valid; is your activity running?" errors occasionally.

Am I the only one?? :confused:

James.
[Android Apps and Games] :
Import to Android Studio

Hey Mark,

at first, I want to say, thank you for your library. Very good job.

I just have found your library and imported it to Android Studio without problems.

What is needed to do for importing it manually to an existing project in Android Studio:

1. Add

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

to AndroidManifest.xml

2. Rename res/values/strings.xml to so_strings.xml

3. Copy&paste both folders res/ and src/ to the existing project

4. Add strings from so_strings.xml to project's strings.xml

5. Change

import wei.mark.standout.R;

to

import YOURPROJECT.R;

in files: wei/mark/standout/StandOutWindow.java and wei/mark/standout/ui/Window.java

Hopefully, nothing is forgotten :cowboy:

P.S. it would be better if you would add a prefix to different resources like all files in res/ and maybe strings in strings.xml, so that the files will not be overwritten.
[Android Apps and Games] Mingonet:
I am working on a Standout apps which is embed a WebView and browse the web site thought network.

I found that sometimes the apps will freeze.

To reproduce the error :

1. Load the web page to webview first.

2. Tap the Standout window title bar one time。Or hide and restore windows 1 time.

3. tap the webview.

4. The application will freeze.

The interest part is, i close the application via android device-> application -> running, the standout window will still draw on screen.

I digg on this thread, someone said Unable to add window is cause by Spinner or DialogAlert View.

But my project has not use them.

Just a

1. A textview with marquee animation to scroll the webpage title.

2. AutoCompleteTextView with dropdownlist (For Url),

3. A Button (For send the url to webview and load the page),

4. A webview (javascript enable)

So any solution?

thanks you!
[Android Apps and Games] UpGado:
Please I have a problem in implementing Admob view with the library in this code specifically :

public void createAndAttachView(int id, FrameLayout frame) {
//TODO FIX THIS
AdView adView = new AdView(this, AdSize.BANNER, "##############"); << Error here : it needs an activity to be created
layout.addView(adView);
adView.loadAd(new AdRequest());
LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.simple, frame, true);
}

Please reply asap

thanks

p.s very very nice library (y)
[Android Apps and Games] Mingonet:
Is it any method bring the share chooser to topmost??

I intent a share chooser, but it stay behind the standout window.

final Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, (CharSequence)((EditText)txtUrl).getText());
sendIntent.setType("text/plain");
try {
Intent i = sendIntent.createChooser(sendIntent, "Select an action");
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
} catch (android.content.ActivityNotFoundException ex) {
AppHelper.LogException(ex);
}
[Android Apps and Games] glimmling:
Anyone thought about developing a Tasker plugin to embed scenes in movable windows?

Currently scenes can act in three different ways, as a popup, an overlay or an activity scene. A plugin, which makes use of the StandOut library would be an enrichment for the flexability of Tasker scenes.

Thank you!
[Android Apps and Games] Mingonet:
I found much problem on this library, is the project still continuous to encourage people report bug?
[Android Apps and Games] pingpongboss:
Might have something to do with TYPE_PHONE

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

You'll want to fork the library and fix those bugs yourself :)
[Android Apps and Games] Mingonet:
Hi,

Me again,

Does anyone can explain what is the usage of WindowCache.class?

I find that the WindowCache is not release the memory usage of closed windows.
[Android Apps and Games] andob0:
[MENTION=2484344]pingpongboss[/MENTION]

Hi, nice work! Can you tell me if there's a port of your library to c#, so that Xamarin/monodroid users (including myself) can use it?

If no one ported yet, I'm going to port it.
[Android Apps and Games] lotdrops:
force closes

Hey!

When I import the Library build an app and launch it in the phone it force closes. Nevertheless the Example or the floating folder work, even if I modify them, or add my own classes.

After 2 weeks of fighting, I've run out of ideas. I suppose I'm missing some step I should have done. My steps:

1st build project and import library.

Build a class that extends StandOutWindow, and overrides the same methods as SimpleWindow.

Build the layout to the previous class.

Add the service to the manifest.

On the activity class, StandOutWindow.closeAll and StandOutWindow.show.

The same class and layout used on "example" work perfectly, but on my own project don't, so I imagined I'm missing something not related to code...

*I've tried both in AndroidStudio and Eclipse. On Eclipse the logs said it couldn't find the class X (X= the class that extends StandOutWindow).

So, does anyone have any idea on how to get it to work?? Thanks!
[Android Apps and Games] Crashinvaders:
Looks awesome! Hope Google will add same functionality to future android releases.
[Android Apps and Games] Mingonet:
This is not works, it just change the X and Y after rotate, but not the margin of the screen size, and what is the R.drawable.ic_nos ?
[Android Apps and Games] aldolo:
time to standardize

Not being an expert java and android programmer I may be wrong, but it seem that the biggest problem of standout are the many rules it break.

Many standard views/objects/components are not usable because they simply don't work inside a popup. I've spent many hours to simply rebuild the cut&past in an EditText and still it's not good as the real one.

So, what to do? Standout is really useful so

PLEASE

all you others, share your code!!!

A collection of usable views would be extremely useful.

Thank you.
[Android Apps and Games] Mingonet:
I know your feel bro.:crying::crying:
[Android Apps and Games] Mingonet:
How about 4.3? i just try 4.3 today on emulator ,it still ok to resize.
[Android Apps and Games] aldolo:
play it again sam

i've messed up a little bit more with the damn edittext just to regain the cut&paste functionality, and here is again my floating terminal. now i can type on the command line while starring at another program. it is my first attempt to build a standout program. someone interested in the source?

specific features developed for standout:

-popup that stay inside the screen regardless the starting point (dropdown menu before went outside the screen in some case)

-cut&past in edittext

-call to a setup intent and return
[Android Apps and Games] Mingonet:
Thanks you~

It is good to have cut&paste function!
[Android Apps and Games] aldolo:
https://github.com/aldolo69/abTermWithService

first attempt...
[Android Apps and Games] aldolo:
stall of the project?

not many action here. maybe because the library is a little bit complex to use. to be honest is pretty easy to start and write something BUT it is difficult to write something bullet proof. there are few shortcomings, not easy to overcome without touching the library code:

-showing up twice the same window break the code

-showing up a window does not remove the hidden notification

-restoring a window does not bring it in front of the others

-clicking a window does not bring it in front of the others

-the icon menu always has a quit command

-string constants are not resource friendly

-icons are horrible. if everyone choose a different icon for min/max/close the screen become a mess

-resizing from all the corners to solve out of screen unreacheable window problem

is there someone willing to cleanup the code without redoing the same changes again and again?

i'm learning to use it because i like the idea of multitasking on the tablet, but i'm not the right person to do such a cosmetic cleanup because i'm a "quick&dirty" programmer.
[Android Apps and Games] aldolo:
[/COLOR]

in your code i've found

public static void hide(Context context,

Class<? extends StandOutWindow> cls, int id) {

context.startService(getShowIntent(context, cls, id));

}

maybe it should be getHideIntent???
[Android Apps and Games] pingpongboss:
Haha, you're right. That is embarrasing. You're also right that there's not much development going on for StandOut right now. I'm really busy with work and all the development and bugfixing is currently going on by individual developers who have forked StandOut.

It sounds like you want everyone to all come together and maintain StandOut together instead of everyone forking it and committing their own fixes. That sounds like a good plan to me.
[Android Apps and Games] wingoku:
Deleted

Deleted
[Android Apps and Games] jlebeau:
Thank you :)

I would like to thank you for StandOut, I successfully implement it in NicePlayer as a floating Controls for the player!

Very easy to use and to integrate!

the Result can be see here : https://play.google.com/store/apps/details?id=com.kiboweb.android.niceplayer.beta (et discuss here: http://xdaforums.com/showthread.php?t=2397646)
[Android Apps and Games] Mingonet:
Finally, my standout app is launch on Google Play, it is a standout browser application.

https://play.google.com/store/apps/details?id=com.mingo.cloudbrowser

Thanks you pingpongboss!

I suggest you may promote to Google Android Team, i think StandOut should be in official SDK.

Later i will push some fix or new function of StandOut to Github.

(I am still not very good to control on GIT)

PS: Sorry for my English, i come from HongKong.
[Android Apps and Games] pingpongboss:
Very nice work! I actually work on the Android team, and I can say for sure that this kind of hack will not make it into any official SDK hahaha :laugh:
[Android Apps and Games] Mingonet:
It's sad to hear that, StandOut is a way to make it different to iOS.

BTW, is it anyway i can implement the Spinner (Drop down list) of the WebView myself?

If the user click the drop down list, StandOut will crash because the window token issue.
[Android Apps and Games] pingpongboss:
You may want to do something similar to the drop down menus in StandOut https://github.com/pingpongboss/Sta...rc/wei/mark/standout/StandOutWindow.java#L769
[Android Apps and Games] Mingonet:
Thanks you for quick reply, i will have a look on it. :good::good::good:

Click the DropDownList on webview cause error is the critical bug :crying:
[Android Apps and Games] Decad3nce:
Hey Mark,

Wonderful library and thank you for all the work, letting us do the easy part. Utilizing it to show floating widgets in Quickly. :)

[YOUTUBE]GCO_f0tUjyo[/YOUTUBE]

https://play.google.com/store/apps/details?id=com.decad3nce.quickly
[Android Apps and Games] Mingonet:
I have override the getDropDown() method, and place few break point on it.

However, it seem the i click the html select element on webview is not recognized to this method.

:crying::crying::crying::crying::crying:
[Android Apps and Games] pingpongboss:
Well, I meant, look at how the drop down works, and use a similar method (if possible) in your web browser. You won't be able to just override it.
[Android Apps and Games] SharePlus:
This is awesome:)
[Android Apps and Games] Cyb3rGlitch:
I'm the creator of Lux Auto Brightness, and I use a similar technique in order to implement my various functions. I haven't had time to read through your entire library, but I was wondering how you handle secure activities. For example, apps which use the SYSTEM_ALERT_WINDOW permission in order to create an overlay will block sideloading on most ROMs, because the 'Install' button gets greyed out. This is because the package installer is a secure activity.

My solution thus far has been to keep a list of apps which cause issues, and poll the foreground app to check whether my overlay should be disabled. There's also logic there to dynamically adjust the polling rate to avoid wasting CPU cycles, but I digress.

I'd love to hear what you think.
[Android Apps and Games] wutk3ksHD:
Hi!

I am working on something like Overskreen, a floating browser. I can display a WebView yet, but editboxes (for example the google search field) arent focusable. If you click it, the cursor shows up, but you cannot write anything. Any solution?
[Android Apps and Games] pingpongboss:
Wow, I haven't tested enough to encounter that issue yet. Sorry I don't have an answer to give, but I'm glad you brought it up so I know what's going on if it happens in the future. I'll look into it, and report back if I find a better solution. (maybe instead of periodic tests, only test on ACTION_OUTSIDE touch events).

Do EditTexts work outside of WebViews? I had to write some workaround for EditTexts so that they could work in a non-focusable StandOut window. If they work outside of WebViews but don't work inside WebViews then I either have to write another workaround for WebViews, or I need to figure out how to make the StandOut window focusable, yet still keep the ability to touch the background and Back and Home keys.
[Android Apps and Games] Cyb3rGlitch:
Our solutions differ slightly, because I require a window so I can adjust screen brightness system wide in real time. Also, my overlays are fullscreen. I couldn't reproduce the issues I was having with your example app, so you might be safe.
[Android Apps and Games] pingpongboss:
interesting, thanks for following up. If I had to guess, your "overlay" is of type TYPE_SYSTEM_OVERLAY while StandOut windows are of type TYPE_SYSTEM_ALERT. That may be the difference.
[Android Apps and Games] wutk3ksHD:
EditTexts work for me, but if they get focused, an additional edittext pops up above the statusbar. I can type text into this one and the same text appears in the Alert's edittext.

But it works.... *thumbsup*... buggy.
[Android Apps and Games] halrulez:
I just had to tune in and say great job! This is one big part that "android" is missing. Keep up the good ideas and work. Hope all gets ironed out so this function is used is further android updates.
[Android Apps and Games] pingpongboss:
hahahaha :D looks like you've found my uber-hack to make EditTexts work in an unfocusable StandOut window.

But are you using an old version of StandOut? Long ago, I've made it so that you never see the "additional edittext" and it looks like you are just typing into your alert.

Edit: No you're right, the EditText still shows. I'll hide it in the next update.
[Android Apps and Games] dgirard:
Loosing Keyboard

Really great library. Thanks for it !

The library works perfectly on my Galaxy Nexus.

But sometimes on my Galaxy S, the keyboard will not appear if Standout is launch and the focus is in a textfield. I have to kill Standout it in order to get the keyboard back.

Any idea ?

Thanks in advance
[Android Apps and Games] ciao99:
I have this error in eclipse:

The container 'Android Dependencies' references non existing library 'C:\Users\........\pingpongboss-StandOut-74248e9\library\bin\standout.jar'

SOLVED: in project properties check both "is library" & one of "project build target"

but StandOutMultiWindow.java is missing in StandOutExample :/
[Android Apps and Games] wutk3ksHD:
Although your library is quite cool and useful, i want you to tell some bugs i found.

The SimpleWindow is not movable all around the display for me, just in the right bottom quarter of my screen.

Is it possible to resize a VideoView when the Window gets resized?

---------- Post added at 11:31 PM ---------- Previous post was at 11:23 PM ----------

Although your library is quite cool and useful, i want you to tell some bugs i found.

The SimpleWindow is not movable all around the display for me, just in the right bottom quarter of my screen.

Is it possible to resize a VideoView when the Window gets resized?
[Android Apps and Games] pingpongboss:
Which version of Android are you running? I'm getting some feedback that there is an issue with Android 2.3

I think you are incorrectly linking to the StandOut library. Here are the steps:

Make sure the StandOut project has been imported into Eclipse.

Create your own Android project in Eclipse.

Link to the StandOut project from your own project (?)

Copy the AndroidManifest.xml permissions from StandOutExample to your own project

I don't know why you have errors with standout.jar. That file shouldn't exist, and you shouldn't think that it exists.

The StandOut project needs "Is Library" checked, but that is already done for you so you shouldn't have to touch it. Your own project does not need "Is Library" checked. Just make sure you follow the directions.

Make sure you download the latest StandOut library. StandOutMultiWindow.java has been renamed to MultiWindow.java

SimpleWindow is not moveable? Can you confirm with the latest StandOut library, and if it's still an issue, provide the Android version you are working with.

I've added the onResize() callback to the latest version of StandOut. I've also replied to your email.
[Android Apps and Games] wutk3ksHD:
Hi.

Since update, everything is fine. Thumbs up for this :)
[Android Apps and Games] pingpongboss:
I just pushed out a new way to fix all the issues with Buttons and EditTexts. I'd like everyone that was having problems before to try the newest version out and see if I need to change anything.
[Android Apps and Games] xdaid:
A lot better than before, but:

1) The soft keyboard does not go away if i close/hide a window containing an EditText, instead, if i use the back button BEFORE the window is hidden/closed it's ok then.

2) I still have a force close when i try to select an app in floatingfolders. The FC occurs when i click an item in the apps' list. Important, this error does not occur with ICS! (and actually it only regards floatingfolders, i made other projects using your library and listviews work just fine).

Thanks a lot for your efforts!
[Android Apps and Games] pingpongboss:
Thanks to a commenter on Reddit, I think I've permanently solved the problem with EditText gaining focus and the keyboard doing weird stuff. Windows are now TYPE_PHONE instead of TYPE_SYSTEM_ALERT. The latest changes have been pushed. I recommend everyone to update to the latest version of StandOut and help test everything out.

#1 should be fixed, as described above.

#2 should be fixed too, in a separate commit. Please update to the latest, and see if the bug is still there. If it still crashes, please provide the Android version and line # or stack trace.

And thank YOU for being one of the first adopters of StandOut, and for your continued support!
[Android Apps and Games] xdaid:
Perfect.

Both issues have been fixed.

I'll keep testing, all is fine so far.

EDIT: just to report a minor glitch (supposing that is a glitch), back and menu hard buttons do not respond if one or more windows are visible, i mean the launcher or any activity in background does not receive any input. The home button works as expected instead.
[Android Apps and Games] darkpain:
Hello guys,

Mark thank you very much for sharing your work and trying to make it better!

In the last few days im messing around with your library and i found one very strange problem!!

Im creating multiple windows which they have buttons and editexts but the strange fact is when im trying to set text to editext,instead of setting text to editext on n1 window is setting text to n2.

Thats true multitasking:PPP

To be more specific.

Im setting text via button click from n1 but i see the text in n2.

When i create n3 then all the "commands" are going to n3 instead of the current window.

I have trying a lot of thing but i couldnt find a solution.

I assure you that every button,editext has different id and the current window is focused but for some reason isnt working as it should....

Its like "hearing" the commands only from the last created window and ingoring the others.

Thank you again.