[android-developers] Regarding device identfier blog : Android Serial number

2016-02-02 Thread Asif k
Hi All,

I was going through the recent developer blog at 
http://android-developers.blogspot.in/2016/02/marshmallow-and-user-data.html. 
Consequently, I have also checked best practices for device identifier at 
http://developer.android.com/training/articles/user-data-ids.html?utm_campaign=android_discussion_marshmallow_020116_source=anddev_medium=blog.

My observation from above references is that android.os.Build.SerialNumber 
is not referred for any scenario within Best practices. In android, *Serial 
Number seems to be unique per device and even remain persistent after 
factory reset*.  If we recall a blog few years down  ( 
http://android-developers.blogspot.in/2011/03/identifying-app-installations.html
 
), it is mentioned that Serial Number can be used as unique hardware 
identifier for non telephony devices.

Any specific reason for not including the Serial Number in the latest 
guidelines?


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/fe783da8-6af9-41ad-8dbc-6548583bdd29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Not able to query social stream items (updates) for User Profile (Me profile)

2012-07-12 Thread Asif k
I'm writing an social networking app on Android (for ICS). I haven't found 
any content uri for user profile stream items like there are for both 
``Contacts`` and ``RawContacts``. 

I'm able to **write** social stream for user profile into streamItems table 
with its raw_contactd, but using the same concept to query for stream items 
in two different ways, both failed with the Exception I've shown below. 
Please note that I'm able to query stream items for other contacts this way.

1). 

profileCursor= getContext().getContentResolver().query(
Profile.CONTENT_RAW_CONTACTS_URI.buildUpon()
   .appendPath(rawContactId)
   
.appendPath(RawContacts.StreamItems.CONTENT_DIRECTORY).build(),
null, null, null, null);

2) Query to streamitem uri with 

rawcontactid = profileRawContactId

Exception as follows:

V/ContactsProvider(19514): ContactsProvider.query: 
url=content://com.android.contacts/profile/raw_contacts/9223372034707292179/stream_items,
 
match is -1
E/DatabaseUtils(19514): Writing exception to parcel
E/DatabaseUtils(19514): java.lang.IllegalArgumentException: URI: 
content://com.android.contacts/profile/raw_contacts/9223372034707292179/stream_items,
 
calling user: com.xyz, calling package:com.xyz

Please help me with this.

Thanks,
Ask

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] GestureOverlayView hides its child views - android 4.0

2012-01-04 Thread Asif k
Hi All,

I am trying to implement gestures on a listview in android 4.0.3. This
list view is a part of ListFragment. I have defined gestureoverlayview
in the fragment's xml as follows,

LinearLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@+id/list_layout
android:orientation=horizontal
android:layout_width=match_parent
android:layout_height=match_parent
android:background=?attr/background 
android.gesture.GestureOverlayView
android:id=@+id/gestures
android:gestureStrokeType=multiple
android:eventsInterceptionEnabled=true
android:layout_width=match_parent
android:layout_height=match_parent
android:uncertainGestureColor=#
android:orientation=vertical
 android:layout_weight=1
 
  !--  Shown only when an Account filter is set.
  paddingTop should be here to show shade effect correctly. --
include
android:id=@+id/account_filter_header_container
layout=@layout/account_filter_header /
view
class=com.xyz.CustomListView
android:id=@android:id/list
android:layout_width=match_parent
android:layout_height=0dip
android:layout_marginLeft=?attr/list_padding_left
android:layout_marginRight=?attr/list_padding_right
android:fastScrollEnabled=true
android:fadingEdge=none /
  /android.gesture.GestureOverlayView
/LinearLayout

I have implemented ongesturePerformedListener to this List fragment.
But while running this application, ListView is not visible on the
screen (seems like it is hidden by GestureOverlayView) but I can
perform gestures on the screen.

Note : when I have replaced GestureOverlayView with simple
LinearLayout..list view turns visible on the screen.

I have tried playing with xml layout but could not find a way. Does it
because it is a part of a fragment layout?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] My application works over WiFi but fails over GPRS

2010-08-17 Thread Asif k
Hi all,

I am developing a social Networking application and it works fine over
WiFi but tried the same over GPRS it gives following Exception,

08-17 13:55:05.406: WARN/System.err(4233):
java.net.SocketTimeoutException: Socket is not connected
08-17 13:55:05.406: WARN/System.err(4233): at
org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocketImpl(Native
Method)
08-17 13:55:05.406: WARN/System.err(4233): at
org.apache.harmony.luni.platform.OSNetworkSystem.connectStreamWithTimeoutSocket(OSNetworkSystem.java:
131)
08-17 13:55:05.406: WARN/System.err(4233): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
247)
08-17 13:55:05.406: WARN/System.err(4233): at
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:
535)
08-17 13:55:05.406: WARN/System.err(4233): at
java.net.Socket.connect(Socket.java:1054)
08-17 13:55:05.406: WARN/System.err(4233): at
org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:
117)
08-17 13:55:05.413: WARN/System.err(4233): at
com.vodafone360.photos.service.transport.http.HttpConnectionThread.postHTTPRequest(HttpConnectionThread.java:
293)


what could be the reason?

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Clearing all the Task within an application while activity launch

2010-06-07 Thread Asif k
Hi all,

In my application, I have two activities with Launcher as a catagory
and added an icon to each of them. So I can launch my application from
any of this activity, thus there are two entry points to my
application.

Now, the task created by 1st activity is not killed when pressing the
home key and launching an application from 2nd activity.
So, just launching the 2nd activity and pressing the back button
brings the previous task on screen rather than coming back to home
screen.  clearTaskOnLaunch just clears the task by same activity.

Is there any way to clear all the tasks within the application?

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Clearing all the Task within an application while activity launch

2010-06-07 Thread Asif k
Hi all,

In my application, I have two activities with Launcher as a catagory
and added an icon to each of them. So I can launch my application from
any of this activity, thus there are two entry points to my
application.

Now, the task created by 1st activity is not killed when pressing the
home key and launching an application from 2nd activity.
So, just launching the 2nd activity and pressing the back button
brings the previous task on screen rather than coming back to home
screen.  clearTaskOnLaunch just clears the task by same activity.

Is there any way to clear all the tasks within the application?

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Clearing all the Task within an application while activity launch

2010-06-07 Thread Asif k
Hi TreKing,

Thanks for your reply.

I tried to set same taskaffinity for both the activity but application
failed to launch at that time.

So it didn't work. Any other idea?

Thanks,
Asif

On Jun 8, 5:26 am, TreKing treking...@gmail.com wrote:
 On Mon, Jun 7, 2010 at 9:19 AM, Asif k asifk1...@gmail.com wrote:
  Is there any way to clear all the tasks within the application?

 Try 
 this:http://developer.android.com/intl/de/guide/topics/manifest/activity-e...

 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] restarting the application

2010-03-29 Thread Asif k
Hi All,

  I have kept the title bar in my application. But I have also given
an option in the menu to invisible title bar. If someone clicks that
menu option then my application need to restart and clear all the
activities from the task.

  For time being, I had thrown an unhandled exception menually using
following code,
***
after clicking  no title bar option
String s = hello
char c = s.charAt(10); // this line throw the exection which is not
handled, so app. restarts

 Thus  application stopped dialog comes and after clicking  force
close button app. restarts and settings are applicable.

  But is there any android APIs availble which will restart the
application clearing all the activity on the task and moves back to
root activity.

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: How to run android application from super user(administrator) mode

2010-02-08 Thread Asif k
I got somewhere on the net following code, I tried to execute but it
throws broken pipe: IOException at

os.writeBytes(single + \n); line


Following is the code..

Process process = Runtime.getRuntime().exec(su); DataOutputStream?
os = new DataOutputStream?(process.getOutputStream());
DataInputStream? osRes = new DataInputStream?
(process.getInputStream()); for (String single : commands) {

os.writeBytes(single + \n); os.flush(); res.add(osRes.readLine());
} os.writeBytes(exit\n); os.flush(); process.waitFor();


Any idea..
Please help...
Asif

On Feb 4, 6:23 pm, Asif k asifk1...@gmail.com wrote:
 Is it possible to spawn a new process from the activity with su mode
 and then run the script??
 i had given the shell script as bellow but does not give fruitful
 output,

 stored in the device: /data/local/hello.sh
 #!/system/bin/sh
 (ifconfig wlan0 up)su
 exit

 and form Java code,

 Process process = Runtime.getRuntime.exec(/data/local/hello.sh);

 Can anyone please help me on this

 Thanks,
 Asif
 On Feb 4, 11:39 am, Asif k asifk1...@gmail.com wrote:



  Hi all,

     I am running a shell script stored in the device from android
  application by creating instance of Process class.
    But my script has commands which will be executed only in su mode.
  any idea how to accomplish this?

  Thanks,
  Asif- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Invoking Process from Application

2010-02-08 Thread Asif k
try with,

Process process = Runtime.getRuntime.exec(/sbin/ping);

Thanks,
asif

On Feb 9, 9:51 am, android beginner android.beginne...@gmail.com
wrote:
 Hi,

 We are migrating ncurses based application on our linux target platform into
 Android based ones.

 We have one application(parent) which runs ping process(child) and reads the
 output (through Pipe) and displays on the screen.

 I need to develop similar sort of application, but couldn't find Android
 API's to invoke processes (/sbin/ping). Can anyone share their views to
 accomplish this task?

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to run android application from super user(administrator) mode

