[android-developers] Re: "adb devices" is showing the device as offline.what is reason? How can i switch the device from online -> offline viceversa?

2012-07-23 Thread ranjit R
hi,

try this command

adb kill-server

adb start-server


it disconnects and again tries to establish contact with your device via ADB

On Wednesday, July 18, 2012 12:30:45 PM UTC+5:30, Sreedhar Reddy V wrote:
>
> Hi
>
> I connected My android ICS device to my windows PC using USB.
>
> I executed "adb devices" from my pc. 
>
> The output
> ---
> List of devices attached
> id   device
> ---
>
>
> After a long time of say 12 hours, i ran the same command "adb devices" 
> from my pc.
>
> The output
> ---
> List of devices attached
> id   offline
> ---
>
> I am not sure what went wrong. i did not even touch my pc, and my device.
> I made settings in my PC so that it will never sleep.
> I am running monkey scripts which wont make android device to lock as well.
>
> Many people said that ur device is offline because adbd deamon is not 
> running on android device. 
> But this is wrong, why because if adbd is not running then the device will 
> not be listed at all.
>
>
> I came across adbd deamon process which will be running on my android 
> device.
> For my device to get detected by adb(server on my pc)  adbd must be 
> running.
>
> I went to adb shell
> I stopped adbd using the command "stop adbd"
> This stopped my adbd deamon on android device.because adbd is stopped mt 
> adb(server on my pc will not detect my device)
> Now adbd is not running, I execute the "adb devices" command the output 
> is, list of devices with empty list.
> The output
> ---
> List of devices attached
> ---
>
> because the device it self is not detected i cannot log in to adb shell 
> again to "start adbd"  adbd deamon on my device.
> so I shutdown and rebooted my android device, this made my adbd deamon to 
> run again.
>
> Now when i executed "adb devices" on my PC
> The output
> ---
> List of devices attached
> id   device
> ---
>
>
> By seeing this output it is very clear that adbd deamon is running on 
> device, because if adbd is not running then the device will not be listed 
> at all.
>
> Now the question is?
> what is the reason for the device to go to offline? (i am very sure that 
> "adbd deamon not running"  is not at all a reason for this.)
> How can i switch the device from online -> offline viceversa?
>
> I am very very thank full to any android expert who solve my confusion. 
>
>

-- 
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: NEED HELP!! - Food Menu Order/List Application

2012-07-23 Thread ranjit R
Hi,

If you want to maintain small amount of data say settings then go for 
preferences and better go for SQlite database to hold the items .and load 
the list from data based on SQLite database.




