Przemek Boryka

Ranch Hand
+ Follow
since Dec 06, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Przemek Boryka

Hi !

In my opinion, You can have as many asynctask as you want, its becous of one fact:
AsyncTask allows you to perform asynchronous work on your user interface. It performs the blocking operations in a worker thread and then publishes the results on the UI thread, without requiring you to handle threads and/or handlers yourself.

The second fact is :
When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. Starting with HONEYCOMB, tasks are executed on a single thread to avoid common application errors caused by parallel execution. ;)

I have a little experience with AsyncTask, so my answer for your question can be wrong.

Bye Sorry for my english !
12 years ago
Hi !

Maybe problem is in variable "counter," that has value equal 20. Your "coursor" has 20 elements counted from 0 - 19 .. so .. if you try to get element with index 20 you have exception.

Bye !
12 years ago
Hi!

You can try do that in loop:


Bye !
12 years ago
Hi again !

You can try to use:



But this is strongly not recommended

Bye!
12 years ago
Hi !

Try with this :



This part of code, will start "MainActivity" and set it on the first place on the stack. I used this code in boot up receiver to automatic launch app.

Bye, I hope this will help you
12 years ago
Hi!

Have you been trying with this -> WiFi Android. There is many useful information about connecting via WiFi

Bye.. sorry for my english :/
12 years ago
Hi

Has anyone tried to create software to communicate with scanner under Android? I know there is a SANE project but I dont know how to use it.
Do I need to use NDK and native libraries to communicate with scanner ? I need HELP. Sorry for my english :/

Bye !
Przemek :/
12 years ago
Hi !

I solved the problem, as I thought, it was wrong type of launch mode, currently is:



I think we can close this thread
12 years ago
Hi !

My application must start on bootup android device. Everything is ok, app start works perfectly, but there is a little problem, when user tap the home button. It move the programme to work in background, currently when I want to bring it up to the front - just simple I need to tap the app icon. Everything is ok when I launch programme from loaded android, but when the app is launched after bootup sequence, android create new instance of application - this behaviour is not acceptable. In that case I have two instances of programme! :/

How to launch my programme, in order to prevent of that situation described above?

Maybe the problem is in AndroidManifest - wrong launch type ?

That is my bootup starter:



Thanks of any advice. Sorry for my english :|
12 years ago
hi

Try to create your own protocol for example let the data size is 1024 bytes (so your buffer will be : 1024 bytes data size + packet header). Divide your file to packet size and sent them progressively.

Simple communication between 2 devices
ANDROID OTHER DEVICE
<----- REQUEST FILE

SEND INFO ABOUT FILE ---->

-------------------------------------------------------------------- do in loop
<----- REQUEST FIRS AND NEXT PACKETS

SEND FIRST PACKET AND NEXT PACKETS --->

<---- CONFIRM RECEIVE PACKET

PREPARE NEXT PACKET
-------------------------------------------------------------------- end loop


I will resolve very similar problem in my project. I need to send JPG to other none Android device (without operation system), but I have already have implemented our communication protocol, so I think it will be easy to do it for me . The device for the other side is equipment in Bluetooth module and it works on Atmel processor. ;)

Regards Przemek
12 years ago
Hi !

The SurfaceView is faster then View, but slower then the OpenGL library . Take a look at this :

2D Graphics Android

then look at this --> OpenGL

And answer yourself on your question

Bye. Greetings from Poland
12 years ago
Hi !

Try with BitmapFactory object, he has many methods that help create bitmap.


This should help resolve your problem.

Bye
12 years ago
Hi

Date and Calendar are different class that provide different methods in each other. Better to you, will be using GregorianCalendar class, the class is not abstract like Calendar class, but is a subclass of Calendar.



GregorianCalendar object has many different methods to manipulate the date, time. You can format the myCalendar object in the same style as Date object, by SimpleDateFormat object.

Try to make in pure Java, a few examples, using GregorianCalendar class.

Bye. Sorry for my english, I'm still learning.
12 years ago
Hi!

Take look at this:



Maybe it will help you, solve your problem ;)
12 years ago
Uuu, I see that you have large gaps of Java programming, it would be better for you, if you will start to learn Java (Standard Edition) from begin. You should register at http://knowledgeblackbelt.com/ and try do gain at least orange belt in Java programming, I can recommend you good book to gain more knowledge and experience in programing: Thinking in Java, it is realy good book.

When you'll be more experienced in Java programming then you may start having fun with Android programming. Of course, you can try only in Android but as you can see, you have large gaps in knowledge. So, dont give up, and start learning Java NOW. ;)



Bye
12 years ago