2010-02-04 Thread Asif k
Is it possible to spawn a new process from the activity with su mode
and then run the script??
i had given the shell script as bellow but does not give fruitful
output,


stored in the device: /data/local/hello.sh
#!/system/bin/sh
(ifconfig wlan0 up)su
exit

and form Java code,

Process process = Runtime.getRuntime.exec(/data/local/hello.sh);

Can anyone please help me on this

Thanks,
Asif
On Feb 4, 11:39 am, Asif k asifk1...@gmail.com wrote:
 Hi all,

    I am running a shell script stored in the device from android
 application by creating instance of Process class.
   But my script has commands which will be executed only in su mode.
 any idea how to accomplish this?

 Thanks,
 Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] How to run android application from super user(administrator) mode

2010-02-03 Thread Asif k
Hi all,

   I am running a shell script stored in the device from android
application by creating instance of Process class.
  But my script has commands which will be executed only in su mode.
any idea how to accomplish this?

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: executing a shell script from Android application

2010-02-02 Thread Asif k
which permission??
Can you please elaborate on this?
In the logcat, I am not getting much specific information.

Thanks,
Asif

On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com
wrote:
 first thought that came to my mind is permission. ofcourse you can confirm
 that with logcat.

 On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote:
  Hi all,

   I am configuring wifi on my android based board using shell script.
  Now I want to execute the same script from android application. For
  that, I had used following code, but it didn't give any success till
  now,

  I had executed same script from adb shell prompt and it works
  nicely.

  Process exeCommands = Runtime.getRuntime().exec(/data/busybox/
  board_script.sh);

  is there anything else required than this???

  Please help..
  Asif

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: executing a shell script from Android application

2010-02-02 Thread Asif k
same script I kept in the ubuntu desktop file system and executed with
the normal java code and work nicely... with same APIs

In the android application with same APIs when executing same script
by putting it in /data/busybox/board_script.sh it does not work
and gives following log results..even log doesnt give proper
indication of security or permission problem..

01-01 07:20:36.386: INFO/ActivityManager(684): Starting activity:
Intent { flags=0x1000 comp={imats.wifi.script/
imats.wifi.script.WiFiScript} }
01-01 07:20:36.410: INFO/ActivityManager(684): Start proc
imats.wifi.script for activity imats.wifi.script/.WiFiScript:
pid=12665 uid=10015 gids={}
01-01 07:20:36.410: DEBUG/AndroidRuntime(12656): Shutting down VM
01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM waiting for
non-daemon threads to exit
01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM shutting VM
down
01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread shutting
down
01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread has shut
down
01-01 07:20:36.410: DEBUG/jdwp(12656): JDWP shutting down net...
01-01 07:20:36.410: DEBUG/jdwp(12656): Got wake-up signal, bailing out
of select
01-01 07:20:36.410: INFO/dalvikvm(12656): Debugger has detached;
object registry had 1 entries
01-01 07:20:36.410: DEBUG/dalvikvm(12656): VM cleaning up
01-01 07:20:36.417: DEBUG/dalvikvm(12656): LinearAlloc 0x0 used 639228
of 4194304 (15%)
01-01 07:20:36.449: INFO/jdwp(12665): received file descriptor 10 from
ADB
01-01 07:20:36.558: WARN/ResourceType(684): Failure getting entry for
0x7f020060 (t=1 e=96) in package 0: 0xffb5
01-01 07:20:36.847: INFO/ActivityManager(684): Displayed activity
imats.wifi.script/.WiFiScript: 464 ms
01-01 07:20:41.894: DEBUG/dalvikvm(7502): GC freed 49 objects / 1968
bytes in 43ms

Thanks,
Asif




On Feb 2, 3:33 pm, Asif k asifk1...@gmail.com wrote:
 which permission??
 Can you please elaborate on this?
 In the logcat, I am not getting much specific information.

 Thanks,
 Asif

 On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com
 wrote:

  first thought that came to my mind is permission. ofcourse you can confirm
  that with logcat.

  On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote:
   Hi all,

    I am configuring wifi on my android based board using shell script.
   Now I want to execute the same script from android application. For
   that, I had used following code, but it didn't give any success till
   now,

   I had executed same script from adb shell prompt and it works
   nicely.

   Process exeCommands = Runtime.getRuntime().exec(/data/busybox/
   board_script.sh);

   is there anything else required than this???

   Please help..
   Asif

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: executing a shell script from Android application

2010-02-02 Thread Asif k
Hi hotobjects,

  I am not using adb at all in my script. I know adb is used when u r
working from host computer. My script is just like as follows, and
even I am able to invoke that from the android shell through serial
connection.. I want the same to be invoked by my application.

script,

--
#!/system/bin/sh
ls -a
netcfg
iwconfig
---

Hope u got my point.

Thanks,
Asif



On Feb 2, 10:20 pm, jotobjects jotobje...@gmail.com wrote:
 My guess is that adb is a development tool and probably not present
 on the device or available on the emulator at runtime.

 On Feb 2, 5:35 am, Asif k asifk1...@gmail.com wrote:



  same script I kept in the ubuntu desktop file system and executed with
  the normal java code and work nicely... with same APIs

  In the android application with same APIs when executing same script
  by putting it in /data/busybox/board_script.sh it does not work
  and gives following log results..even log doesnt give proper
  indication of security or permission problem..

  01-01 07:20:36.386: INFO/ActivityManager(684): Starting activity:
  Intent { flags=0x1000 comp={imats.wifi.script/
  imats.wifi.script.WiFiScript} }
  01-01 07:20:36.410: INFO/ActivityManager(684): Start proc
  imats.wifi.script for activity imats.wifi.script/.WiFiScript:
  pid=12665 uid=10015 gids={}
  01-01 07:20:36.410: DEBUG/AndroidRuntime(12656): Shutting down VM
  01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM waiting for
  non-daemon threads to exit
  01-01 07:20:36.410: DEBUG/dalvikvm(12656): DestroyJavaVM shutting VM
  down
  01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread shutting
  down
  01-01 07:20:36.410: DEBUG/dalvikvm(12656): HeapWorker thread has shut
  down
  01-01 07:20:36.410: DEBUG/jdwp(12656): JDWP shutting down net...
  01-01 07:20:36.410: DEBUG/jdwp(12656): Got wake-up signal, bailing out
  of select
  01-01 07:20:36.410: INFO/dalvikvm(12656): Debugger has detached;
  object registry had 1 entries
  01-01 07:20:36.410: DEBUG/dalvikvm(12656): VM cleaning up
  01-01 07:20:36.417: DEBUG/dalvikvm(12656): LinearAlloc 0x0 used 639228
  of 4194304 (15%)
  01-01 07:20:36.449: INFO/jdwp(12665): received file descriptor 10 from
  ADB
  01-01 07:20:36.558: WARN/ResourceType(684): Failure getting entry for
  0x7f020060 (t=1 e=96) in package 0: 0xffb5
  01-01 07:20:36.847: INFO/ActivityManager(684): Displayed activity
  imats.wifi.script/.WiFiScript: 464 ms
  01-01 07:20:41.894: DEBUG/dalvikvm(7502): GC freed 49 objects / 1968
  bytes in 43ms

  Thanks,
  Asif

  On Feb 2, 3:33 pm, Asif k asifk1...@gmail.com wrote:

   which permission??
   Can you please elaborate on this?
   In the logcat, I am not getting much specific information.

   Thanks,
   Asif

   On Feb 2, 3:10 pm, android beginner android.beginne...@gmail.com
   wrote:

first thought that came to my mind is permission. ofcourse you can 
confirm
that with logcat.

On Tue, Feb 2, 2010 at 6:58 PM, Asif k asifk1...@gmail.com wrote:
 Hi all,

  I am configuring wifi on my android based board using shell script.
 Now I want to execute the same script from android application. For
 that, I had used following code, but it didn't give any success till
 now,

 I had executed same script from adb shell prompt and it works
 nicely.

 Process exeCommands = Runtime.getRuntime().exec(/data/busybox/
 board_script.sh);

 is there anything else required than this???

 Please help..
 Asif

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en- Hide quoted 
text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] executing a shell script from Android application

2010-02-01 Thread Asif k
Hi all,

  I am configuring wifi on my android based board using shell script.
Now I want to execute the same script from android application. For
that, I had used following code, but it didn't give any success till
now,

I had executed same script from adb shell prompt and it works
nicely.

Process exeCommands = Runtime.getRuntime().exec(/data/busybox/
board_script.sh);

is there anything else required than this???

Please help..
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] problem with the fix Button at of the list View

2009-12-15 Thread Asif k
Hi all,

  I want a fix Cancel Button at the bottom of the ListView. I want
my list View to be scrollable and fix Button at Bottom.

  I had added the Button at the bottom of the list with addFooterView
