get an image from mysql in a pc

by Neri Martinez » Fri, 20 May 2011 09:30:37 GMT

Sponsored Links

this proyect has 2 parts:

1) in a pc is a mysql server running. I wanna do a program that save an
image into mysql (i read that i have to use blob fields)
2) from my android device, i want to get that image from mysql (that was
uploaded by the program in the pc)

another question: is php the only way to connect and android device to mysql
server running in a pc via WIFI?

thanks !

Neri M. Martinez
Ingeniero en Sistemas de Computacin


Other Threads

1. Bluetooth Conenction Problem


        I developed a bluetooth client android application on Htc Hero
and developed on windows a bluetooth server application. Server
application make SDP successfully and i can connect from android
application to it, but establishing connection not very easy,
sometimes it connects to bluetooth server with one attempt, sometimes
after making 4 or 5 attempts and occasionally i lost connection after
established a connection. What is reason of that, it is a problem of
android or htc hero? Because with J2me application i connect to server
easily and connection continue a long time .


2. Setup Multiple Alarms

Hi there,

I have some problems when I try to setup an alarm. I am using the
AlarmManager to set an alarm. This alarm is picked up by my Receiver
that creates a notification.

My first problem: When I setup two alarms, my notification thats init
by the alarm event always shows me the first input parameter. Whats
going wrong?

My second problem: I read that I should use an id for the notification
to cancel it, when its submitted. What is the best way to create
different ids? I just used javas math. Although the ids are not equals
in my tests, it is not really a good solution. Any ideas?

Here is my code. Although the titleString is not the same like in the
first init (my Log entry in initializeAlarm() shows that the first
input not equals a second input) the onReceive method tells me that
todoTitle is always the same.

        private void initializeAlarm(String titleString, String alarmString){
                if(alarmString != null && alarmString.length() == 16){
                Intent intent = new Intent(this, AlarmReceiver.class);
                intent.putExtra("todoTitle", titleString);
                PendingIntent sender = PendingIntent.getBroadcast(this, 0,
intent, 0);

                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 
                Date date = new Date();
                try {
                        date = sdf.parse(alarmString);
                        } catch (ParseException e) {
                        Calendar cal = Calendar.getInstance();

                // Schedule the alarm!
                AlarmManager am =
                am.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),


public class AlarmReceiver extends BroadcastReceiver {

        public void onReceive(Context context, Intent intent) {
                int notification_id = 
                final Bundle extras = intent.getExtras();
                String tickerText = extras.getString("todoTitle");

                NotificationManager mNotificationManager = (NotificationManager)
                Notification notification = new Notification(R.drawable.icon, 
News", System.currentTimeMillis());

                Intent activityIntent = new Intent(context, 
                activityIntent.putExtra("notificationId", notification_id);

                PendingIntent startIntent = PendingIntent.getActivity(context, 
activityIntent, 0);

                notification.setLatestEventInfo(context, "Todo ansehen", 
                notification.vibrate = new long[]{100,250};

                mNotificationManager.notify(notification_id, notification);


Thanks for any ideas!


3. Browser Source code

4. Popping up Toast (or something like it) from a thread

5. How to prevent auto whitespace trimming in TextView?

6. Cannot use explicit intents to call another application?

7. Game math/logic calulating movement