yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] anuben:
Got it working , this time i am using only VideoView in my layout (SimpleWindow.java)

package com.example.adzlivetv;

import com.alpesh.adzlivetv.R;

import wei.mark.standout.StandOutWindow;
import wei.mark.standout.constants.StandOutFlags;
import wei.mark.standout.ui.Window;
import android.app.ProgressDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView;

public class SimpleWindow extends StandOutWindow {
private static ProgressDialog progressDialog;
private String mainString;
private VideoView localVideoView;

@Override
public String getAppName() {
return "My app";
}

@Override
public int getAppIcon() {
return android.R.drawable.ic_menu_close_clear_cancel;
}

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

localVideoView = (VideoView) view.findViewById(R.id.videoview);
this.mainString = Player.Link;
String s2 = mainString.replace("&myownplayer", "");
Toast.makeText(SimpleWindow.this, getAppName() + " is " + s2,
Toast.LENGTH_SHORT).show();

localVideoView.setVideoPath(s2);
localVideoView.requestFocus();
localVideoView.start();
}

// the window will be centered
@Override
public StandOutLayoutParams getParams(int id, Window window) {
return new StandOutLayoutParams(id, 250, 300,
StandOutLayoutParams.CENTER, StandOutLayoutParams.CENTER);
}

// move the window by dragging the view
@Override
public int getFlags(int id) {
return StandOutFlags.FLAG_DECORATION_SYSTEM

| StandOutFlags.FLAG_BODY_MOVE_ENABLE
| StandOutFlags.FLAG_WINDOW_HIDE_ENABLE
| StandOutFlags.FLAG_WINDOW_BRING_TO_FRONT_ON_TAP
| StandOutFlags.FLAG_WINDOW_EDGE_LIMITS_ENABLE
| StandOutFlags.FLAG_WINDOW_PINCH_RESIZE_ENABLE;
}

}

but problem is ,its not floating below half of screen. here is screen shot
[Android Apps and Games] aldolo:
have a look in the library, in the window.java class. there are 2 variables: displayHeight and displayWidth. they are initialized to the screen size. are they correct? i've changed a little the getLayoutParams to keep them up-to-date and correct.
[Android Apps and Games] anuben:
yes buddy ,they are perfect i tried same library with other example and its floating perfectly but in this above code its not working properly and

2 :- how to enable this "StandOutFlags.FLAG_WINDOW_EDGE_TILE_ENABLE" side tile effect i tired to set the flag in ,"	getFlags(int id) " ,

but its not working .||

could you help me
[Android Apps and Games] aldolo:
FLAG_WINDOW_EDGE_TILE_ENABLE is not implemented anywhere. is only printed inside a message, but not available elsewhere. an unfinished work maybe? or is it an attribute of an android class?
[Android Apps and Games] anuben:
i mean to say how to enable that minimize to left edge and becomes small tile. like icon ?/ is there any flag for there in library ?
[Android Apps and Games] wutk3ksHD:
That's not supported by the library yet as far as i know. I implemented it on my way in onMove().

int px = 50;

@Override
public void onMove(int id, Window window, View view, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP) {

StandOutLayoutParams params = window.getLayoutParams();
int x = params.x;
int y = params.y;

if (x == 0) {
// minimize window
} else if (x != 0 && window is minimized == true) {
//maximize window
}

}
}
[Android Apps and Games] tal100:
Allow touch executing programs through a floating window

hello guys,

I don't know if it's possible but, i would like a floating window that will be 50% transparent and through it i could operate the phone (execute programs, move icons and so on).

In the window I would like to show a custom text.
[Android Apps and Games] pingpongboss:
See the first post in this thread. There is directions. You do not want to touch the JAR file.

Check out the Floating Folders example in the advanced/ folder.
[Android Apps and Games] OryonCorp:
Hey Mark,

I wanted to show what your awesome library helped me build

Multitasking:

Multitasking is an android app that gives the user the possibility to open multiple tools inside floating windows.

The tools can be opened from a sidebar that opens with a swipe gesture to the right;

The windows can be modified in various ways:

- they can be resized;

- they can moved anywhere on the screen;

- they can be used in fullscreen mode;

- they can be minimized into the notification bar;

In the end my entire application is based on your library so i want to thank you for your hard work.

Keep it up.

The app can be found here:

https://play.google.com/store/apps/details?id=com.oryon.multitasking

Here is a video I made for the app:

[YOUTUBE]elCZOIr9rHU[/YOUTUBE]
[Android Apps and Games] pingpongboss:
Great work! Nice video. Thanks for the shout out on your app's description :)
[Android Apps and Games] ChangYoonJai:
StandOutWindow.hide(int id) start showIntent not hideIntent !