(button);  but if list is longer than the screen, then we have to
scroll down to get the button and if list is very short then Button
will be at the middle of the screen just bellow the listview :(

 I got Ramain Guy's suggestion of setting height = 0dip and weight =
1 but by doing this nothing is appearing on the screen (blank view)

 note: my ListView is one tab of the TabHost.

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ActivityManager.restartPackage() is not working

2009-12-09 Thread Asif k
Hi justinh,

   Thanks for your reply.


 Is that the package name you have defined in your Manifest for the
 package attribute?

yess thats the package name that is there in manifest file. I am
finding the package name from the main activity as shown bellow ,

String pkg = demo.test.MyActivity;
int pkg_point= pkg.lastIndexOf('.');
am.restartPackage(pkg.substring(0,pkg_point)); // am is Activity
Manager
Is there any better/other way to find out the package and give as an
input parameter to restartPackage() ??

 Also, you need to provide the parameter as a
 String.

Ya it is the string but in the previous post , I had written it
manually in this mail to replace pkg.subString(0,pkg_point) for better
understanding.

But still I am getting the same error as  12-09 15:13:56.893: WARN/
ActivityManager(58): Invalid packageName: 1: demo.test 

Waiting for inputs,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ActivityManager.restartPackage() is not working

2009-12-09 Thread Asif k
Hi all,

 Can I have any working example of restartPackage() API.

Thanks in advance,
Asif

On Dec 9, 2:56 pm, Asif k asifk1...@gmail.com wrote:
 Hi justinh,

    Thanks for your reply.

  Is that the package name you have defined in your Manifest for the
  package attribute?

 yess thats the package name that is there in manifest file. I am
 finding the package name from the main activity as shown bellow ,

 String pkg = demo.test.MyActivity;
         int pkg_point= pkg.lastIndexOf('.');
         am.restartPackage(pkg.substring(0,pkg_point)); // am is Activity
 Manager
 Is there any better/other way to find out the package and give as an
 input parameter to restartPackage() ??

  Also, you need to provide the parameter as a

  String.

 Ya it is the string but in the previous post , I had written it
 manually in this mail to replace pkg.subString(0,pkg_point) for better
 understanding.

 But still I am getting the same error as  12-09 15:13:56.893: WARN/
 ActivityManager(58): Invalid packageName: 1: demo.test 

 Waiting for inputs,
 Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ActivityManager.restartPackage() is not working

2009-12-09 Thread Asif k
One observation,

It is working fine if I am giving hardcoded package as

am.restartPackage(demo.test);   rather than

 am.restartPackage(pkg.substring(0,pkg_point)); .

Here it is showing error that : Invalid package : demo.test
which is same as I had given inside quotes.

Any suggestions??


On Dec 9, 3:02 pm, Asif k asifk1...@gmail.com wrote:
 Hi all,

  Can I have any working example of restartPackage() API.

 Thanks in advance,
 Asif

 On Dec 9, 2:56 pm, Asif k asifk1...@gmail.com wrote:



  Hi justinh,

     Thanks for your reply.

   Is that the package name you have defined in your Manifest for the
   package attribute?

  yess thats the package name that is there in manifest file. I am
  finding the package name from the main activity as shown bellow ,

  String pkg = demo.test.MyActivity;
          int pkg_point= pkg.lastIndexOf('.');
          am.restartPackage(pkg.substring(0,pkg_point)); // am is Activity
  Manager
  Is there any better/other way to find out the package and give as an
  input parameter to restartPackage() ??

   Also, you need to provide the parameter as a

   String.

  Ya it is the string but in the previous post , I had written it
  manually in this mail to replace pkg.subString(0,pkg_point) for better
  understanding.

  But still I am getting the same error as  12-09 15:13:56.893: WARN/
  ActivityManager(58): Invalid packageName: 1: demo.test 

  Waiting for inputs,
  Asif- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ActivityManager.restartPackage() is not working

2009-12-08 Thread Asif k
Hi All,

  I want to kill my application whose base activity is
demo.test.MyActivity.

 I am trying to kill it from other application by following code, but
getting the error like  package name is not valid


 am.restartPackage(demo.test); // here am is ActivityManager define
earlier )

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] killing the task in the application

2009-11-25 Thread Asif k
Hi All,

   I want to kill some tasks that I got through
ActivityManager.RunningTaskInfo class. Is there any API available for
that ? or Can you please suugest some approach to achieve that?

 I checked task.baseActivity but there is no finish() API here.

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] WiFi configuration issue...

2009-11-20 Thread Asif k
Hi all,

  I want to configure WiFi on my android based board. But in my case I
am getting the name of active SSID withing the network from the
desktop client so I have to configure the board with the same SSID.

  I have searched the APIs available in WiFiManager class and only
possible solution seemed to be,

-
   ListScanResult hotSpots = wifiManager.getScanResults();


for(ScanResult hotSpot: hotSpots) {
String hotSpotSsid = hotSpot.SSID;
String hotSpotBssid = hotSpot.BSSID;
StringBuffer sBuf = new StringBuffer(\);
sBuf.append(hotSpotSsid+\);
hotSpotSsid = sBuf.toString();


if(hotSpotSsid.equals(\myhotspot\)) {


WifiConfiguration wifiConfiguration = new
WifiConfiguration();
wifiConfiguration.SSID = hotSpotSsid;
wifiConfiguration.BSSID = hotSpotBssid;
wifiConfiguration.hiddenSSID = false;
wifiConfiguration.priority = 10;


// add this to the configured networks
int inetId =
wifiManager.addNetwork(wifiConfiguration);
if(inetId  0) {
System.out.println(Unable to add network
configuration for SSID: +hotSpotSsid);
return;
}
// connect to this wifi network

---

 means I have to have list of all the availabe networks and among them
I need to search network with required SSID it will increase
unnecessary operation to connect to the SSID which we know.

Is there any API available to get information regarding whole
WIFIConfiguration if we know only SSID?

Thanks,
Asif

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Error to create an AVD - Ignoring add-on

2009-11-15 Thread Asif k
Same command I had copied and pasted in my command prompt and one avd
is created successfully. So please check the sdk that u had
downloaded.

Check with android list target in command prompt that what
target_id : 2.

Thanks,
Asif

On Nov 15, 7:20 pm, Onnlist onnl...@gmail.com wrote:
 Hello All,

 I am new to Android development. I have installed Eclipse 3.5, SDK and
 ADT plugin successfully.
 But I am receiving following error to create an AVD -

 C:\android-sdk-windows\toolsandroid create avd --target 2 --name
 my_avd
 Error: Ignoring add-on 'google_apis-3-r03': Unable to find base
 platform with API level '3'
 Error: Ignoring add-on 'google_apis-4-r01': Unable to find base
 platform with API level '4'
 Error: Ignoring add-on 'google_apis-5_r01': Unable to find base
 platform with API level '5'
 Error: Target id is not valid. Use 'android.bat list targets' to get
 the target ids.

 Please advise if i am missing any step - not sure why i am getting
 above error

 Thank you so much in advance.

 Jagdish

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] changing the shape of Button

2009-10-23 Thread Asif k

Hi all,

  I want to change the shape of Button from rectangle to triangle in
my Activity. Is it possible? Is there any API available for this?

  Thanks,
   Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] hardware independent USB driver for android

2009-10-21 Thread Asif k

Hi all,

   Is there any H/W independent USB deriver is available for android
OS to connect any android based device to single desktop like
microsoft Active Sync ?

  I had tried the USB driver provided with the sdk on windows system
but it is not recognizing my beagle board on which android is running.

  I want to install applications on BB from eclipse. Is there any
other way?

  Thanks,
  Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] finishing(killing) the application from the sub-Activity

2009-10-14 Thread Asif k

Hi all,

  I had placed a cancel button in my subactivity, I want to finish the
application when this button is pressed.

  Simply putting finish() API when cancel button is clicked bring me
back to parent activity, means it is just killing the subactivity.

  I had also tried with implementing OnActivityResult() and putting
finish() in it in parent Activity, but did not work.

  Any Suggestion??

  Thanks,
  Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] including the whole drawable image in the ImageView

2009-10-08 Thread Asif k

Hi All,

  I am adding the drawble image xyz.png in the ImageView. But the
problem is that the whole image  cannot included in the view.

  by reducing layout height and weight also results in just cropping
the image. I had also tried with Adjust View Bounds but no
improvement.

  Is there any way to scale down the whole image to include in the
View.

 Thanks,
  Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] window.requestFeature(Window.FEATURE_RIGHT_ICON) does not work correctly

2009-10-07 Thread Asif k

Hi all,

  i want to keep cancel button in the title bar at the right side, for
that I had used following code,

window.requestFeature(Window.FEATURE_RIGHT_ICON);
window.setFeatureDrawableResource(Window.FEATURE_RIGHT_ICON,
R.drawable.cancel);

but i am getting the icon at the left side of title bar.

Is this a bug or something else is required to accomplish this?


Thanks,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] for loop gives NullPointer Exception

2009-09-11 Thread Asif k

Hi all,

  I am getting null pointer exception at the bellow mentioned line in
the for loop.

char[] buffer= {'s','d','c'};
char[] test;

for(int i=0; buffer[i]!='\n';i++) {
test[i] = buffer[i];   //This line gives Null pointer
Exception at runtime
}

I am getting the same error in each for loop where I am equating
something.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Null pointer exception while receiving at Broadcast receiver

2009-09-03 Thread Asif k

Hi all,

  I am receiving Text messages from another application sent through
broadcast intent. I am displaying these messages to my application's
GUI.

  In my application I had defined broadcast receiver in my
manifest.xml

--
receiver android:name=.HHBroadcastReceiver
intent-filter
action android:name=android.demo.test/
/intent-filter
/receiver
-
and also define the logic in the Broadcast receiver class

---
public class HHBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
//TODO: React to the Intent received.
String msg_receive = intent.getStringExtra(message1);
AssetTest.hh_text.append(\n\n+msg_receive);
}
}
-

but I am getting following error,