On Monday, July 23, 2012 7:40:49 AM UTC+5:30, Steve Meier wrote:
>
> I hope someone can help.  
>
> I have an application that I am building that currently has 3 main 
> Layouts. All String-Arrays are in XML.  First Screen Shows, Breakfast, 
> Lunch & Dinner.  Now depending on which Button is selected, Example "Lunch" 
> a 2nd Layout comes up Showing the Lunch Menu items, such as Cheeseburger, 
> Hamburger, Hot Dog, French Fries, Onion Rings...  Let's say I select 
> "Cheeseburger", the Item is Added to the 3rd Layout.  When I click the Back 
> button on the phone and select a new item such as "Onion Rings" that item 
> replaces the Cheeseburger.  I need it to ADD it to the List, not replace 
> it.  Can someone please tell me where my code is wrong?  
>
> Summary,  I need the list to get appended with the items selected, not 
> replaced by the selected item.
>
>
> Here is my lunchActivity.java
>
> [CODE]
> package com.mycompany.foodmenu;
>
> import android.app.Activity;
> import android.content.Intent;
> import android.os.Bundle;
> import android.view.View;
> import android.widget.AdapterView;
> import android.widget.AdapterView.OnItemClickListener;
> import android.widget.ArrayAdapter;
> import android.widget.ListView;
> import android.widget.Toast;
>  
> public class lunchActivity extends Activity {
>
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.lunchmain);
> final ListView lv=(ListView)findViewById(R.id.listView1); 
>  
> ArrayAdapter 
> adapter=ArrayAdapter.createFromResource(this, 
> R.array.lunch_menu,android.R.layout.simple_list_item_1);
> lv.setAdapter(adapter);
> lv.setOnItemClickListener(new OnItemClickListener() {
>
> @Override
> public void onItemClick(AdapterView arg0, View arg1, int arg2, 
> long arg3) {
>// TODO Auto-generated method stub 
> String item=lv.getItemAtPosition(arg2).toString();
>String itemordered;
>itemordered = item + " added to list";
>Toast.makeText(getApplicationContext(), itemordered, 
> Toast.LENGTH_LONG).show();
>
> // Launching new Activity on selecting List Item
> Intent i = new Intent(getApplicationContext(), ListItem.class);
> // sending data to new activity
> i.putExtra("item", item);
> startActivity(i); 
> }
> });
> }
> }
> [/CODE]
>
> Here is the lunch.xml menu file that read by the lunchActivity to create 
> the first ListView
>
> [CODE]
> 
> 
> 
> Cheeseburger
> Hamburger
> Bacon Cheeseburger
> Hot Dog
> French Fries
> Onion Rings
> 
> 
> 
> [/CODE]
>
> Here is the listItem.java
>
> [CODE]
> package com.mycompany.foodmenu;
>
> import java.util.ArrayList;
> import android.app.Activity;
> import android.content.Intent;
> import android.os.Bundle;
> import android.widget.ArrayAdapter;
> import android.widget.ListView;
>
> public class listItem extends Activity{
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> this.setContentView(R.layout.selecteditems);
>
> Intent i = getIntent();
>
> ArrayList myNewList = new ArrayList();
> String item = i.getStringExtra("item");
>
> myNewList.add(item);
> ListView selecteditems = (ListView) findViewById(R.id.listitems);
>
> ArrayAdapter adapter = new ArrayAdapter(ListItem.this, 
> android.R.layout.simple_list_item_1, myNewList);
> selecteditems.setAdapter(adapter);
> // adapter.notifyDataSetChanged(); 
>
>
> }
> }
> [/CODE]
>
> BTW.  I have tried changing [CODE]myNewList.add(item);[/CODE]  to 
> [CODE]myNewList.addAll(item);[/CODE] and it just creates new problems.  I 
> have also tried adding [CODE]adapter.notifyDataSetChanged();[/CODE] to the 
> end and it makes no difference.
>
> And here is the selectedItems.xml file that is suppose to get populated 
> with the Selected Items from the Lunch Menu
>
> [CODE]
> 
>xmlns:android="http://schemas.android.com/apk/res/android";
>   android:orientation="vertical"
>   android:background="@drawable/main_background" 
>   android:paddingLeft="10.0dip" 
>   android:paddingTop="0.0dip" 
>   android:paddingRight="10.0dip" 
>   android:paddingBottom="10.0dip" 
>   android:layout_width="fill_parent" 
>   android:layout_height="fill_parent">
>
>  android:id="@+id/listitems"
>   android:layout_width="fill_parent"
>   android:layout_height="wrap_content"
>   android:textSize="25dip"
>   android:textStyle="bold"
>   android:padding="10dip"
>   android:textColor="#ff"/>

[android-developers] How to get all media info(metadata) of video source??

2011-11-08 Thread ranjit R
hi i need to get media info of all video source .i used
mediastore.video.videocolumns to get some media info but not all able
to get all meta data information like reolution bitrate duration.i
refered data/data/com.android.providers.media/databases to check
media  metainfo but not all information is loaded in databases ..
Is there any other file from where i can extract all metadata
information of video.??..

-- 
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] Broadcast receiver on REBOOT