public static void hide(Context context,

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

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

}
[Android Apps and Games] pingpongboss:
Yup, that's a bug.
[Android Apps and Games] wutk3ksHD:
Wow. I should improve Tiny Apps to not get out of competition :silly:
[Android Apps and Games] OryonCorp:
I'm glad you like it.
[Android Apps and Games] wutk3ksHD:
So there is still noone who knows how to turn hardware-accelleration on?
[Android Apps and Games] pingpongboss:
Try WindowManager.LayoutParams#FLAG_HARDWARE_ACCELERATED in https://github.com/pingpongboss/Sta...c/wei/mark/standout/StandOutWindow.java#L1813
[Android Apps and Games] wutk3ksHD:
woa, ty! This enables videoplayback for a webview, e.g. at YouTube.
[Android Apps and Games] wutk3ksHD:
Make sure you have imported StandOut as a new Project to your workspace. It should just appear as a project in the projectexplorer of your ide as your own project does. You can then add StandOut as a library as you mentionend.
[Android Apps and Games] dancer_69:
I've already done this. I also built it, for this I have the jar file too.

I tried once more. What I've done:

1. I deleted the standout jar file.

2. I clean the project

3. I added standout project by FixSetup.

4. Clean the project again.

5. Ran it

Again the app crushed and same errors appear in logcat.

I'm using pingpongboss-StandOut-1ee77f1.zip

ADDITIONAL INFO:

With above way, when installing the app I get on eclipse' s console the error: StandOut] Could not find StandOut.apk!

And I haven't any reference for Standout in libs, Android Dependencies or Android Private libraries folders.

I've also checked standout project in "Order and Export".

EDIT

I solved it, at least for the StandoutExample. I didn't try my example app yet.

Seems that will need to do 2 things(instead of all other combinations I tried):

1. Add the StandOut project as explained here on Referencing a library project

http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject

2. And then use FixProject setup on the "import wei.mark.standout.StandOutWindow;"
[Android Apps and Games] vandercong:
Catch event close notification in StandOutWindow android?

I am using StandOutWindow library. In my Setting screen,I have a switch (turn on/off). If I turn on switch, a popup and a notification are displayed. When I turn off switch, popup isn't display. I wanna, when I click on notification, popup is hidden and switch has "OFF" status. Now,I only do popup is hidden. Switch also has "ON" status. How to I can turn off switch. I tried write code in getPersistentNotificationIntent but can not. Here is my code:
[Android Apps and Games] wutk3ksHD:
Got a strange bug. I got a VideoView in a ViewPager. As i swipe out the VideoView, it still gets drawn outside the window. Any idea to fix this?
[Android Apps and Games] Find791:
Waaaw ! Awesome !!!! I was seeking after that since a while !

Thank you PingPongBoss !!!

I am not a developper, but I would like to know if it exists a way to paste a sort of link of the shortcut in the examplefloatingwindows, to run the app in small windows ?

Example:

If I want to run Youtube, I simply copy and paste the link (where is Youtube located on my device) in the floating app example. Same for Firefox, SlideSMS etc...

Thank you Sir !!!
[Android Apps and Games] willowpc:
Awesome, thanks for this app, keep with the good job !
[Android Apps and Games] EatHeat:
Has anyone been able to catch back keyevent with this? I can't catch it no matter what I do. But Facebook chathead can respond to back keyevent. Anyone has any idea about this?
[Android Apps and Games] kalpesh Lakhani:
Implement Movable and Clickable Floating View

Hello [MENTION=2484344]pingpongboss[/MENTION],

you did an awesome job really. super library it is.

Btw i have one question for implemeting SimpeWindow class of your library. it is working file but what i want is user can move the view and also can click on that view. if i used it as clickable (implement onclicklistener on view) then it is going to be freezed and i cant moved it. so movable and clickable both possile in one floating view. Thanks a ton
[Android Apps and Games] EatHeat:
Check your flags. Add FLAG_BODY_MOVE_ENABLE to make it movable.

[MENTION=2484344]pingpongboss[/MENTION] Is it possible to add a view from outside the createAndAttachView? Since I have to use the framelayout of createAndAttachView, I'm not sure how to add a view from outside of it.
[Android Apps and Games] Dun74:
Hi everybody,

I tried to use the lib in my project to show a Floating WebView on local assets,

I've got an error saying :