09-04 10:49:04.275: ERROR/AndroidRuntime(912):
java.lang.RuntimeException: Unable to start receiver
android.hh.HHBroadcastReceiver: java.lang.NullPointerException
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2417)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.app.ActivityThread.access$2700(ActivityThread.java:112)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.os.Looper.loop(Looper.java:123)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
java.lang.reflect.Method.invokeNative(Native Method)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
java.lang.reflect.Method.invoke(Method.java:521)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
dalvik.system.NativeStart.main(Native Method)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): Caused by:
java.lang.NullPointerException
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.hh.HHBroadcastReceiver.onReceive(HHBroadcastReceiver.java:12)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2408)
09-04 10:49:04.275: ERROR/AndroidRuntime(912): ... 10 more


Please help.

Thanks,
Asif


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] error while building the android code using make

2009-07-16 Thread Asif k

Hi all,

  I have downloaded the code successfully using repo sync on my
linux system and now I want to buld it using make but it fails and
telling that


frameworks/policies/base/PolicyConfig.mk:22:*** No module defined
for
the given PRODUCT_POLICY (android.policy_phone) . stop.  


So can  anyone plz tell me regarding this problem


Thanks,
Asif



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Error while downloading android source code

2009-06-30 Thread Asif k

Hi all,

 I am downloading android source code from android site :
http://source.android.com/download

I am following the steps mentioned in the above site and my host
system is redhat linux.
After initial steps when I had started installing repo using following
command , I got error : unable to connect socket

[r...@linux mydroid]# repo init -u 
git://android.git.kernel.org/platform/manifest.git
Getting repo ...
   from git://android.git.kernel.org/tools/repo.git
android.git.kernel.org[0: 149.20.20.141]: errno=Connection refused
android.git.kernel.org[0: 204.152.191.45]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)

What can be the problem?? Please help..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] No intent to terminate(end) the call programmatically

2009-06-03 Thread Asif k

Hi all,

  Is android supports the terminating the phone call programmatically
using either intent or any APi ?

 If not now then can we see one of the above in the future sdks??


Regards,
Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sending messages to Subactivity( currently running) from the parentActivity

2009-06-01 Thread Asif k

Hi,

   Is there any way to send String messages from the parent Activity
(running on B/g) to the subActivity (currently running) ??

SubActivity is invoked using intent and startActivity(intent);

I want to open EditBox(sub activity) using this method and then update
this editBox according to the process going on in the parent activity
() and later want to finish() this Box when process in the parent
activity completed.

Please Help

Thanks,
Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] finishing subactivity after some perticular time

2009-05-26 Thread Asif k

Hi all,

   I had opened an image file store in the sdcard using startActivity
(intent) API.

  By doing this, image has opened and will remain open til manually
coming back to parent activity by pressing back button. but I want it
to be opened only for some perticular time after that it should exit
and came back to parent acity. So how to set timer for subactivity??

Please help.

Thanks,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] DDMS.. file explorer problem

2009-05-25 Thread Asif k

Hi all,

   In the DDMS, I had used FileExplorer and visited /data/app folder
to see the .apk files installed in the emulator. After that I had
minimized the data folder and thus stopped that process.

  But I am observing that this /data/app folder is opening again and
again automatically. I dont know what is the reason and how to stop
it.

  Please help..

Thanks,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] DexClassLoader caould not invoke method from another application properly

2009-05-13 Thread Asif k

Hi all,

   I had used DexClassLoader to execute the code of other application
dynamically. I am calling method display() of another application from
my application. The display() method will just show the Toast pop up.

The following is the code of my running application

DexClassLoader dLoader = new DexClassLoader(/data/app/
android.testcase.apk,/data/app-
private,null,ClassLoader.getSystemClassLoader());
try {
Class cLoad = 
dLoader.loadClass(android.testcase.TestCase);
//Class[] param = new Class[] 
{Bundle.class};
Method mLoad = 
cLoad.getMethod(display,null);
Object obj = cLoad.newInstance();
mLoad.invoke(obj);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

The method display() in the other android.testcase.apk is as follows,

public void display() {

Toast.makeText(this, Loaded properly,Toast.LENGTH_SHORT).show
();


}

But this gives Exception and stacktrace as follows



05-13 20:10:22.155: WARN/System.err(773):
java.lang.reflect.InvocationTargetException
05-13 20:10:22.166: WARN/System.err(773): at
android.testcase.TestCase.dispaly(TestCase.java:23)
05-13 20:10:22.176: WARN/System.err(773): at
java.lang.reflect.Method.invokeNative(Native Method)
05-13 20:10:22.186: WARN/System.err(773): at
java.lang.reflect.Method.invoke(Method.java:521)
05-13 20:10:22.194: WARN/System.err(773): at
android.loaduiapp.LoadUiApp$1.onClick(LoadUiApp.java:28)
05-13 20:10:22.194: WARN/System.err(773): at
android.view.View.performClick(View.java:2179)
05-13 20:10:22.204: WARN/System.err(773): at
android.view.View.onTouchEvent(View.java:3828)
05-13 20:10:22.204: WARN/System.err(773): at
android.widget.TextView.onTouchEvent(TextView.java:6291)
05-13 20:10:22.216: WARN/System.err(773): at
android.view.View.dispatchTouchEvent(View.java:3368)
05-13 20:10:22.225: WARN/System.err(773): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-13 20:10:22.235: WARN/System.err(773): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-13 20:10:22.246: WARN/System.err(773): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-13 20:10:22.256: WARN/System.err(773): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
05-13 20:10:22.256: WARN/System.err(773): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
05-13 20:10:22.266: WARN/System.err(773): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
05-13 20:10:22.266: WARN/System.err(773): at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
05-13 20:10:22.275: WARN/System.err(773): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
05-13 20:10:22.284: WARN/System.err(773): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
05-13 20:10:22.284: WARN/System.err(773): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-13 20:10:22.297: WARN/System.err(773): at android.os.Looper.loop
(Looper.java:123)
05-13 20:10:22.305: WARN/System.err(773): at
android.app.ActivityThread.main(ActivityThread.java:3948)
05-13 20:10:22.305: WARN/System.err(773): at
java.lang.reflect.Method.invokeNative(Native Method)
05-13 20:10:22.305: WARN/System.err(773): at
java.lang.reflect.Method.invoke(Method.java:521)
05-13 20:10:22.314: WARN/System.err(773): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
05-13 20:10:22.314: WARN/System.err(773): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
05-13 20:10:22.324: WARN/System.err(773): at
dalvik.system.NativeStart.main(Native Method)
05-13 20:10:22.336: WARN/System.err(773): Caused by:
java.lang.NullPointerException
05-13 20:10:22.454: DEBUG/dalvikvm(773): GC freed 4388 objects /
414064 bytes in 115ms
05-13 20:10:22.466: WARN/System.err(773): at
android.content.ContextWrapper.getResources(ContextWrapper.java:79)
05-13 20:10:22.466: WARN/System.err(773): at
android.widget.Toast.init(Toast.java:88)
05-13 20:10:22.477: WARN/System.err(773): at
android.widget.Toast.makeText(Toast.java:230)
05-13 20:10:22.485: WARN/System.err(773): ... 25 more


Please Help. Am I missing something??


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to

[android-developers] want some help regarding application merging statement written on developer.android.com

2009-05-12 Thread Asif k

Hi all,

   I  the android site, in the application fundamentals, it is written
that,

A central feature of Android is that one application can make use of
elements of other applications (provided those applications permit
it). For example, if your application needs to display a scrolling
list of images and another application has developed a suitable
scroller and made it available to others, you can call upon that
scroller to do the work, rather than develop your own. Your
application doesn't incorporate the code of the other application or
link to it. Rather, it simply starts up that piece of the other
application when the need arises.


Can anyone please give some basic steps, how can we accomplish
this???

Regards,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Running two applications in the same process

2009-05-12 Thread Asif k

Hi all,

   I want to run two different android applications in the single
process to access the resources. For that purpose, I had made
following two changes in the manifest file of both the application ,

I had override two attributes and

1) android:sharedUserId= hii.hello under manifest tag
2) android:process = guide.android under application tag

  I had made these changes (asign the same values) in the both the
applications but could not get expected results. How to check whether
both these applications are running in the same process??

  Should I sign both the application with the same certificate?? If
yes, then can you please tell how??

Thanks,
Asif.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Invoking one apk from another

2009-05-07 Thread Asif k

Hi all,

   I want to invoke musicplayer.apk(this .apk I have already created
and working fine) application from my current application
programmatically. Can anyone please suggest me how to export
musicplayer.apk and the steps to accomplish this task?

   Please help. Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Playing a .mp3 file using View Intent

2009-05-05 Thread Asif k

Hi all,

   I want to play a mp3 file which is stored in the /sdcard/ using
ACTION_VIEW intent and I used following code to accomplish that, but I
got ActivityNotFound Exception..

Intent intent = new Intent(android.content.Intent.ACTION_VIEW);

