Search Results

Search found 203 results on 9 pages for 'rakesh mohan hallen'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • Network Data Packet connectivity intent

    - by Rakesh
    I am writing an Android application which can enable and disable the Network Data packet connection. I am also using one broadcast receiver to check the Network Data packet connection. I have registered broadcast receiver and provided required permission in Manifest file. But when I run this application it changes the connection state and after that it crashes. But when I don't include this broadcast receiver it works fine. I am not able to see any kind of log which can provide some clue. Here is my code for broadcast receiver. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.rakesh.simplewidget" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <!-- Permissions --> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".SimpleWidgetExampleActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <!-- <receiver android:name=".ExampleAppWidgetProvider" android:label="Widget ErrorBuster" > <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget1_info" /> </receiver> --> <receiver android:name=".ConnectivityReceiver" > <intent-filter> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> </intent-filter> </receiver> </application> </manifest> My Broadcast receiver class is as following. import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.util.Log; public class ConnectivityReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { NetworkInfo info = (NetworkInfo)intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO); if(info.getType() == ConnectivityManager.TYPE_MOBILE){ if(info.isConnectedOrConnecting()){ Log.e("RK","Mobile data is connected"); }else{ Log.e("RK","Mobile data is disconnected"); } } } } my Main activity file. package com.rakesh.simplewidget; import java.lang.reflect.Field; import java.lang.reflect.Method; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.net.ConnectivityManager; import android.os.Bundle; import android.telephony.TelephonyManager; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; public class SimpleWidgetExampleActivity extends Activity { private Button btNetworkSetting; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btNetworkSetting = (Button)findViewById(R.id.btNetworkSetting); if(checkConnectivityState(getApplicationContext())){ btNetworkSetting.setBackgroundColor(Color.GREEN); }else{ btNetworkSetting.setBackgroundColor(Color.GRAY); } } public void openNetworkSetting(View view){ Method dataConnSwitchmethod; Class telephonyManagerClass; Object ITelephonyStub; Class ITelephonyClass; Context context = view.getContext(); boolean enabled = !checkConnectivityState(context); final ConnectivityManager conman = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); try{ final Class conmanClass = Class.forName(conman.getClass().getName()); final Field iConnectivityManagerField = conmanClass.getDeclaredField("mService"); iConnectivityManagerField.setAccessible(true); final Object iConnectivityManager = iConnectivityManagerField.get(conman); final Class iConnectivityManagerClass = Class.forName(iConnectivityManager.getClass().getName()); final Method setMobileDataEnabledMethod = iConnectivityManagerClass.getDeclaredMethod("setMobileDataEnabled", Boolean.TYPE); setMobileDataEnabledMethod.setAccessible(true); setMobileDataEnabledMethod.invoke(iConnectivityManager, enabled); if(enabled){ Toast.makeText(view.getContext(), "Enabled Network Data", Toast.LENGTH_LONG).show(); view.setBackgroundColor(Color.GREEN); } else{ Toast.makeText(view.getContext(), "Disabled Network Data", Toast.LENGTH_LONG).show(); view.setBackgroundColor(Color.LTGRAY); } }catch(Exception e){ Log.e("Error", "some error"); Toast.makeText(view.getContext(), "It didn't work", Toast.LENGTH_LONG).show(); } } private boolean checkConnectivityState(Context context){ final TelephonyManager telephonyManager = (TelephonyManager) context .getSystemService(Context.TELEPHONY_SERVICE); ConnectivityManager af ; return telephonyManager.getDataState() == TelephonyManager.DATA_CONNECTED; } } Log file: java.lang.RuntimeException: Unable to instantiate receiver com.rakesh.simplewidget.ConnectivityReceiver: java.lang.ClassNotFoundException: com.rakesh.simplewidget.ConnectivityReceiver in loader dalvik.system.PathClassLoader[/data/app/com.rakesh.simplewidget-2.apk] E/AndroidRuntime(26094): at android.app.ActivityThread.handleReceiver(ActivityThread.java:1777) E/AndroidRuntime(26094): at android.app.ActivityThread.access$2400(ActivityThread.java:117) E/AndroidRuntime(26094): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:985) E/AndroidRuntime(26094): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(26094): at android.os.Looper.loop(Looper.java:130) E/AndroidRuntime(26094): at android.app.ActivityThread.main(ActivityThread.java:3691) E/AndroidRuntime(26094): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(26094): at java.lang.reflect.Method.invoke(Method.java:507) E/AndroidRuntime(26094): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) E/AndroidRuntime(26094): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) E/AndroidRuntime(26094): at dalvik.system.NativeStart.main(Native Method) It seems Android is not able to recognize file Broadcast Receiver class. Any idea why I am getting this error? PS: Some information about Android environment and platform. - Android API 10. - Running on Samsung Galaxy II which has android 2.3.6 Edit: my broadcast receiver file ConnectivityReceiver.java was present in default package and it was not being recognized by Android. Android was looking for this file in current package i.e com.rakesh.simplewidget; I just moved connectivityReciever.java file to com.rakesh.simplewidget package and problem was solved.

    Read the article

  • Introducing Oracle Secure Global Desktop for Exalogic!

    - by Mohan Prabhala
    We're excited to introduce Oracle Secure Global Desktop for Exalogic!  Exalogic is hardware and software engineered together to provide extreme performance for Java applications, Oracle Applications, and all other enterprise applications. Oracle Secure Global Desktop provides secure access to centralized, server-hosted applications from a wide variety of popular client devices. Watch Mohamad Afshar and Mohan Prabhala from Oracle Product Management talk about what Oracle Secure Global Desktop is, its differentiators, and how it relates to Exalogic.

    Read the article

  • grub recover command line

    - by Rakesh Mohan Hallen
    Recently the service provider link suddenly broke,while I was updating. Then suddenly while I was trying to boot, i could not. The message on my screen was grub recover missing, and I had no option but the grub recover command line. I really did not know what to do. So I installed an earlier version of ubuntu 10.04. It started to boot normally. Now my system is back to 12.04 the version i was working with. How does one handle problems like this?

    Read the article

  • How to draw the graph in android based on its height and size

    - by Rakesh
    i want to draw a graph in a area and i used a linear layout as area.i want to set the size of the graph area,which should be compatible to small,medium ,default emulators etc.i need to set the size for graph area,how can i do it in xml file for eg in blackberry we use Display.getWidth();Similar is there way to get the width of the display either programmatically or in xml Regards Rakesh Shankar.p

    Read the article

  • Limit on number of kernel arguments in OpenCL

    - by Rakesh K
    Hi, I wanted to know if there is any limit on the number of arguments that are set to kernel function in OpenCL. I am getting the error as INVALID_ARG_INDEX while setting arguments. I am setting 9 arguments in the kernel function. Please help me in this regard. Thanks, Rakesh.

    Read the article

  • Spacing in EditField

    - by Rakesh
    Hi,I am developing my custom EditField and i want to know how to create spacing in EditField I determined the width of EditField using width=this.getFont().getAdvance("000"); Since i require the entry of 3 digits,but i require some spacing in the front and back of my editfield and how to get spacing.Is there any option to do this? Or else i have to develop the editField using Manager. Regards Rakesh Shankar.P

    Read the article

  • How to add the textviews equally in a Row?

    - by Rakesh
    Hi Guys,i have 5 text views to be added horizontally,and it needs to occupy the displaywidth.When i change the screen orientation,it should change based on it.Is that can be done by Layout or it should be done programmatically Regards Rakesh Shankar.P

    Read the article

  • Transmitting complex objects using TCP in C#

    - by Rakesh K
    Hi, I have a client server application in which I need to transmit a user defined object from Client to Server using TCP connection. My object is of the following structure: class Conversation { private string convName, convOwner; public ArrayList convUsers; public string getConvName() { return this.convName; } public string getConvOwner() { return this.convOwner; } } Please help me how to trnasmit this object at from client and again de-serialize it into appropriate object at server side. Thanks, Rakesh K.

    Read the article

  • Cloud security and privacy

    - by Rakesh K
    Hi, I have a very basic doubt regarding cloud computing that is catching up pretty fast these days. To my understanding, cloud computing is a paradigm in which companies put up their data and applications on somebody else's machines aka 'The Cloud'. I want to know just how secure is it to put up my data on some third party machines, especially if my data contains private details. In particular, how can an enterprise trust the cloud computing service providers in this data privacy aspect? Thanks, rakesh.

    Read the article

  • Usuage Of Eclipse for BB and Android Development

    - by Rakesh
    Hello Guys,I am basically bb programmer and i used NetBeans ,BB JDE for BB development. I am partially switching over to android also.So i want to know how to use Eclipse IDE that should be compatible to Both Blackberry JDE and android SDK. What is IDE' that needs to be downloaded .I downloaded BlackBerry_JDE_PluginFull_1.0.0.67.exe. I have a doubt of adding JDE's to IDe and i want to know whether can i load the android SDK to this Eclipse IDE Version: 3.4.1 Build id: M20080911-1700 Any Ideas will be useful Regards Rakesh Shankar.P

    Read the article

  • How To use Android Accelerometer Detection

    - by Rakesh
    Hello Sir,i want to know how to calculate the accelerometer movement.When i place the mobile horizontally in idle state and similarly when i place the mobile in hands,So there accelerometer value change when it is place horizontally or while it is in hand vertically.How To Identify them,Any Sample Codes will be useful Regards Rakesh Shankar.P

    Read the article

  • Unable to run native C++ application on different machine

    - by Rakesh K
    Hi, I wrote a simple 'Hello, world' application in C++ using Visual Studio 2008. I am able to run the app successfully on my local machine. BUt when I copy the exe onto another machine and run, it does not run. It gives the error that 'Application has failed to start because application configuration is incorrect'. The another system does not have Visual Studio installed. What could be the problem? Thanks, Rakesh.

    Read the article

  • How to display the UIActionSheet view from above Tab Bar Controller?

    - by Madan Mohan
    Hi Guys , I need to display the action sheet above the Tab Bar controller. I mean, I would be able to see the Tab Bar controller even the action sheet view is in visible mode. So, Please suggest how to view from above the Tab Bar controller. Is it possible. secondly, How to change the back ground color of action sheet and cancel button back ground colour. Please help me Thank You, Madan Mohan.

    Read the article

  • How to append the string variables using stringWithFormat method in Objective-C

    - by Madan Mohan
    Hi Guys, I want to append the string into single varilable using stringWithFormat.I knew it in using stringByAppendingString. Please help me to append using stringWithFormat for the below code. NSString* curl = @"https://invoices?ticket="; curl = [curl stringByAppendingString:self.ticket]; curl = [curl stringByAppendingString:@"&apikey=bfc9c6ddeea9d75345cd"]; curl = [curl stringByReplacingOccurrencesOfString:@"\n" withString:@""]; Thank You, Madan Mohan.

    Read the article

  • suphp how disable ls /

    - by Pol Hallen
    Using suphp, I set a php.ini to every virtual host. In php.ini I also setted: open_basedir = /home/site1 php script runs, but if I ve a script with ls / I can see whole root directory. How can disable this hole security? <VirtualHost *:80> ServerName site1 ServerAlias www.site1.com DirectoryIndex index.html index.htm DocumentRoot /home/site1/ suPHP_Engine on AddHandler x-httpd-php .php .php3 .php4 .php5 suPHP_AddHandler x-httpd-php # THIS READ php.ini suPHP_ConfigPath /home/site1/ <Directory /home/site1/> Options -Includes -Indexes -FollowSymLinks -ExecCGI -MultiViews AllowOverride none Order allow,deny Allow from all </Directory> </VirtualHost>

    Read the article

  • smtpd_tls_auth_only exclude 127.0.0.1

    - by Pol Hallen
    I configurated postfix to force uses TLS. When an external client try to send an email using this server there is not any problems. But using webmail (127.0.0.1) postfix wants TLS: delivery temporarily suspended: TLS is required, but was not offered by host 127.0.0.1[127.0.0.1]) Which changes I need to do to master.cf? smtp_use_tls = yes smtp_tls_security_level = encrypt smtpd_use_tls = yes smtpd_tls_auth_only = yes smtpd_tls_key_file = /etc/postfix/ssl/xxx.key smtpd_tls_cert_file = /etc/postfix/ssl/xxx.crt smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

    Read the article

  • Facing Problem with Libxml.rb

    - by Rakesh
    Hi Folks, I downloaded one of the rails app from server and tried running it.I faced an error on migration D:\Radiant\trunkrake db:migrate (in D:/Radiant/trunk) rake aborted! 126: The specified module could not be found. - D:/Radiant/trunk/config/../ven dor/plugins/libxml-ruby/lib/libxml_ruby.so I got the windows version of libxml_ruby.so and tried again. i got the error saying " libxml2.dll " not found.Then i checked the file libxml.rb ..it says the below lines . If running on Windows, then add the current directory to the PATH for the current process so it can find the pre-built libxml2 and iconv2 shared libraries (dlls). Can anybody explain me what actually this mean? Regards Rakesh S

    Read the article

  • How To create a Simple NDK Program in Android NDK

    - by Rakesh
    Hi I am new to android Programming and NDK.Yet i am not clear with working in NDK.I just downloaded android ndk r4.If i want to develop appln using NDK,and i refered http://marakana.com/forums/android/android_examples/49.html for reference,But still not clear how to create the header file and implementation,I did nt have any previuos exp in c language.And they asked for run javah tool to create the JNI header file. I dont know how to use javah tool,but i found it in java bin directory and i tried using cmd javah -jni com.pathname.classname is this correct syntax? if so i tried doing it in android bin directory.I want to know ,what classname represents,is this name of header file class that i try to create Regards Rakesh Shankar.P

    Read the article

  • Problem in passing arrays from C# to C++

    - by Rakesh K
    Hi, I have an application in which I need to pass an array from C# to a C++ DLL. What is the best method to do it? I did some search on Internet and figured out that I need to pass the arrays from C# using ref. The code for the same: status = IterateCL(ref input, ref output); The input and output arrays are of length 20. and the corresponding code in C++ DLL is IterateCL(int *&inArray, int *&outArray) This works fine for once. But if I try to call the function from C# in a loop the second time, the input array in C# is showing up as an array of one element. Why is this happening and please help me how I can call this function iteratively from C#. Thanks, Rakesh.

    Read the article

  • How to navigate from one view to other view using UIPageControl?

    - by Madan Mohan
    Hi Guys, I have page control but not navigating to other view. so please provide the solution. pageControl=[[UIPageControl alloc] initWithFrame:CGRectMake(0,380,320,40)]; pageControl.backgroundColor=[UIColor clearColor]; pageControl.userInteractionEnabled =YES; [pageControl addTarget:self action:@selector(pageAction:) forControlEvents:UIControlEventValueChanged]; [pageControl setHighlighted:YES]; -(void)pageAction:(UIPageControl*)control { [self displayNextPage]; [self displayPreviousPage]; } Thank You, Madan Mohan.

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >