[codenameone-discussions] Re: How to set a timer to the "LocationListener"

2019-01-04 Thread Shai Almog
Hi,
This is how you do it:

 LocationManager.getLocationManager().setLocationListener(myListener, 
new LocationRequest(LocationRequest.PRIORITY_MEDIUM_ACCUARCY, 15 * 6000));

myListener is an implementation of the LocationListener callback interface.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/45aa3848-e60d-481f-964c-b865f4ea4431%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: desktop.fullScreen = true in combination with BrowserComponent not working on 1920 x 1080

2019-01-04 Thread Shai Almog
Yes. Did you file the issue?

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/978add92-39ae-4b2e-b796-1e91ccd59a57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: desktop.fullScreen = true in combination with BrowserComponent not working on 1920 x 1080

2019-01-04 Thread Shai Almog
FYI issue tracker is here: 
http://github.com/codenameone/CodenameOne/issues/new

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/4717680b-2394-435b-be2e-8baf1817499f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: EasyThread Bug?

2019-01-04 Thread Shai Almog
For future reference when I say next update I usually mean Friday. I should 
have explicitly specified it.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/66fda445-4911-4a1a-b9f2-c91804877f75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Local links in html

2019-01-04 Thread Shai Almog
Yes, there is no base URL. This should work with the update from yesterday, 
make sure to update project libs.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/0064df1d-d8ba-4d80-bc6b-537c320766e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] How to set a timer to the "LocationListener"

2019-01-04 Thread rdvg1962
Hi,

I have read other posts on this topic but I do not see a clear solution. 
How do I set a time of 15 minutes (for example) to separate each reading of 
the gps ?.

As an alternative I thought about using the UITimer api and using the 
"Location" (Location position = LocationManager.getLocationManager (). 
GetCurrentLocationSync ();) But I do not know if this works or can run in 
the background.

My Code

class Localizacion implements LocationListener, Runnable {

private boolean inactivo = false; 
private int status;
private long sesion;
private Location loc2;
private boolean primeraVez = true;

public Localizacion(long sesion) {
super();
this.sesion = sesion;
}

public void inactivaRastreo() {
this.inactivo = true;
}

public void activaRastreo() {
this.inactivo = false;
}

public void locationUpdated(Location loc) {
while (!inactivo) {
if (primeraVez) {
loc2 = loc;
primeraVez = false;
}
adicionTransaccion(loc, loc2, sesion);
loc2 = loc;
}
}

@Override
public void providerStateChanged(int newState) {
// check for unavailable errors etc.
status = newState;
}

public void run() {
while (!inactivo) {
try {
Thread.sleep(1); // Después de cumplir este tiempo 
se envia el error
} catch (InterruptedException err) {
Dialog.show("Error", "No se pudo ejecutar la lectura 
del GPS", "Continuar", null);
inactivo = true;
}
}
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/6030aefd-8e68-463b-bc3d-ce1ef0a96dc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: desktop.fullScreen = true in combination with BrowserComponent not working on 1920 x 1080

2019-01-04 Thread remonkroep
Does this mean when using "Send Windows Desktop Build" in NetBeans it 
should build using the fix you did on the server right now? If so, it is 
not fixed since I still see the issue when running the Windows Desktop 
Build.

On Saturday, December 15, 2018 at 12:36:31 AM UTC-5, Shai Almog wrote:
>
> The fix is in the server. We deliver updates to the libraries weekly 
> without changing the plugin.
>
> I suggest filing an issue as most of us are on Christmas vacation now and 
> it will take a while to fix this.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/c60be392-6681-4d78-a612-0f9028ba2e6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: EasyThread Bug?

2019-01-04 Thread remonkroep
Since I didn't see a comment from you here saying that is was fixed I 
assumed it was not.

Thank you.

On Thursday, January 3, 2019 at 10:37:29 PM UTC-5, Shai Almog wrote:
>
> This was fixed ages ago. I just tried the test case on the simulator and 
> it worked for me.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/fbbe4b61-3003-4942-a5b4-7cc88d089c69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: addMaterialCommandToOverflowMenu and ToastBar

2019-01-04 Thread shop . service . assistant
Thanks.

On Thursday, January 3, 2019 at 10:34:10 PM UTC-5, Shai Almog wrote:
>
> Yes but you show it like this:
>
> ToastBar.showMessage("Test ToastBar On addCommandToRightBar.", 
> FontImage.MATERIAL_SAVE, 4000);
>
> You might need to wrap it in a callSerially when used in an overflow menu 
> since that menu is a dialog:
>
> callSerailly(() -> ToastBar.showMessage("Test ToastBar On 
> addCommandToRightBar.", FontImage.MATERIAL_SAVE, 4000));
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/00552826-20f9-43f1-896f-5b705daafde7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: Local links in html

2019-01-04 Thread Gareth Murfin
Actually thats a good point, I couldnt get it to load properly, so I had to 
pass html as a string, that could be the issue?

InputStream in;
try 
{
in = 
FileSystemStorage.getInstance().openInputStream(FileSystemStorage.getInstance().getAppHomePath()+path);
String html = Util.readToString(in);
_("html loaded is ->");
_("\n"+html);
//fire up the html in middle 
browser.setPage(html, 
FileSystemStorage.getInstance().getAppHomePath()); 
form.add(BorderLayout.CENTER, browser); 
   
Button back = new Button("Back"); 
back.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent evt) {
   _("back hit z");
   createMainForm();//show main form again
}
});
form.add(BorderLayout.SOUTH, back); 
form.show();
} catch (IOException ex) {
//Logger.getLogger(Outlier.class.getName()).log(Level.SEVERE, 
null, ex);
_("WARNING! error loading html "+ex.getMessage());
ToastBar.showErrorMessage("can't find "+path);
}   

On Friday, January 4, 2019 at 11:31:17 AM UTC+8, Shai Almog wrote:
>
> I just tried a simple test case and it worked for me. It's possible that 
> this is due to a fix we made to file: URL handling. How do you load the 
> initial file URL?
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/6415148d-57fa-4196-935e-afe7f759cbca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.