2011-10-12 Thread ranjit R
I need to trigger a broadcast receiver  when it starts to reboot/
reboots not when boot_completed .
i not able to trigger the broadcast receiver.
below is my code
public class broadcastreceiver extends BroadcastReceiver{
 @Override
 public void onReceive(Context context, Intent intent) {
 Log.i("LOG_TAG","rebooted");
}
manifest file














i need to write in to file some data  when phone starts rebooting.

thanks to all 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 optimize reliability of gcm messages on 2G network?

2013-12-09 Thread ranjit R
I am using 2g network for Instant messaging .with payload less than 2kb..
 In 3g network success rate of receiving gcm messages is 10/10 with out 
queueing of messages in gcm messaged in GCM server.

In 2G network " here Is the problem" 5/10 messages are received instantly 
other 5 goes in to queue I n GCM server ..
My question is 
As Google queue messages on gcm server When phone is idle. 
1 is there a callback to device when gcm message is queue in server.
 2 is there way to optimize gcm messages on 2g network 
3 when does gcm expire.
4 or is there better way of handling gcm message for 2G

-- 
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
--- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] how to optimize reliability of gcm messages on 2G network?

2013-12-11 Thread ranjit R
Can't we use getdataactiivty() of telephone manager to know current status 
of the data connectivity to fire some sort of hit to web to wake the 
network from dormant state

getDataActivity return following states has any tried this way
*DATA_ACTIVITY_NONE*<http://developer.android.com/reference/android/telephony/TelephonyManager.html#DATA_ACTIVITY_NONE>
*DATA_ACTIVITY_IN*<http://developer.android.com/reference/android/telephony/TelephonyManager.html#DATA_ACTIVITY_IN>
*DATA_ACTIVITY_OUT*<http://developer.android.com/reference/android/telephony/TelephonyManager.html#DATA_ACTIVITY_OUT>
*DATA_ACTIVITY_INOUT*<http://developer.android.com/reference/android/telephony/TelephonyManager.html#DATA_ACTIVITY_INOUT>
*DATA_ACTIVITY_DORMANT*<http://developer.android.com/reference/android/telephony/TelephonyManager.html#DATA_ACTIVITY_DORMANT>



On Tuesday, 10 December 2013 11:30:33 UTC+5:30, Mukesh Srivastav wrote:

> I had the similar situation where in the GCM was not able to receive on 2G 
> and most of the time it failed. I have drawn a work around, since my 
> application deals with the Webservices, I have created  a new webservice 
> called "Getgcmfromthedb", I am calling the same service before calling any 
> other services and updating the status back to 2 for READ and 3 for Process.
>
>
>
>
>
> On Tue, Dec 10, 2013 at 10:27 AM, ranjit R 
> > wrote:
>
>> I am using 2g network for Instant messaging .with payload less than 2kb..
>>  In 3g network success rate of receiving gcm messages is 10/10 with out 
>> queueing of messages in gcm messaged in GCM server.
>>
>> In 2G network " here Is the problem" 5/10 messages are received instantly 
>> other 5 goes in to queue I n GCM server ..
>> My question is 
>> As Google queue messages on gcm server When phone is idle. 
>> 1 is there a callback to device when gcm message is queue in server.
>>  2 is there way to optimize gcm messages on 2g network 
>> 3 when does gcm expire.
>> 4 or is there better way of handling gcm message for 2G
>>  
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@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
>> --- 
>> 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 .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Warm Regards,
> *Mukesh Kumar*,
> Android Consultant/Freelancer,
> India,Hyderabad.
>  

-- 
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
--- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] sms messaging

2010-04-13 Thread ranjit R
hi... how to send an automatic scheduled sms ??

-- 
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, reply using "remove me" as the subject.


[android-developers] notification

2010-04-19 Thread ranjit R
h  i want to create notification based on date (i.e) notification
should  occur only on particular date.
example: birthday notification on mobile .it notifies the only on
particular date.

-- 
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 table

2010-04-19 Thread ranjit R
how to clear a table in android database.

-- 
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