04-30 18:32:21.335: W/System.err(4721): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
04-30 18:32:21.335: W/System.err(4721):	at android.app.ContextImpl.startActivity(ContextImpl.java:1034)
04-30 18:32:21.345: W/System.err(4721):	at android.app.ContextImpl.startActivity(ContextImpl.java:1021)
04-30 18:32:21.345: W/System.err(4721):	at android.content.ContextWrapper.startActivity(ContextWrapper.java:311)
04-30 18:32:21.345: W/System.err(4721):	at com.android.webview.chromium.WebViewContentsClientAdapter$NullWebViewClient.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:196)
04-30 18:32:21.355: W/System.err(4721):	at com.android.webview.chromium.WebViewContentsClientAdapter.shouldOverrideUrlLoading(WebViewContentsClientAdapter.java:293)
04-30 18:32:21.355: W/System.err(4721):	at com.android.org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(AwContentsClientBridge.java:96)
04-30 18:32:21.355: W/System.err(4721):	at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
04-30 18:32:21.365: W/System.err(4721):	at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
04-30 18:32:21.365: W/System.err(4721):	at android.os.Handler.dispatchMessage(Handler.java:102)
04-30 18:32:21.365: W/System.err(4721):	at android.os.Looper.loop(Looper.java:136)
04-30 18:32:21.365: W/System.err(4721):	at android.app.ActivityThread.main(ActivityThread.java:5017)
04-30 18:32:21.395: D/dalvikvm(4721): GC_FOR_ALLOC freed 103K, 2% free 11993K/12124K, paused 22ms, total 23ms
04-30 18:32:21.395: W/System.err(4721):	at java.lang.reflect.Method.invokeNative(Native Method)
04-30 18:32:21.395: W/System.err(4721):	at java.lang.reflect.Method.invoke(Method.java:515)
04-30 18:32:21.395: W/System.err(4721):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
04-30 18:32:21.395: W/System.err(4721):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
04-30 18:32:21.395: W/System.err(4721):	at dalvik.system.NativeStart.main(Native Method)

I saw that other developer managed to use a webview, but didn't found anything on the thead.

I am doing something wrong ?

Thanks for your help !

Dun
[Android Apps and Games] Dun74:
Sorry !! my fault, it was a problem with the webview initialization. It works very well now.

Great lib !!!
[Android Apps and Games] WisdomSky:
Good day Sir!

First of all, I want to thank yoi sir [MENTION=2484344]pingpongboss[/MENTION] for this rockingly awesome library because of its ease of integration to my projects... I was able to intrage it to my whole project in just less than 5 minutes... :D

Now my question is, how can we get a reference to the views inside the window decorations? I know its there somewhere, I just can't find it or dont know how to find it...
[Android Apps and Games] brandall:
Window Freezes

Hi [MENTION=2484344]pingpongboss[/MENTION] I hope you're cool

I'm getting an error on some devices when the window title bar is pressed:

It's causing the window to freeze on the display and it can't be dismissed.

Any ideas of how to fix this?
[Android Apps and Games] AntoineLyon:
Standout window and GoogleMap Fragments ?

Hi,

First thanks a lot for your work !

I've published a little Ingress helper app that uses standout lib, it's a real plus for the usage I needed : Ingress Target Ap

I'm now working on a new project but I face a little problem.

I'd like to use Google Maps V2 API and pop a window with a little map over other apps. But V2 requires the usage of fragments.

Any way or a clue to use such a fragment in a standout window ?

Thanks a lot.
[Android Apps and Games] ZuzooVn:
How can i insert my old activity to StandOut?:good::good:
[Android Apps and Games] baldestgeek:
show/hide from another activity

Can I hide/show a window from the activity that opened it?

I have this in my onCreate:

// show a VideoWindow

StandOutWindow.show(this, VideoWindow.class, VIDEO_WINDOW_ID);

// show a GLWindow

StandOutWindow.show(this, GLWindow.class, GL_WINDOW_ID);

setContentView(R.layout.activity_main);

mSpinner = (Spinner) findViewById(R.id.windowIDspinner);

//finish();

I commented out the Finish so the activity still runs.

Then i have 2 buttons and a spinner to select which window to hide:

Here is the show button click listener:

int currentId = Integer.parseInt(mSpinner.getSelectedItem().toString());

switch (currentId) {

case 1:

StandOutWindow.show(this, VideoWindow.class, VIDEO_WINDOW_ID);

break;

case 2:

StandOutWindow.show(this, GLWindow.class, GL_WINDOW_ID);

break;

default:

break;

}

The hide listener is the same, just calls hide instead. Every time I call hide the following exception is thrown:

01-02 16:14:07.270: E/AndroidRuntime(1424): java.lang.RuntimeException: Unable to start service aero.panasonic.example.VideoWindow@42463d40 with Intent { act=RESTORE dat=standout://class aero.panasonic.example.VideoWindow/0 cmp=aero.panasonic.example/.VideoWindow (has extras) }: java.lang.IllegalStateException: Tried to show(0) a window that is already shown.

Am I missing something?
[Android Apps and Games] Van tropf:
remember simpleWindow position

Hi i am trying to show and hide window in the same place

[MENTION=439709]override[/MENTION]

public boolean onClose(int id, Window window) {

int[] location = new int[2];

window.getLocationOnScreen(location);

SharedPreferences pref = PreferenceManager

.getDefaultSharedPreferences(this);

Editor editor = pref.edit();

editor.putInt(SettingsActivity.QUICK_BUTTON_POSITION_X, location[0]);

editor.putInt(SettingsActivity.QUICK_BUTTON_POSITION_Y, location[1]);

editor.commit();

return false;

};

// the window will be centered

[MENTION=439709]override[/MENTION]

public StandOutLayoutParams getParams(int id, Window window) {

SharedPreferences pref = PreferenceManager

.getDefaultSharedPreferences(this);

int posx = pref.getInt(SettingsActivity.QUICK_BUTTON_POSITION_X,

StandOutLayoutParams.CENTER);

int posy = pref.getInt(SettingsActivity.QUICK_BUTTON_POSITION_Y,

StandOutLayoutParams.CENTER);

return new StandOutLayoutParams(id, 200, 200, posx, posy);

}

but right now my window is displayed a little bit lower than previously,

if i do it multiple times my window tend to go to bottom of the screen.
[Android Apps and Games] SynnyG:
There is a flag to remove, I don't remember the exact name with it's with "blabla.ON.TOP.blabla"
[Android Apps and Games] tim687:
Hello everyone,

StandOutWindows is a great library to use, and provides many features.

However i've discovered one function that doesn't work as it is supposed to work.

that is the getWindow(id) call.

When I call that, the output will always be NULL.

I even tried to get the window using the code that the getWindow(id) uses, and the output is still null.

Can anybody fix this? :D

Or tell me how to use it (i don't think that's the case because i've tried all of the code that mark used in his example apps, and the output is still null.)

Thanks in advance!!

PS: the development of my app is now holding because of this bug, so the priority for a solution is a bit higher than normalm :o
[Android Apps and Games] tim687:
Is this working in your app?

If i call getWindow(id) it always returns null :(
[Android Apps and Games] hotspot_volcano:
Hi I'm new to standout I appear to have problems sending data from an activity to standout window. I don't seem to understand how to get the ids (TO ID I'm guessing, and FROM ID). as a result i am getting a Null exception.

at wei.mark.standout.StandOutWindow.getSendDataIntent(StandOutWindow.java:323)

> return new Intent(context, toCls).putExtra("id", toId)

at wei.mark.standout.StandOutWindow.sendData(StandOutWindow.java:208)

> context.startService(getSendDataIntent(context, toCls, toId,requestCode, data, fromCls, fromId));

There was an earlier post earlier on but that did not mention about the IDS. From what i can tell the FROM_ID is not important only the TO_ID is important. Sending data from Stand to standout still appears to work with this implantation.

My Class

public class DisplayImageActivity extends Activity {

public static final int DATA_CHANGED_TEXT = 0;
public static final String ACTION_SEND_DATA = "SEND_DATA";

StandOutWindow STANDOUTWINDOW =new StandOutWindow() {

@Override
public StandOutLayoutParams getParams(int id, Window window) {
// TODO Auto-generated method stub
return null;
}

@Override
public String getAppName() {
// TODO Auto-generated method stub
return null;
}

@Override
public int getAppIcon() {
// TODO Auto-generated method stub
return 0;
}

@Override
public void createAndAttachView(int id, FrameLayout frame) {
// TODO Auto-generated method stub

}
};

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_grid);

STANDOUTWINDOW.closeAll(DisplayImageActivity.this, WidgetsWindow.class);
STANDOUTWINDOW.show(DisplayImageActivity.this, WidgetsWindow.class,StandOutWindow.DEFAULT_ID);

STANDOUTWINDOW.closeAll(DisplayImageActivity.this, MultiWindow.class);
STANDOUTWINDOW.show(DisplayImageActivity.this, MultiWindow.class,StandOutWindow.DEFAULT_ID);

}

public void sendDataTest(){

changedText = "THIS TEXT WILL BE SENT";

// update MultiWindow:0 when button is pressed
// to show off the data sending framework
Bundle data = new Bundle();
data.putString("changedText", changedText);
STANDOUTWINDOW.sendData(0, MultiWindow.class, 0, DATA_CHANGED_TEXT, data); //JUST used 0 for IDS as im not sure how to get them

}

}
[Android Apps and Games] tim687:
You have 2 windows with the id 0, you need to change StandOutWindow.DEFAULT_ID to 0 and 1.

Then try again with the right id
[Android Apps and Games] hotspot_volcano:
I did that and did not work.. so I scrapped the classes thing and just used the longer SendData function (with some sample code i found on this thread.)

StandOutWindow.sendData(getApplicationContext(), MultiWindow.class, StandOutWindow.DISREGARD_ID, DATA_CHANGED_TEXT, data, null, 0);

Now it runs but toast message says sent to MultiWindow But it cannot find id -2.

For a jolly i will set the ID to -2: or 2 and see if it works.

EDIT NO IDEA IF THE ABOVE WORKED BUT the following worked

StandOutWindow.closeAll(DisplayImageActivity.this, WidgetsWindow.class);
StandOutWindow.show(DisplayImageActivity.this, WidgetsWindow.class,StandOutWindow.DISREGARD_ID);

StandOutWindow.closeAll(DisplayImageActivity.this, MultiWindow.class);
StandOutWindow.show(DisplayImageActivity.this, MultiWindow.class,StandOutWindow.DISREGARD_ID);

StandOutWindow.sendData(getApplicationContext(), MultiWindow.class, StandOutWindow.DISREGARD_ID, DATA_CHANGED_TEXT, data, null, 0);

Ok, my next question is how do manage standout with rotating orientations, i currently have to lock to portrait to stop the windows vanishing.

Also the onResume event causes it to go funny as it seems that starting a new sevice (widget window) and going back to the main activity will hit another resume loop. :silly:
[Android Apps and Games] tim687:
How do I use the TranslateAnimation on a StandOut window?

I got it right, but in the end it flickers :(
[Android Apps and Games] niksi.ile:
hey, I was really looking for floating app for making notes while reading pdfs. Then I found tiny apps: floating paint aka cPaint, now there is only one small thing what is bothering me.. the background is black or transparent from black and that is really annoying when pdfs are white, is there any simple way to change the background to white? I was wondering it would be possible with changing the code a little...
[Android Apps and Games] Equal1zer:
Find this line in StandOutWindow.java under the package wei.mark.standout:

StandOutLayoutParams.FLAG_NOT_TOUCH_MODAL
| StandOutLayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
PixelFormat.TRANSLUCENT);

Change to:

StandOutLayoutParams.FLAG_NOT_TOUCH_MODAL
| StandOutLayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
PixelFormat.OPAQUE);

Also check this link for other constants if you need and / or interested.

EDIT: That was not the thing you were asking for I'm sorry It was a long night :)

Changing the background color to #ffffff from your layout xml should be fine. Didn't it work out for you?
[Android Apps and Games] mehuljoisar:
Standout library with ProGuard

Hello,

First of all, thanks a lot for creating a beautiful library and making it open-source as well. I would be very thankful to you if you can add some information about using the library with ProGuard.

Thanks,

Mehul Joisar.
[Android Apps and Games] jonneymendoza:
great lib but can u include it as a gradle aar file that is deployed in maven central?
[Android Apps and Games] levuphuong:
Hi thanks author

i have new app use your libs.

https://play.google.com/store/apps/details?id=com.lvp.compass

Please add it to first post :)
[Android Apps and Games] wutk3ksHD:
I developed a new Version of my floating apps. Every one interested in becoming an Alpha tester is welcomed to join the community: link
[Android Apps and Games] Ironsteel:
Hi, great library. Is there a specific reason to why this isn't on maven central? Also, why doesn't someone update the readme with some documentation. I understand the OP must be busy, but if anyone wants to do it, I'll be happy to give a helping hand.

The library provides great sample as well.

Thanks, PinPongBoss.

---------- Post added at 07:03 PM ---------- Previous post was at 06:57 PM ----------

Hi! Could you give an overview of what it's about? I'll be glad to join.

Also, is this an Open-source project?
[Android Apps and Games] wutk3ksHD:
i just finisehd my app. You can check it out here: http://xdaforums.com/showthread.php?t=2991248
[Android Apps and Games] Ironsteel:
Just downloaded. Very impressive. A very good utility app. I'll write down a more detailed reply on the link thread in a day or two, after using a little.

Also, I just made an app using this library, if you'd like to check it out, here it is -

http://xdaforums.com/android/apps-games/app-call-utils-floating-notes-calls-t2993385

I'd appreciate some feedback (it's my first app)