I am using Wikipedia API 1.1 as an AR viewer in my application. Problems with wikit, if I have not launched the actual Wikitud application since the phone's bootup, then I will get a null pointer exemption every time I start my application.
So if I can start my app for the first time and they check whether Wikitude is established or it is running if it is not established, then go to market n download. If this is not happening, then we should run it directly on the background so that my app is not able to concentrate.
// This workaround for the wiki. IIiIITIDUDPAPTEAP = "com.wikitude"; Package Manager pacMan = Poligamy.this.getPackageManager (); {PackageInfo pacInfo = pacMan.getPackageInfo (this.WIKITUDE_PACKAGE_NAME, pacMan.GET_SERVICES); Logs. I ("checkwalk", "Wikitude has been installed"); ActivityManager aMan = (activity manager) this.getSystemService (ACTIVITY_SERVICE); & Lt; RunningAppProcessInfo & gt; RunningApps = aMan.getRunningAppProcesses (); Int NumberoffsPPS = CurrentApps (.); (Int i = 0; i & lt; number OFPSPS; i ++) {if (runningApps.get (i) .processName.equals (this.WIKITUDE_PACKAGE_NAME)) {this.WIKITUDE_RUNNING = 1; Logs. I ("checkwalk", "Wikitudes is running"); }} If (this.WIKITUDE_RUNNING == 0) {Log.i ("CheckWKTD", "Wikitude is not running"); / * Last intent wIntent = new intent (Intent.ACTION_MAIN, empty); WIntent.addCategory (Intent.CATEGORY_LAUNCHER); Last component name CN = new component name ("com.wikitude", "com.mobilizy.wikitudepremium.initial.Splash"); WIntent.setComponent (CN); WIntent.setFlags (Intent.FLAG_ACTIVITY_NO_USER_ACTION); StartActivityIfNeeded (wIntent, 0); *}} Hold (NameNotFoundException E) {// TODO auto generated Grab block Log.i ("CheckWKTD", "Wikitude is not installed"); E.printStackTrace (); //End(); }
The part I am commenting on is intended to start Wikitakkayi. But I have always failed to limit Wikipedia from the background. Any help? Thanks before this.
Best, Tista
There is no such thing "Runs it straight on the background "
I will contact Vicky to focus on fixing my NullPointerException
and find out why you are receiving it if their app has not run yet. is.
Comments
Post a Comment