Uri data = Uri.parse(file:///sdcard/abc_xyz.mp3);
intent.setDataAndType(data,/audio/mp3);

try {
  startActivity(intent);
   } catch (ActivityNotFoundException e) {
  e.printStackTrace();


   }

But I got the following exception,


05-05 15:44:40.563: WARN/System.err(5253):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.intent.action.VIEW data=file:///sdcard/Main
Agar Kahoon.mp3 type=/audio/mp3 }
05-05 15:44:40.582: WARN/System.err(5253): at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1471)
05-05 15:44:40.582: WARN/System.err(5253): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1441)
05-05 15:44:40.593: WARN/System.err(5253): at
android.app.Activity.startActivityForResult(Activity.java:2526)
05-05 15:44:40.602: WARN/System.err(5253): at
android.app.Activity.startActivity(Activity.java:2570)
05-05 15:44:40.602: WARN/System.err(5253): at
test.mp3file.MusicTest.onCreate(MusicTest.java:25)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1122)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2104)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2157)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1581)
05-05 15:44:40.612: WARN/System.err(5253): at
android.os.Handler.dispatchMessage(Handler.java:88)
05-05 15:44:40.612: WARN/System.err(5253): at
android.os.Looper.loop(Looper.java:123)
05-05 15:44:40.612: WARN/System.err(5253): at
android.app.ActivityThread.main(ActivityThread.java:3739)
05-05 15:44:40.612: WARN/System.err(5253): at
java.lang.reflect.Method.invokeNative(Native Method)
05-05 15:44:40.612: WARN/System.err(5253): at
java.lang.reflect.Method.invoke(Method.java:515)
05-05 15:44:40.612: WARN/System.err(5253): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
05-05 15:44:40.612: WARN/System.err(5253): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
05-05 15:44:40.612: WARN/System.err(5253): at
dalvik.system.NativeStart.main(Native Method)


   In fact I used this approach to play file, because I want the
internal music application with Gui buttons on the display  during
playback. Is it possible to call the internal music application when
we play with the MediaPlayer object ??

Please help. Thanks in advance.

Asif

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] separate UI window of the Background Thread

2009-05-04 Thread Asif k

Hi all,

   During the processing of the background thread, I want to create
another GUI window (of b/g thread) which will overlap the main UI
thread and show b/g processing and this window will be killed when b/g
thread will be over.

   Can anyone suggest how to accomplish this task?? Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Blocking UIThread till the .mp3 file completed in the b/g

2009-05-04 Thread Asif k

Hi all,

  Is there anyway to block the UI Thread till the .mp3 file completes
(or in general blocking UI thread till perticular action in the b/g
thread completes). I had used following code but not got the expected
result.


synchronized void playFile() {

mp.start();
try {
this.wait();
} catch(E) {}

if(mp.isPlaying()==false) {
mp.notify();
}

}

Please help. Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ConditionVariable Usage

2009-04-21 Thread Asif k

Hi,

I'm trying to use a ConditionVariable to control the execution
sequence of two threads. I can create a ConditionVariable in one
thread and block on it. But I would like to be able to access it from
another Thread  and unblock it from that thread.. ?

   Blocked Thread i am planning to keep as GUI thread and it should
update the messages which are sent by b/g thread on the screen during
its block state and will be unblocked by b/g thread in the end by
calling open(); method.

  Can you please the proper way to accomplish this??

Thanks,
Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] java.lang.reflect.InvocationTargetException during calling a function of another application at runtime

2009-04-17 Thread Asif k

Hi all,

   I am calling a method of another .apk file dynamically at runtime
in my application. I can execute it successfully if method does not
contain any variable which is defined outside of that method.

  But if I am using the variables which are defined outside that
method ( in the same activity or same .apk) then my application throws
java.lang.reflect.InvocationTargetException at runtime.

for e.g. if method defines as ,

public void abc(){
String s =hello;
Log.w(hiii,s);
}  executes fine

but public void abc(){
ImageView splash = (ImageView) findViewById(R.id.splash);
}   throws exception java.lang.reflect.InvocationTargetException
caused due to NullPointerException.

Please Help..

Regardz,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] C\C++ support for application level

2009-04-15 Thread Asif k

Hi,

   I want to ask to google engineers that whether future sdk releases
will provide any C\C++ support for application developement?? If no..
then Can you please tell me the disadvantage of these languages??

  As per my knowledge and experience, runtime environment is not
needed to execute C\C++ application. So why cant we directly run any
application which is written in C\C++?? Is there any way to bypass DVM
to execute a code?? Core android librarys are C\C++ only...

Regardz,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] setCursorVisible in the TextView

2009-04-09 Thread Asif k

Hi all,

In the android reference site, it is written in the
serCursorVisible section that cursor is visible by default and you can
give its value as either true or false to change the its visibility
on the GUI screen.

   But in my case , cursor is remaining invisible irrespective of
setting the visibility true or false using android:cursorVisible =
true  in the layout/main.xml.

   Should I do something more to make cursor visible on the GUI screen
or its a bug in android???

Please respond...

regardz,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Displaying real time information during the execution of an activity

2009-04-06 Thread Asif k


   Hi all,

  I want to display the status of the activity execution on the
screen using the TextView while activity is executing. I am appending
the String messages at different stages of execution in the TextView,
which is  defined in the Layout main.xml (e.g. TextView.append(Server
started..).

   For e.g. I am running socket communication application in which my
android application is the server and it is receiving the messages
from the local desktop. So in this application I want to show Server
started.. message when socket server on android started , then a
messge waiting for message.. and then message receivied.. when
message received by android server.All 3 steps are the part of a
single activity.

   But in my case, I am getting all 3 messages at a time after
activity execution completed. Is there any API available, using which
I can show the status during the execution also.

Please help... Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] DexClassLoader Feature in the Cupcake

2009-03-25 Thread Asif k

Hi all,

   Can anyone please provide some information regarding the reflection
API DexclassLoader, which will be includeed in cupcake release?? In
the latest development of the cupcake, whether this feature is added
or still to be done??

   I f already included then any reference which will explain about
how to download that cupcake source from the repo, compile that source
and add in the current sdk. I am using windows plateform and running
the applications on the emulator.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Launching adb commands programtically from android application

2009-03-20 Thread Asif k

Hi all,

  Is it possible to launch adb commands programatically from any
android application?

For e.g. installing .apk file to /data/app/ directory from another
android application using some APIs??


regardz,

Asif
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Asif k


Hi Dianne,

   Yes you are right, But Is there any way to store over .jar file in
the app's data directory. Because I am working on emulator and I can
store any file there.
Please tell the way I can store in the data dir.

   And yes any alternate idea to call the .jar files dynamically at
runtime?? I want to call a function from the .jar file, which will be
decided at runtime.
Thanks in advance.

Regards,

Asif Kadiwala
On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
 On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:
    Security will be one concern but , my plan is to load the
  required .jar files in the sdcard only when it is necessary and I will
  remove that .jar files from the /sdcard when my application execution
  completes.

 That doesn't fix the security hole, just makes it a little harder for people
 to exploit.  Not much, though, since they can easily monitor the directory
 where you place them.

 Why not just put them in your app's data directory, which nobody else can
 touch?

    I want to do this because I wanna run different things, those will
  be decided at runtime. I think this is same concept as that of .dll
  ( Dynamic link Lib) in the .net framework.

 And dlls also have serious security issues if you put them in a place where
 others can modify them.  It's not as much of a concern on Windows, though,
 because its security is much looser and all of the apps tend to run as the
 same user, anyway.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-19 Thread Asif k

Yes I can push file to /data/app-private/ directory using DDMS but not
programmatically.

  But I want to call .jar file at runtime to complete my task. Please
any suggestion

On Mar 19, 12:19 pm, Dianne Hackborn hack...@android.com wrote:
 You can put whatever you want in your private data directory.





 On Wed, Mar 18, 2009 at 11:15 PM, Asif k asifk1...@gmail.com wrote:

  Hi Dianne,

    Yes you are right, But Is there any way to store over .jar file in
  the app's data directory. Because I am working on emulator and I can
  store any file there.
  Please tell the way I can store in the data dir.

    And yes any alternate idea to call the .jar files dynamically at
  runtime?? I want to call a function from the .jar file, which will be
  decided at runtime.
  Thanks in advance.

  Regards,

  Asif Kadiwala
  On Mar 19, 11:02 am, Dianne Hackborn hack...@android.com wrote:
   On Wed, Mar 18, 2009 at 10:18 PM, Asif k asifk1...@gmail.com wrote:
  Security will be one concern but , my plan is to load the
required .jar files in the sdcard only when it is necessary and I will
remove that .jar files from the /sdcard when my application execution
completes.

   That doesn't fix the security hole, just makes it a little harder for
  people
   to exploit.  Not much, though, since they can easily monitor the
  directory
   where you place them.

   Why not just put them in your app's data directory, which nobody else can
   touch?

  I want to do this because I wanna run different things, those will
be decided at runtime. I think this is same concept as that of .dll
( Dynamic link Lib) in the .net framework.

   And dlls also have serious security issues if you put them in a place
  where
   others can modify them.  It's not as much of a concern on Windows,
  though,
   because its security is much looser and all of the apps tend to run as
  the
   same user, anyway.

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support.  All such questions should be posted on public
   forums, where I and others can see and answer them.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Dynamically loading a .jar file at Runtime

2009-03-18 Thread Asif k

Hi all,

  Thanks for your reply.

   Security will be one concern but , my plan is to load the
required .jar files in the sdcard only when it is necessary and I will
remove that .jar files from the /sdcard when my application execution
completes.

   I want to do this because I wanna run different things, those will
be decided at runtime. I think this is same concept as that of .dll
( Dynamic link Lib) in the .net framework.

