get an image from mysql in a pc

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


Sponsored Links
 hi,

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

Hi,

        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 
HH:mm");
                Date date = new Date();
                try {
                        date = sdf.parse(alarmString);
                        } catch (ParseException e) {
                                e.printStackTrace();
                        }
                        Calendar cal = Calendar.getInstance();
                        cal.setTime(date);

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

                Log.v("test",intent.getStringExtra("todoTitle"));
                }
        }


public class AlarmReceiver extends BroadcastReceiver {

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

                NotificationManager mNotificationManager = (NotificationManager)
context.getSystemService(Context.NOTIFICATION_SERVICE);
                Notification notification = new Notification(R.drawable.icon, 
"Todo
News", System.currentTimeMillis());

                Intent activityIntent = new Intent(context, 
ToDosActivity.class);
                activityIntent.putExtra("notificationId", notification_id);
                activityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

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

                notification.setLatestEventInfo(context, "Todo ansehen", 
tickerText,
startIntent);
                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