Create a log screen with a dialog!

by nep0x » Tue, 23 Feb 2010 20:12:16 GMT


Sponsored Links
 hi people!

I m developing an app and a i have a little doubt. It is the
following:

My app first activity is very simple. it shows two buttons: ENTER  &
EXIT. When the user press the button ENTER the app displays a dialog
where the user have to log. I want that the app access to an external
database to check the user and the password. Once it is checked the
app starts the next activity. This is the idea.
I ve implemented the access to a an external database by a web service
(REST).

I ve done access to the database and display the result in an activity
with the well-known process of expanding another thead, create a
handler and execute runneable object.But in this case where must i
put the startActivity to start the next activity is the user exits? in
the handler? any advice?

thanks in advance

nep0x

--



Other Threads

1. Slow AES Decryption

Hello developers,

I tried to decrypt a 4.2 MB .dcf file using AES 128 bit key, but it took 33
seconds to decrypt (on function cipher.doFinal(data)), is it normal ?

Here is a code snippet:

   long start = System.currentTimeMillis()/1000L;


try {

   SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");

   Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");

   cipher.init(Cipher.DECRYPT_MODE, skeySpec, ivspec);


    android.util.Log.d("TEST", "Start decoding...." +
String.valueOf(length));



    byte[] decrypted = cipher.doFinal(content);



    File file2 = newFile(Environment.getExternalStorageDirectory().getPath() +
"/test.mp3");

    OutputStream os = new FileOutputStream(file2);

   os.write(decrypted);

} catch (Exception ex) {

  ex.printStackTrace();

}


long end = System.currentTimeMillis()/1000L;



android.util.Log.d("TEST","Time "+ String.valueOf(end-start));


Thanx in advance..


-- 
Kind Regards

- Lorensius W. L. T -
- http://www.londatiga.net -

-- 

2. MediaPlayer StreamVideo question.

Hello Group,

First question is. is it better to store the apps video as a resource on the 
phone? If yes, what format would you recommend. Or, would it be better to 
store the videos on a web server and stream the videos to the app when 
requested.

My app is going to have lots of video's eventually. I am thinking around 
10min each. Let's say for now 5 videos. But, will be more down the road. 
They are intro videos for my application for each objective type thing.

Now, if it is better to store them on the cloud/interwebs, how do you do 
streaming video with the MediaPlayer class. Do you have to store Temp files 
while it buffers or does it just stream? Also, if it does store temp files, 
where should I store them?

Some how my instinct is telling me, put files on a server and cache the 
buffer vids. 


Either way, where are good tutorials on doing anyone of these solutions. I 
already have the MediaPlayer class in my app and it works for playing local 
stuff. I just have to make it work for streaming vids.

Thanks group.

-- 

3. Custom Keyboard for an App

4. Questions about Custom (Compound) control

5. Using serial port to send out String on Android

6. Google Nexus S - Please provide as DEV phone, asap :-)

7. Listview with different types?