On Mar 19, 8:03 am, Dianne Hackborn hack...@android.com wrote:
 Also keep in mind that doing this kind of thing is completely insecure.  Any
 app can go and modify your files on the sd card to insert their own code
 into your app and run under your identity.  Then any malicious things they
 do with your app's permissions are the fault of your app.





 On Wed, Mar 18, 2009 at 4:39 PM, fadden fad...@android.com wrote:

  On Mar 18, 7:29 am, Asif k asifk1...@gmail.com wrote:
     I am storing the required test.jar file in the /sdcard. I want to
   load it dynamically at runtime and want to execute a function xyz()
   resides in that. For this purpose

     I had written following code ,

  This doesn't work -- in 1.0 you can't load jar/apk files that aren't
  part of your application.  The problem is that it wants to pull
  classes.dex out of the jar/apk and put it in /data/dalvik-cache, but
  it doesn't have permission to do so.

  The cupcake release is expected to include the DexClassLoader class,
  which allows you to specify a location other than /data/dalvik-cache
  for your output files.

   But got ClassCastException : dalvik.system.PathClassLoader

  URLClassLoader systemLoader = (URLClassLoader) ClassLoader
             .getSystemClassLoader();

  Assuming that the system class loader is a URLClassLoader is unwise
  and unnecessary.  Just use ClassLoader.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Plzzzzz Help....FileOutputStream creates problem in execution

2009-03-10 Thread Asif k

Hi all,

The is working fine if I use this Socket server also as Desktop
application. But it creates a problem at FIleOutputStream in the
android application.

Please reply

On Mar 10, 10:13 am, Asif k asifk1...@gmail.com wrote:
 Hi all,

 I am running android server application which is listening to port
  to retreive the file.I want to receive the file sent from Desktop
 socket client application. To perform this task I used following code
 as Android socket server. But execution stops infinitely at the

 bos = new BufferedOutputStream(new FileOutputStream(123.txt)); line,
 Please help me to find out problem.

 FTPServer.java is as follows,

 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.net.ServerSocket;
 import java.net.Socket;

 import android.util.Log;

 public class FTPServer implements Runnable{

 ServerSocket server;
 Socket connection;

 BufferedInputStream bis;
 BufferedOutputStream bos;

 byte[] receivedData;
 int in;

 public void run(){
 try {
 server = new ServerSocket( );
 Log.d(TCP..,FTP started...);
 try {

 while ( true ) {
 connection = server.accept();

 Log.w( TCP,S:: receiving file...  );

 receivedData = new byte[8192];
 Log.d(hello:,databye done);

 bis = new BufferedInputStream(connection.getInputStream());
 Log.d(hello:,buffer input done);

 bos = new BufferedOutputStream(new FileOutputStream(123.txt)); //
 this line creates the problem
 Log.d(hello:,buffer output done);
 while ((in = bis.read(receivedData)) != -1){
 bos.write(receivedData,0,in);}

 bos.close();

 Log.w(TCP,File Received.  );}
 }

 catch (IOException e ) { }

 finally {

 }
 }

 catch(Exception e){



 }
 }
 }- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] network redirection problem

2009-03-05 Thread Asif k

Hi all,

   I want  to configure  IP address of the emulator and to set the
network redirection ports for the socket communication.

   For that I had followed the steps as per android.developer.com/
emulator guides. But could not succeed in that.
   Can you plz tell me what will be the default IP of the emulator.

I got the error while executing followin command,

redir add tcp::

Plz help. Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to send Files Using Socket communication

2009-03-02 Thread Asif k

Hi all,

  using socket communication we can send messeges. But is there any
way to transfer files using Socket Communication between desktop and
Android phone If yess where can we store it??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running different actives in the same package?

2009-02-13 Thread Asif k

include all the activities in manifest
use following code
Intent i = new Intent(Context.this, New activity.class);
startActivity(i);

this code will divert you to New Activity

On Feb 13, 1:18 pm, bigauto chidragon1...@gmail.com wrote:
 It seems that finish() ends a activity, but I'm not sure if it will
 actually allow me to run a different activity on a simulator. Also if
 there are any tutorials dealing with this it would be greatly
 appreciated.

 On Feb 13, 2:26 am, susanner zsusan...@163.com wrote:



  Close with finish() for that activity when you are done.

  On 2月13日, 下午2时42分, bigauto chidragon1...@gmail.com wrote:

   I am using eclipse to run the simulations and I can't get the
   simulator to run anything other than the default activity. When I
   created the android project, eclipse automatically created a default
   class within that package, and it seems like I can't run anything
   other than that class. I created another activity in  that package,
   but I can't seem to get the simulator to run that instead.

   Also I was wondering if we can have class constructors for activity
   classes?- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WebView/Browser: How to browse files from the sdcard?

2009-01-12 Thread Asif k

Hi Mariano,

Can you please tell us what is the final result
and how u had implement those API to run your code

Thanks,
Asif

On Jan 12, 12:21 am, Mariano Kamp mariano.k...@gmail.com wrote:
 Once again, thanks.

 I found this 
 tutorial:http://www.anddev.org/tutproviding_data_in_a_contentprovider-t4073.html
 and will try that.

 I checked that the ContentProvider is called from the Browser... So the rest
 should work.

 On Sun, Jan 11, 2009 at 7:58 PM, Mark Murphy mmur...@commonsware.comwrote:





  Mariano Kamp wrote:
   I don't see how that should work?
   Wouldn't that be the same as the FileContentProvider?

  I cannot find a FileContentProvider class in the SDK or SDK samples. I
  see where there is one in the source code, and, yes, I think that's the
  basic idea.

   How would WebView learn about this provider.

  I believe you feed it a URL, like:

  content://your.provider.here/path/to/something.html

  But, again, I have not tried this myself, though I recall seeing some
  posts in this group, and maybe a blog post, covering this technique to
  some degree.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  Android Training in Sweden --http://www.sotrium.com/training.php- Hide 
  quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to bring back file-explorer window in eclipse-DDMS once after closing it

2009-01-09 Thread Asif k

Hi Xav,

Thans a lot. I got it.

On Jan 9, 1:14 pm, Xavier Ducrohet x...@google.com wrote:
 Window  Show View  Other...
 Then you'll find it under Android.

 You can also reset the whole perspective (Window  Reset Perspective)

 Xav



 On Thu, Jan 8, 2009 at 10:19 PM, Asif k asifk1...@gmail.com wrote:

  Hi All,

   I had closed the file-explorer window in the DDMS of eclipse by
  mistake. But now I am not able to find the options anywhere in DDMS to
  restore it again so file-explorer of an emulator  gone in my DDMS.But
  it is needed.
   Can anyone tell me how can I restore it again?

  Thanks,
  Asif.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to pass data when switching between activities in an application

2009-01-08 Thread Asif k

Hi Amit,

Thanks for ur reply

I had Used it like following ,

Intent filelist = new Intent(this, ListApp.class);
showButton.putExtra(android_giude.AndroidView.hello,Asif
here);
startActivity(filelist);

But my doubt is how to retrive this value in the ListApp activity??
Please reply ASAP.

thanks,
Asif

On Jan 8, 1:25 pm, A R amit.r...@gmail.com wrote:
 check putExtra method in Intent Class

 Regards,
 Amit.

 On Jan 8, 12:37 pm, Asif k asifk1...@gmail.com wrote:



  Hi all,

    In an application I am switching between HomeApp.java activity to
  ListApp.java activity
  using following code :

                  Intent filelist = new Intent(this, ListApp.class);
          startActivity(filelist);

  Other than just switching , how can I pass some data( e.g. String
  name, Int no etc. that we are passing in methods) from HomeApp to
  ListApp??

  Please reply.Thanks in advance.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to pass data when switching between activities in an application

2009-01-08 Thread Asif k

Hi all,

I got the solution

here is a good thread regarding this topic

http://groups.google.com/group/android-developers/browse_thread/thread/9d0fd6127cb513ff

On Jan 8, 3:54 pm, lummie gro...@lummie.co.uk wrote:
 In the onCreate or else where in the activity:

 String value = this.getIntent().getStringExtra
 (android_giude.AndroidView.hello);

 there are severla getExtra methods for retrieving different types
 of data.

 On Jan 8, 10:18 am, Asif k asifk1...@gmail.com wrote:



  Hi Amit,

  Thanks for ur reply

  I had Used it like following ,

          Intent filelist = new Intent(this, ListApp.class);
          showButton.putExtra(android_giude.AndroidView.hello,Asif
  here);
          startActivity(filelist);

  But my doubt is how to retrive this value in the ListApp activity??
  Please reply ASAP.

  thanks,
  Asif

  On Jan 8, 1:25 pm, A R amit.r...@gmail.com wrote:

   check putExtra method in Intent Class

   Regards,
   Amit.

   On Jan 8, 12:37 pm, Asif k asifk1...@gmail.com wrote:

Hi all,

  In an application I am switching between HomeApp.java activity to
ListApp.java activity
using following code :

                Intent filelist = new Intent(this, ListApp.class);
        startActivity(filelist);

Other than just switching , how can I pass some data( e.g. String
name, Int no etc. that we are passing in methods) from HomeApp to
ListApp??

Please reply.Thanks in advance.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to bring back file-explorer window in eclipse-DDMS once after closing it

2009-01-08 Thread Asif k

Hi All,

  I had closed the file-explorer window in the DDMS of eclipse by
mistake. But now I am not able to find the options anywhere in DDMS to
restore it again so file-explorer of an emulator  gone in my DDMS.But
it is needed.
  Can anyone tell me how can I restore it again?

Thanks,
Asif.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to pass data when switching between activities in an application

2009-01-07 Thread Asif k

Hi all,

  In an application I am switching between HomeApp.java activity to
ListApp.java activity
using following code :

Intent filelist = new Intent(this, ListApp.class);
startActivity(filelist);

Other than just switching , how can I pass some data( e.g. String
name, Int no etc. that we are passing in methods) from HomeApp to
ListApp??

Please reply.Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to use command Line Arguments in Android??

2009-01-06 Thread Asif k

Hi all,

   Is it possible to use commandline arguments in Android ??
If yes then how ?? Please guide me.
Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to use command Line Arguments in Android??

2009-01-06 Thread Asif k

Hi All,

  Can you lpease tell me what is the use of
android.content.Intent.ACTION_RUN intent???
can we run any other application using it??
In the android site, this intent is not explained properly.

On Jan 6, 5:39 pm, Mark Murphy mmur...@commonsware.com wrote:
 Asif k wrote:
     Is it possible to use commandline arguments in Android ??

 The Android OS does not have a command line in any conventional sense
 that you can make use of in an ordinary Android application.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.9 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to create .apk file from the resurces that are given fro Android market

2008-12-17 Thread Asif k

Hi All,

  I have downloaded one application from adroidgear.com and
application is not given in the form of simple source code or .apk
file
but given a folder which contains
1) META-INF
2)res
3)android-manifest.xml
4)resources.arsc
5)classes.dex

even I cant see the conents of android-manifest.xml.

what to do to run this application??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to create .apk file from the resurces that are given fro Android market

2008-12-17 Thread Asif k

Hi All,

I got the solution.Thanks.
I had just push that zip file with
adb install abc.zip



On Dec 17, 3:38 pm, Asif k asifk1...@gmail.com wrote:
 Hi All,

   I have downloaded one application from adroidgear.com and
 application is not given in the form of simple source code or .apk
 file
 but given a folder which contains
 1) META-INF
 2)res
 3)android-manifest.xml
 4)resources.arsc
 5)classes.dex

 even I cant see the conents of android-manifest.xml.

 what to do to run this application??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: error in opening file in fileexplorer application

2008-11-20 Thread Asif k

Hi All,

anyone is aware of which intent filters are nedded in manifest.xml

On Nov 20, 6:13 pm, Charlie Collins [EMAIL PROTECTED] wrote:
 I am not familiar with that particular application, but it looks like
 you need the Intent and IntentFilter setup correctly for the action
 action=android.intent.action.VIEW data=file:///sdcard/1.txt.  Sorry
 if that's obvious, but does your manifest have a filter for that
 action, which specifies the activity to handle that?

 On Nov 20, 12:19 am, Asif k [EMAIL PROTECTED] wrote:

  Hi All,

  I am working on file explorer application in which I cannot open any
  file.I am using following code to open the file which I got from
  anddev.org.

              OnClickListener okButtonListener = new OnClickListener(){
                   // @Override
                   public void onClick(DialogInterface arg0, int arg1) {
                        // Lets start an intent to View the file, that
  was clicked...
                  Intent myIntent = new Intent
  (android.content.Intent.ACTION_VIEW,Uri.parse(file:// +
  aDirectory.getAbsolutePath()));
                  startActivity(myIntent);
                   }
              };
              OnClickListener cancelButtonListener = new OnClickListener
  (){
                   // @Override
                   public void onClick(DialogInterface arg0, int arg1) {
                        // Do nothing
                   }
              };
              new AlertDialog.Builder(this)
              .setTitle(Question)
              .setMessage(Do you want to open that file?\n+
  aDirectory.getName())
              .setPositiveButton(OK, okButtonListener)
              .setNegativeButton(Cancel, cancelButtonListener)
              .show();

  But I am getting following exception after clicking on any file.

  11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity:
  Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
  11-20 10:26:51.299: WARN/System.err(218):
  android.content.ActivityNotFoundException: No Activity found to handle
  Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
  11-20 10:26:51.369: WARN/System.err(218):     at
  android.app.Instrumentation.checkStartActivityResult
  (Instrumentation.java:1472)
  11-20 10:26:51.369: WARN/System.err(218):     at
  android.app.Instrumentation.execStartActivity(Instrumentation.java:
  1442)
  11-20 10:26:51.380: WARN/System.err(218):     at
  android.app.Activity.startActivityForResult(Activity.java:2528)
  11-20 10:26:51.388: WARN/System.err(218):     at
  android.app.Activity.startActivity(Activity.java:2572)
  11-20 10:26:51.409: WARN/System.err(218):     at
  android.file.FileExplorer.onListItemClick(FileExplorer.java:171)
  11-20 10:26:51.409: WARN/System.err(218):     at
  android.app.ListActivity$2.onItemClick(ListActivity.java:312)
  11-20 10:26:51.409: WARN/System.err(218):     at
  android.widget.AdapterView.performItemClick(AdapterView.java:283)
  11-20 10:26:51.409: WARN/System.err(218):     at
  android.widget.ListView.performItemClick(ListView.java:3049)
  11-20 10:26:51.420: WARN/System.err(218):     at
  android.widget.AbsListView$PerformClick.run(AbsListView.java:1415)

  Is there any permission is needed to open any file or any resources
  are required??
  Plese give ur suggestions as soon as possible.
  Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Overriding functionality of Back softkey

2008-11-19 Thread Asif k

How can we override back softkkey fuctions of emulator in over
application so that this key also can be used for going back to parent
screen.
we can use onKeyDown function but what can be the key code??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can not push files to emulated sdcard

2008-11-19 Thread Asif k

Hi All,

Thanks again for ur help But Still issues.

I have deleted sdcard,.image file in my desktop and close the
emulator.
Then I had created the sdcard image again from starting but in the
debug configuration when I gave -sdcard path of image file and
pressed debug. error message came that cannot start emulator.
so I had removed command line -sdcard path of image file and again
run ,this time it run successfully and sdcard folder is present in
ddms .. but again cannot push filess  error : [2008-11-19 16:08:06]
Failed to push 1.txt on emulator-5554: Read-only file system

?

waiting 4some inputs.

On Nov 19, 3:15 pm, yasmin afrose [EMAIL PROTECTED] wrote:
 Hi Asif,

 Before compling the project,

 Right Click on the Project - Debug as - Open Dubug Dialog - choose Target
 tab - Then give your sdcard within Additional Infor... (See the .bmp file)
 the click Debug button..

 Then see the 
 link,http://www.anddev.org/tinytut_-_pull-push_files_from-to_the_emulator_...

 folloe it  push the file.

 This may help you...

 Take Care!!
 Yasmin



 On Wed, Nov 19, 2008 at 3:29 PM, Thao [EMAIL PROTECTED] wrote:

  In fact this is a permission issue.
  What I can state is that you have those permission : d-- for
  sdcard when the emulator is not launched with the sdcard mounted.
  When it is mounted we have those permission : d---rwxrwx system
  system            1970-01-01 01:00 sdcard

  So if you are using eclipse launch your project with this additional
  option -sdcard pathToYourImageDisk\myImage.ima
  you should be then able to push file using the DDMS perspective as
  said above.

  ++

 --
 Everything is Possible For U only
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can not push files to emulated sdcard

2008-11-19 Thread Asif k

Hi Ludwig,

I used following procedure :
1).first closed the running emulator.

2).created sd card image:  ..\tools\mksdcard 512M C:\androidapp
\sdcard.img

It executed successfully and got sdcard.img file in the C:\androidapp
directory.

3).In eclipse , in debug configuration of Fileexplorer application ,
in target tab , I changed additional commandline options to -sdcard C:
\androidapp\sdcard.img
   clicked apply and press debug ... but error dialog box came stating
some error with emulator.exe

but when I removed that command line options , emulator was opening
but cannot push file in that.
I hope u will understand my issue now.


On Nov 19, 4:44 pm, Ludwig [EMAIL PROTECTED] wrote:
 If you do not have an SD card mounted with the -sdcard command, you will
 only see the /sdcard mount point and you will not be able to write to the
 (non-existent) SD card. IMHO no amount of banging your head against the wall
 will help with that.
 I think there is something wrong in either how you create the SD card or how
 you specify the path in the eclipse settings for the emulator (-sdcard ...).
 It seems to work for everyone else, so there are chances that you are doing
 something wrong.
 You might get more help if you post the exact commands you are using for
 this.

 Ludwig

 2008/11/19 Asif k [EMAIL PROTECTED]



  Hi All,

  Thanks again for ur help But Still issues.

  I have deleted sdcard,.image file in my desktop and close the
  emulator.
  Then I had created the sdcard image again from starting but in the
  debug configuration when I gave -sdcard path of image file and
  pressed debug. error message came that cannot start emulator.
  so I had removed command line -sdcard path of image file and again
  run ,this time it run successfully and sdcard folder is present in
  ddms .. but again cannot push filess  error : [2008-11-19 16:08:06]
  Failed to push 1.txt on emulator-5554: Read-only file system

  ?

  waiting 4some inputs.

  On Nov 19, 3:15 pm, yasmin afrose [EMAIL PROTECTED] wrote:
   Hi Asif,

   Before compling the project,

   Right Click on the Project - Debug as - Open Dubug Dialog - choose
  Target
   tab - Then give your sdcard within Additional Infor... (See the .bmp
  file)
   the click Debug button..

   Then see the link,
 http://www.anddev.org/tinytut_-_pull-push_files_from-to_the_emulator_...

   folloe it  push the file.

   This may help you...

   Take Care!!
   Yasmin

   On Wed, Nov 19, 2008 at 3:29 PM, Thao [EMAIL PROTECTED] wrote:

In fact this is a permission issue.
What I can state is that you have those permission : d-- for
sdcard when the emulator is not launched with the sdcard mounted.
When it is mounted we have those permission : d---rwxrwx system
system            1970-01-01 01:00 sdcard

So if you are using eclipse launch your project with this additional
option -sdcard pathToYourImageDisk\myImage.ima
you should be then able to push file using the DDMS perspective as
said above.

++

   --
   Everything is Possible For U only
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can not push files to emulated sdcard

2008-11-19 Thread Asif k

Hi all,

  Thanks a lot 4 ur inputs.
I had tried to push files using ddms but not happening(thanks yasmin 4
proper path).
According to Thao , I checked permissions and it is showing
d--
I think it is a problem of the permission.
Can anyone please suggest me how to change permission ??
Thanks in advance.
On Nov 19, 2:10 pm, yasmin afrose [EMAIL PROTECTED] wrote:
 Hi,

 I've faced the same issue while I've executed Push cmd.

 If your using eclipse then use DDMS perspective from that Go to File
 Explorer window like Log Cat. In that window, select sdcard. Now you are
 able to see the icon(Top right of the window) for Push  Pull.

 Using Push, you can add any file into sdcard...

 I hope this will help you

 Take care!!
 Yasmin

 On Wed, Nov 19, 2008 at 2:07 PM, Hu HaiQing-E6997C [EMAIL PROTECTED]wrote:





  Do you have already added  -sdcard options?

  -Original Message-
  From: android-developers@googlegroups.com [mailto:
  [EMAIL PROTECTED] On Behalf Of Thao
  Sent: Wednesday, November 19, 2008 4:33 PM
  To: Android Developers
  Subject: [android-developers] Re: Can not push files to emulated sdcard

  Hi,

  Are you using the Eclipse IDE ? In that case you could use the DDMS
  perspective to easily push your file to sdcard.

  If it still doesn't work, check your permission by connecting to adb shell
  then type ls -l to see the permission on your sdcard.

  If it still doesn't work, your sdcard image could be corrupted...

  On Nov 19, 7:41 am, Asif k [EMAIL PROTECTED] wrote:
   Hi All,

   I am trying to push the 1.txt file from my desktop C:/ to android /
   sdcard/ folder using following command.

   adb push C:\1.txt  /sdcard/asif.txt

   but getting following error :

   failed to copy 'C:\1.txt' to '/sdcard/asif': Read-only file system.

   Can anyone please tell me waht is the problem??

 --
 Everything is Possible For U only
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Overriding functionality of Back softkey

2008-11-19 Thread Asif k

Hi All,

I got the answer for that.no need to reply.
Thanks
Asif

On Nov 19, 4:02 pm, Asif k [EMAIL PROTECTED] wrote:
 How can we override back softkkey fuctions of emulator in over
 application so that this key also can be used for going back to parent
 screen.
 we can use onKeyDown function but what can be the key code??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can not push files to emulated sdcard

2008-11-19 Thread Asif k

Hi All,

Finally it works
According to Thao's suggestion , I opened emulator using command
prompt rather than eclipse,it opened w/o any error and now I can push
files to sdcard.Thanks Thao.

Thanks to all 4 ur valuable suggestions.

regards,

Asif.


On Nov 19, 7:45 pm, Kenneth Loafman [EMAIL PROTECTED] wrote:
 If you created your sdcard after you created your project, you will need
 to add it to the Run Configuration/Target and Debug Configuration/Target
 of the project.  Just having it in the Window/Preference won't affect a
 pre-existing project.

 ...Ken

 On Tue, 18 Nov 2008 22:41:33 -0800 (PST), Asif k [EMAIL PROTECTED]
 wrote:



 Hi All,

 I am trying to push the 1.txt file from my desktop C:/ to android /
 sdcard/ folder using following command.

 adb push C:\1.txt  /sdcard/asif.txt

 but getting following error :

 failed to copy 'C:\1.txt' to '/sdcard/asif': Read-only file system.

 Can anyone please tell me waht is the problem??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] error in opening file in fileexplorer application

2008-11-19 Thread Asif k

Hi All,

I am working on file explorer application in which I cannot open any
file.I am using following code to open the file which I got from
anddev.org.



OnClickListener okButtonListener = new OnClickListener(){
 // @Override
 public void onClick(DialogInterface arg0, int arg1) {
  // Lets start an intent to View the file, that
was clicked...
Intent myIntent = new Intent
(android.content.Intent.ACTION_VIEW,Uri.parse(file:// +
aDirectory.getAbsolutePath()));
startActivity(myIntent);
 }
};
OnClickListener cancelButtonListener = new OnClickListener
(){
 // @Override
 public void onClick(DialogInterface arg0, int arg1) {
  // Do nothing
 }
};
new AlertDialog.Builder(this)
.setTitle(Question)
.setMessage(Do you want to open that file?\n+
aDirectory.getName())
.setPositiveButton(OK, okButtonListener)
.setNegativeButton(Cancel, cancelButtonListener)
.show();

But I am getting following exception after clicking on any file.

11-20 10:26:51.290: INFO/ActivityManager(50): Starting activity:
Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
11-20 10:26:51.299: WARN/System.err(218):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.intent.action.VIEW data=file:///sdcard/1.txt }
11-20 10:26:51.369: WARN/System.err(218): at
android.app.Instrumentation.checkStartActivityResult
(Instrumentation.java:1472)
11-20 10:26:51.369: WARN/System.err(218): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1442)
11-20 10:26:51.380: WARN/System.err(218): at
android.app.Activity.startActivityForResult(Activity.java:2528)
11-20 10:26:51.388: WARN/System.err(218): at
android.app.Activity.startActivity(Activity.java:2572)
11-20 10:26:51.409: WARN/System.err(218): at
android.file.FileExplorer.onListItemClick(FileExplorer.java:171)
11-20 10:26:51.409: WARN/System.err(218): at
android.app.ListActivity$2.onItemClick(ListActivity.java:312)
11-20 10:26:51.409: WARN/System.err(218): at
android.widget.AdapterView.performItemClick(AdapterView.java:283)
11-20 10:26:51.409: WARN/System.err(218): at
android.widget.ListView.performItemClick(ListView.java:3049)
11-20 10:26:51.420: WARN/System.err(218): at
android.widget.AbsListView$PerformClick.run(AbsListView.java:1415)


Is there any permission is needed to open any file or any resources
are required??
Plese give ur suggestions as soon as possible.
Thanks in advance
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Trouble Opening Files via Intent

2008-11-18 Thread Asif k

Hi OC ,

thanks for ur inputs.

  I am still getting the same exception.

Can you please clarify how you set the array and modification done in
filebrowser.java ??



On Oct 16, 4:29 pm, OC [EMAIL PROTECTED] wrote:
 Hello.

 Ok, my English is not so good, but I'll try my best.

 You'll have to set the correct Data and Type. You have to define the
 Type by yourself, by getting the
 fileextension. Type means the main MIME-type like audio/* or image/*.

 For example:

 You clicked at the file MyFavouriteSong.mp3 you have to parse for
 the file-extension, here .mp3.
 In the list defined by yourself (maybe in a Textfile or as a resource-
 array), you look for that extension
 and use the main MIME-type as Type. (should now look like audio).
 If you have the Type, you can call the setDataAndType Method with
 parameters like
 shown in the sample source below.
 Android will show you a Dialog with all Application that can handle
 the given Type, which did not mean
 that the Application can Handle the File by itself. ;-)

 *** CODE ***
 // Create an Intent
 Intent intent = new Intent();

                 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                 intent.setAction(android.content.Intent.ACTION_VIEW);

                 // Category where the App should be searched
                 String category = new
 String(android.intent.category.DEFAULT);

                 // Setting up the data and the type for the intent
                 intent.setDataAndType(Uri.fromFile(aDirectory), type+/
 *);

                 // will start the activtiy found by android or show a
 dialog to select one
                 startActivity(intent);
 *** CODE END ***

 This is the way i do, but i don't know it's the right one.

 Regards,
 OC

 On 26 Sep., 11:25, Timbobsteve [EMAIL PROTECTED] wrote:

  Hi All,

  I posted this in the beginners section, but received no response.
  Sorry if it is bad etiquette to re-post here, it just seems that there
  is a lot more activity in this list.

  I am running through the FileBrowser tutorial over @ anddev.org and
  have it working fairly well, but the one thing I cannot get working is
  Opening files when they are clicked on.

  I always seem to get a ActivityNotFoundException: no activity found
  to handle { action: android.content.Intent.ACTION_VIEW data=file:///
  sdcard/myfile.txt} 

  My openFile() function looks like this:

      private void openFile() {
          try {
                  Intent myIntent = new
  Intent(android.content.Intent.ACTION_VIEW, Uri.fromFile(myFile));
                 startActivity(myIntent);
          } catch (ActivityNotFoundException e) {
                  e.printStackTrace();
          }
      }

  Can anyone see any problems with this? Is it just that there are no
  Apps registered to handle opening of .png images and .txt files? Or is
  my code wrong?

  Regards,
  Timbobsteve

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can not push files to emulated sdcard

2008-11-18 Thread Asif k

Hi All,

I am trying to push the 1.txt file from my desktop C:/ to android /
sdcard/ folder using following command.

adb push C:\1.txt  /sdcard/asif.txt

but getting following error :

failed to copy 'C:\1.txt' to '/sdcard/asif': Read-only file system.

Can anyone please tell me waht is the problem??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---